From 3d8fdb8110062b86eb8c144a8d73f77c915f2aba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szohr=20F=C3=A9lix?= Date: Thu, 3 Oct 2024 18:40:40 +0200 Subject: [PATCH] Regenerate samples --- .../java/org/openapitools/api/DefaultApi.java | 8 +- .../main/java/org/openapitools/model/Pet.java | 11 +- .../java/org/openapitools/api/PetApi.java | 22 +- .../java/org/openapitools/api/StoreApi.java | 6 +- .../java/org/openapitools/api/UserApi.java | 18 +- .../java/org/openapitools/model/Category.java | 7 +- .../openapitools/model/ModelApiResponse.java | 4 - .../java/org/openapitools/model/Order.java | 11 +- .../main/java/org/openapitools/model/Pet.java | 35 +-- .../main/java/org/openapitools/model/Tag.java | 3 - .../java/org/openapitools/model/User.java | 9 - .../java/org/openapitools/api/PetApi.java | 30 +- .../java/org/openapitools/api/StoreApi.java | 10 +- .../java/org/openapitools/api/UserApi.java | 18 +- .../java/org/openapitools/model/Category.java | 7 +- .../openapitools/model/ModelApiResponse.java | 4 - .../java/org/openapitools/model/Order.java | 11 +- .../main/java/org/openapitools/model/Pet.java | 29 +- .../main/java/org/openapitools/model/Tag.java | 3 - .../java/org/openapitools/model/User.java | 9 - .../org/openapitools/api/PetController.java | 30 +- .../org/openapitools/api/StoreController.java | 10 +- .../org/openapitools/api/UserController.java | 18 +- .../java/org/openapitools/model/Category.java | 3 - .../openapitools/model/ModelApiResponse.java | 4 - .../java/org/openapitools/model/Order.java | 11 +- .../main/java/org/openapitools/model/Pet.java | 29 +- .../main/java/org/openapitools/model/Tag.java | 3 - .../java/org/openapitools/model/User.java | 9 - .../java/org/openapitools/api/PetApi.java | 30 +- .../java/org/openapitools/api/StoreApi.java | 10 +- .../java/org/openapitools/api/UserApi.java | 18 +- .../java/org/openapitools/model/Category.java | 7 +- .../openapitools/model/ModelApiResponse.java | 4 - .../java/org/openapitools/model/Order.java | 11 +- .../main/java/org/openapitools/model/Pet.java | 29 +- .../main/java/org/openapitools/model/Tag.java | 3 - .../java/org/openapitools/model/User.java | 9 - .../java/org/openapitools/api/FakeApi.java | 28 +- .../java/org/openapitools/api/PetApi.java | 6 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../model/AdditionalPropertiesAnyType.java | 1 - .../model/AdditionalPropertiesArray.java | 1 - .../model/AdditionalPropertiesBoolean.java | 1 - .../model/AdditionalPropertiesClass.java | 15 +- .../model/AdditionalPropertiesInteger.java | 1 - .../model/AdditionalPropertiesNumber.java | 1 - .../model/AdditionalPropertiesObject.java | 1 - .../model/AdditionalPropertiesString.java | 1 - .../java/org/openapitools/model/Animal.java | 1 - .../model/ArrayOfArrayOfNumberOnly.java | 2 - .../openapitools/model/ArrayOfNumberOnly.java | 2 - .../org/openapitools/model/ArrayTest.java | 4 - .../java/org/openapitools/model/BigCat.java | 5 +- .../openapitools/model/Capitalization.java | 1 - .../main/java/org/openapitools/model/Cat.java | 1 - .../java/org/openapitools/model/Category.java | 1 - .../openapitools/model/ChildWithNullable.java | 3 +- .../org/openapitools/model/ClassModel.java | 1 - .../java/org/openapitools/model/Client.java | 1 - .../model/ContainerDefaultValue.java | 27 +- .../main/java/org/openapitools/model/Dog.java | 1 - .../org/openapitools/model/EnumArrays.java | 10 +- .../java/org/openapitools/model/EnumTest.java | 17 +- .../java/org/openapitools/model/File.java | 1 - .../model/FileSchemaTestClass.java | 2 - .../org/openapitools/model/FormatTest.java | 1 - .../openapitools/model/HasOnlyReadOnly.java | 1 - .../java/org/openapitools/model/MapTest.java | 9 +- ...ropertiesAndAdditionalPropertiesClass.java | 2 - .../openapitools/model/Model200Response.java | 1 - .../openapitools/model/ModelApiResponse.java | 1 - .../org/openapitools/model/ModelList.java | 1 - .../org/openapitools/model/ModelReturn.java | 1 - .../java/org/openapitools/model/Name.java | 1 - .../model/NullableMapProperty.java | 8 +- .../org/openapitools/model/NumberOnly.java | 1 - .../java/org/openapitools/model/Order.java | 5 +- .../openapitools/model/OuterComposite.java | 1 - .../model/ParentWithNullable.java | 11 +- .../main/java/org/openapitools/model/Pet.java | 7 +- .../org/openapitools/model/ReadOnlyFirst.java | 1 - ...ResponseObjectWithDifferentFieldNames.java | 1 - .../openapitools/model/SpecialModelName.java | 1 - .../main/java/org/openapitools/model/Tag.java | 1 - .../openapitools/model/TypeHolderDefault.java | 2 - .../openapitools/model/TypeHolderExample.java | 2 - .../java/org/openapitools/model/User.java | 1 - .../java/org/openapitools/model/XmlItem.java | 10 - .../java/org/openapitools/api/FakeApi.java | 28 +- .../java/org/openapitools/api/PetApi.java | 6 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../model/AdditionalPropertiesAnyTypeDto.java | 1 - .../model/AdditionalPropertiesArrayDto.java | 1 - .../model/AdditionalPropertiesBooleanDto.java | 1 - .../model/AdditionalPropertiesClassDto.java | 15 +- .../model/AdditionalPropertiesIntegerDto.java | 1 - .../model/AdditionalPropertiesNumberDto.java | 1 - .../model/AdditionalPropertiesObjectDto.java | 1 - .../model/AdditionalPropertiesStringDto.java | 1 - .../org/openapitools/model/AnimalDto.java | 1 - .../openapitools/model/ApiResponseDto.java | 1 - .../model/ArrayOfArrayOfNumberOnlyDto.java | 2 - .../model/ArrayOfNumberOnlyDto.java | 2 - .../org/openapitools/model/ArrayTestDto.java | 4 - .../org/openapitools/model/BigCatDto.java | 5 +- .../openapitools/model/CapitalizationDto.java | 1 - .../java/org/openapitools/model/CatDto.java | 1 - .../org/openapitools/model/CategoryDto.java | 1 - .../model/ChildWithNullableDto.java | 3 +- .../org/openapitools/model/ClassModelDto.java | 1 - .../org/openapitools/model/ClientDto.java | 1 - .../model/ContainerDefaultValueDto.java | 23 +- .../java/org/openapitools/model/DogDto.java | 1 - .../org/openapitools/model/EnumArraysDto.java | 10 +- .../org/openapitools/model/EnumTestDto.java | 17 +- .../java/org/openapitools/model/FileDto.java | 1 - .../model/FileSchemaTestClassDto.java | 2 - .../org/openapitools/model/FormatTestDto.java | 1 - .../model/HasOnlyReadOnlyDto.java | 1 - .../java/org/openapitools/model/ListDto.java | 1 - .../org/openapitools/model/MapTestDto.java | 9 +- ...ertiesAndAdditionalPropertiesClassDto.java | 2 - .../model/Model200ResponseDto.java | 1 - .../java/org/openapitools/model/NameDto.java | 1 - .../model/NullableMapPropertyDto.java | 8 +- .../org/openapitools/model/NumberOnlyDto.java | 1 - .../java/org/openapitools/model/OrderDto.java | 5 +- .../openapitools/model/OuterCompositeDto.java | 1 - .../model/ParentWithNullableDto.java | 11 +- .../java/org/openapitools/model/PetDto.java | 7 +- .../openapitools/model/ReadOnlyFirstDto.java | 1 - ...ponseObjectWithDifferentFieldNamesDto.java | 1 - .../org/openapitools/model/ReturnDto.java | 1 - .../model/SpecialModelNameDto.java | 1 - .../java/org/openapitools/model/TagDto.java | 1 - .../model/TypeHolderDefaultDto.java | 2 - .../model/TypeHolderExampleDto.java | 2 - .../java/org/openapitools/model/UserDto.java | 1 - .../org/openapitools/model/XmlItemDto.java | 10 - .../java/org/openapitools/api/PetApi.java | 22 +- .../java/org/openapitools/api/StoreApi.java | 6 +- .../java/org/openapitools/api/UserApi.java | 18 +- .../java/org/openapitools/model/Category.java | 11 +- .../openapitools/model/ModelApiResponse.java | 16 +- .../java/org/openapitools/model/Order.java | 35 +-- .../main/java/org/openapitools/model/Pet.java | 55 ++-- .../main/java/org/openapitools/model/Tag.java | 11 +- .../java/org/openapitools/model/User.java | 41 +-- .../java/org/openapitools/api/PetApi.java | 22 +- .../java/org/openapitools/api/StoreApi.java | 6 +- .../java/org/openapitools/api/UserApi.java | 18 +- .../java/org/openapitools/model/Category.java | 7 +- .../openapitools/model/ModelApiResponse.java | 4 - .../java/org/openapitools/model/Order.java | 11 +- .../main/java/org/openapitools/model/Pet.java | 29 +- .../main/java/org/openapitools/model/Tag.java | 3 - .../java/org/openapitools/model/User.java | 9 - .../java/org/openapitools/api/PetApi.java | 22 +- .../java/org/openapitools/api/StoreApi.java | 6 +- .../java/org/openapitools/api/UserApi.java | 18 +- .../java/org/openapitools/model/Category.java | 7 +- .../openapitools/model/ModelApiResponse.java | 4 - .../java/org/openapitools/model/Order.java | 11 +- .../main/java/org/openapitools/model/Pet.java | 29 +- .../main/java/org/openapitools/model/Tag.java | 3 - .../java/org/openapitools/model/User.java | 9 - .../java/org/openapitools/api/DefaultApi.java | 8 +- .../main/java/org/openapitools/model/Pet.java | 11 +- .../java/org/openapitools/api/PetApi.java | 2 +- .../java/org/openapitools/model/Category.java | 7 +- .../main/java/org/openapitools/model/Pet.java | 29 +- .../main/java/org/openapitools/model/Tag.java | 3 - .../org/openapitools/api/AnotherFakeApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 82 ++--- .../api/FakeClassnameTags123Api.java | 2 +- .../java/org/openapitools/api/PetApi.java | 30 +- .../java/org/openapitools/api/StoreApi.java | 6 +- .../java/org/openapitools/api/UserApi.java | 18 +- .../model/AdditionalPropertiesAnyType.java | 2 - .../model/AdditionalPropertiesArray.java | 2 - .../model/AdditionalPropertiesBoolean.java | 2 - .../model/AdditionalPropertiesClass.java | 26 +- .../model/AdditionalPropertiesInteger.java | 2 - .../model/AdditionalPropertiesNumber.java | 2 - .../model/AdditionalPropertiesObject.java | 2 - .../model/AdditionalPropertiesString.java | 2 - .../java/org/openapitools/model/Animal.java | 7 +- .../model/ArrayOfArrayOfNumberOnly.java | 3 - .../openapitools/model/ArrayOfNumberOnly.java | 3 - .../org/openapitools/model/ArrayTest.java | 13 +- .../java/org/openapitools/model/BigCat.java | 6 +- .../openapitools/model/Capitalization.java | 7 - .../main/java/org/openapitools/model/Cat.java | 2 - .../java/org/openapitools/model/Category.java | 7 +- .../openapitools/model/ChildWithNullable.java | 4 +- .../org/openapitools/model/ClassModel.java | 2 - .../java/org/openapitools/model/Client.java | 2 - .../model/ContainerDefaultValue.java | 31 +- .../main/java/org/openapitools/model/Dog.java | 2 - .../org/openapitools/model/EnumArrays.java | 12 +- .../java/org/openapitools/model/EnumTest.java | 22 +- .../java/org/openapitools/model/File.java | 2 - .../model/FileSchemaTestClass.java | 12 +- .../org/openapitools/model/FormatTest.java | 51 ++- .../openapitools/model/HasOnlyReadOnly.java | 3 - .../java/org/openapitools/model/MapTest.java | 13 +- ...ropertiesAndAdditionalPropertiesClass.java | 9 +- .../openapitools/model/Model200Response.java | 3 - .../openapitools/model/ModelApiResponse.java | 4 - .../org/openapitools/model/ModelList.java | 2 - .../org/openapitools/model/ModelReturn.java | 2 - .../java/org/openapitools/model/Name.java | 9 +- .../model/NullableMapProperty.java | 9 +- .../org/openapitools/model/NumberOnly.java | 2 - .../java/org/openapitools/model/Order.java | 11 +- .../openapitools/model/OuterComposite.java | 4 - .../model/ParentWithNullable.java | 13 +- .../main/java/org/openapitools/model/Pet.java | 29 +- .../org/openapitools/model/ReadOnlyFirst.java | 3 - ...ResponseObjectWithDifferentFieldNames.java | 5 - .../openapitools/model/SpecialModelName.java | 2 - .../main/java/org/openapitools/model/Tag.java | 3 - .../openapitools/model/TypeHolderDefault.java | 27 +- .../openapitools/model/TypeHolderExample.java | 32 +- .../java/org/openapitools/model/User.java | 9 - .../java/org/openapitools/model/XmlItem.java | 39 --- .../java/org/openapitools/api/PetApi.java | 22 +- .../java/org/openapitools/api/StoreApi.java | 6 +- .../java/org/openapitools/api/UserApi.java | 18 +- .../java/org/openapitools/model/Category.java | 3 - .../openapitools/model/ModelApiResponse.java | 4 - .../java/org/openapitools/model/Order.java | 11 +- .../main/java/org/openapitools/model/Pet.java | 29 +- .../main/java/org/openapitools/model/Tag.java | 3 - .../java/org/openapitools/model/User.java | 9 - .../java/org/openapitools/api/PetApi.java | 22 +- .../java/org/openapitools/api/StoreApi.java | 6 +- .../java/org/openapitools/api/UserApi.java | 18 +- .../java/org/openapitools/model/Category.java | 7 +- .../openapitools/model/ModelApiResponse.java | 4 - .../java/org/openapitools/model/Order.java | 11 +- .../main/java/org/openapitools/model/Pet.java | 29 +- .../main/java/org/openapitools/model/Tag.java | 3 - .../java/org/openapitools/model/User.java | 9 - .../java/org/openapitools/api/PetApi.java | 22 +- .../java/org/openapitools/api/StoreApi.java | 6 +- .../java/org/openapitools/api/UserApi.java | 18 +- .../java/org/openapitools/model/Category.java | 7 +- .../openapitools/model/ModelApiResponse.java | 4 - .../java/org/openapitools/model/Order.java | 11 +- .../main/java/org/openapitools/model/Pet.java | 29 +- .../main/java/org/openapitools/model/Tag.java | 3 - .../java/org/openapitools/model/User.java | 9 - .../java/org/openapitools/api/PetApi.java | 22 +- .../java/org/openapitools/api/StoreApi.java | 6 +- .../java/org/openapitools/api/UserApi.java | 18 +- .../java/org/openapitools/model/Category.java | 7 +- .../openapitools/model/ModelApiResponse.java | 4 - .../java/org/openapitools/model/Order.java | 11 +- .../main/java/org/openapitools/model/Pet.java | 29 +- .../main/java/org/openapitools/model/Tag.java | 3 - .../java/org/openapitools/model/User.java | 9 - .../java/org/openapitools/api/BarApi.java | 2 +- .../java/org/openapitools/api/FooApi.java | 2 +- .../org/openapitools/model/Addressable.java | 5 - .../java/org/openapitools/model/Apple.java | 13 +- .../java/org/openapitools/model/Banana.java | 13 +- .../main/java/org/openapitools/model/Bar.java | 21 +- .../org/openapitools/model/BarCreate.java | 16 +- .../java/org/openapitools/model/BarRef.java | 8 - .../java/org/openapitools/model/Entity.java | 15 +- .../org/openapitools/model/EntityRef.java | 19 +- .../org/openapitools/model/Extensible.java | 11 +- .../main/java/org/openapitools/model/Foo.java | 10 - .../java/org/openapitools/model/FooRef.java | 10 - .../java/org/openapitools/model/Pasta.java | 8 - .../java/org/openapitools/model/Pizza.java | 8 - .../org/openapitools/model/PizzaSpeziale.java | 9 - .../java/org/openapitools/api/PetApi.java | 22 +- .../java/org/openapitools/api/StoreApi.java | 6 +- .../java/org/openapitools/api/UserApi.java | 18 +- .../java/org/openapitools/model/Category.java | 7 +- .../openapitools/model/ModelApiResponse.java | 4 - .../java/org/openapitools/model/Order.java | 11 +- .../main/java/org/openapitools/model/Pet.java | 29 +- .../main/java/org/openapitools/model/Tag.java | 3 - .../java/org/openapitools/model/User.java | 9 - .../java/org/openapitools/api/PetApi.java | 22 +- .../java/org/openapitools/api/StoreApi.java | 6 +- .../java/org/openapitools/api/UserApi.java | 18 +- .../java/org/openapitools/model/Category.java | 13 +- .../openapitools/model/ModelApiResponse.java | 13 +- .../java/org/openapitools/model/Order.java | 29 +- .../main/java/org/openapitools/model/Pet.java | 51 ++- .../main/java/org/openapitools/model/Tag.java | 9 +- .../java/org/openapitools/model/User.java | 33 +- .../org/openapitools/api/AnotherFakeApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 90 +++--- .../org/openapitools/api/FakeApiDelegate.java | 16 +- .../api/FakeClassnameTestApi.java | 2 +- .../java/org/openapitools/api/PetApi.java | 22 +- .../org/openapitools/api/PetApiDelegate.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 6 +- .../java/org/openapitools/api/UserApi.java | 18 +- .../org/openapitools/api/UserApiDelegate.java | 4 +- .../model/AdditionalPropertiesAnyType.java | 2 - .../model/AdditionalPropertiesArray.java | 2 - .../model/AdditionalPropertiesBoolean.java | 2 - .../model/AdditionalPropertiesClass.java | 26 +- .../model/AdditionalPropertiesInteger.java | 2 - .../model/AdditionalPropertiesNumber.java | 2 - .../model/AdditionalPropertiesObject.java | 2 - .../model/AdditionalPropertiesString.java | 2 - .../java/org/openapitools/model/Animal.java | 7 +- .../model/ArrayOfArrayOfNumberOnly.java | 3 - .../openapitools/model/ArrayOfNumberOnly.java | 3 - .../org/openapitools/model/ArrayTest.java | 13 +- .../java/org/openapitools/model/BigCat.java | 6 +- .../openapitools/model/Capitalization.java | 7 - .../main/java/org/openapitools/model/Cat.java | 2 - .../java/org/openapitools/model/Category.java | 7 +- .../openapitools/model/ChildWithNullable.java | 4 +- .../org/openapitools/model/ClassModel.java | 2 - .../java/org/openapitools/model/Client.java | 2 - .../model/ContainerDefaultValue.java | 35 +-- .../main/java/org/openapitools/model/Dog.java | 2 - .../org/openapitools/model/EnumArrays.java | 12 +- .../java/org/openapitools/model/EnumTest.java | 22 +- .../java/org/openapitools/model/File.java | 2 - .../model/FileSchemaTestClass.java | 12 +- .../org/openapitools/model/FormatTest.java | 51 ++- .../openapitools/model/HasOnlyReadOnly.java | 3 - .../java/org/openapitools/model/MapTest.java | 13 +- ...ropertiesAndAdditionalPropertiesClass.java | 9 +- .../openapitools/model/Model200Response.java | 3 - .../openapitools/model/ModelApiResponse.java | 4 - .../org/openapitools/model/ModelList.java | 2 - .../org/openapitools/model/ModelReturn.java | 2 - .../java/org/openapitools/model/Name.java | 9 +- .../model/NullableMapProperty.java | 9 +- .../org/openapitools/model/NumberOnly.java | 2 - .../java/org/openapitools/model/Order.java | 11 +- .../openapitools/model/OuterComposite.java | 4 - .../model/ParentWithNullable.java | 13 +- .../main/java/org/openapitools/model/Pet.java | 29 +- .../org/openapitools/model/ReadOnlyFirst.java | 3 - ...ResponseObjectWithDifferentFieldNames.java | 5 - .../openapitools/model/SpecialModelName.java | 2 - .../main/java/org/openapitools/model/Tag.java | 3 - .../openapitools/model/TypeHolderDefault.java | 27 +- .../openapitools/model/TypeHolderExample.java | 32 +- .../java/org/openapitools/model/User.java | 9 - .../java/org/openapitools/model/XmlItem.java | 39 --- .../org/openapitools/api/AnotherFakeApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 88 +++--- .../api/FakeClassnameTestApi.java | 2 +- .../java/org/openapitools/api/PetApi.java | 22 +- .../java/org/openapitools/api/StoreApi.java | 6 +- .../java/org/openapitools/api/UserApi.java | 18 +- .../model/AdditionalPropertiesAnyType.java | 2 - .../model/AdditionalPropertiesArray.java | 2 - .../model/AdditionalPropertiesBoolean.java | 2 - .../model/AdditionalPropertiesClass.java | 26 +- .../model/AdditionalPropertiesInteger.java | 2 - .../model/AdditionalPropertiesNumber.java | 2 - .../model/AdditionalPropertiesObject.java | 2 - .../model/AdditionalPropertiesString.java | 2 - .../java/org/openapitools/model/Animal.java | 7 +- .../model/ArrayOfArrayOfNumberOnly.java | 3 - .../openapitools/model/ArrayOfNumberOnly.java | 3 - .../org/openapitools/model/ArrayTest.java | 13 +- .../java/org/openapitools/model/BigCat.java | 6 +- .../openapitools/model/Capitalization.java | 7 - .../main/java/org/openapitools/model/Cat.java | 2 - .../java/org/openapitools/model/Category.java | 7 +- .../openapitools/model/ChildWithNullable.java | 4 +- .../org/openapitools/model/ClassModel.java | 2 - .../java/org/openapitools/model/Client.java | 2 - .../model/ContainerDefaultValue.java | 35 +-- .../main/java/org/openapitools/model/Dog.java | 2 - .../org/openapitools/model/EnumArrays.java | 12 +- .../java/org/openapitools/model/EnumTest.java | 22 +- .../java/org/openapitools/model/File.java | 2 - .../model/FileSchemaTestClass.java | 12 +- .../org/openapitools/model/FormatTest.java | 51 ++- .../openapitools/model/HasOnlyReadOnly.java | 3 - .../java/org/openapitools/model/MapTest.java | 13 +- ...ropertiesAndAdditionalPropertiesClass.java | 9 +- .../openapitools/model/Model200Response.java | 3 - .../openapitools/model/ModelApiResponse.java | 4 - .../org/openapitools/model/ModelList.java | 2 - .../org/openapitools/model/ModelReturn.java | 2 - .../java/org/openapitools/model/Name.java | 9 +- .../model/NullableMapProperty.java | 9 +- .../org/openapitools/model/NumberOnly.java | 2 - .../java/org/openapitools/model/Order.java | 11 +- .../openapitools/model/OuterComposite.java | 4 - .../model/ParentWithNullable.java | 13 +- .../main/java/org/openapitools/model/Pet.java | 29 +- .../org/openapitools/model/ReadOnlyFirst.java | 3 - ...ResponseObjectWithDifferentFieldNames.java | 5 - .../openapitools/model/SpecialModelName.java | 2 - .../main/java/org/openapitools/model/Tag.java | 3 - .../openapitools/model/TypeHolderDefault.java | 27 +- .../openapitools/model/TypeHolderExample.java | 32 +- .../java/org/openapitools/model/User.java | 9 - .../java/org/openapitools/model/XmlItem.java | 39 --- .../java/org/openapitools/api/PetApi.java | 22 +- .../java/org/openapitools/api/StoreApi.java | 6 +- .../java/org/openapitools/api/UserApi.java | 18 +- .../java/org/openapitools/model/Category.java | 7 +- .../openapitools/model/ModelApiResponse.java | 4 - .../java/org/openapitools/model/Order.java | 11 +- .../main/java/org/openapitools/model/Pet.java | 29 +- .../main/java/org/openapitools/model/Tag.java | 3 - .../java/org/openapitools/model/User.java | 9 - .../java/org/openapitools/api/PetApi.java | 22 +- .../java/org/openapitools/api/StoreApi.java | 6 +- .../java/org/openapitools/api/UserApi.java | 18 +- .../java/org/openapitools/model/Category.java | 7 +- .../openapitools/model/ModelApiResponse.java | 4 - .../java/org/openapitools/model/Order.java | 11 +- .../main/java/org/openapitools/model/Pet.java | 29 +- .../main/java/org/openapitools/model/Tag.java | 3 - .../java/org/openapitools/model/User.java | 9 - .../java/org/openapitools/model/Category.java | 6 +- .../openapitools/model/ModelApiResponse.java | 3 - .../java/org/openapitools/model/Order.java | 10 +- .../main/java/org/openapitools/model/Pet.java | 28 +- .../main/java/org/openapitools/model/Tag.java | 2 - .../java/org/openapitools/model/User.java | 8 - .../handler/PathHandlerInterface.java | 4 +- .../main/java/org/openapitools/model/Pet.java | 16 +- .../org/openapitools/api/AnotherFakeApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 90 +++--- .../api/FakeClassnameTestApi.java | 2 +- .../java/org/openapitools/api/PetApi.java | 22 +- .../java/org/openapitools/api/StoreApi.java | 6 +- .../java/org/openapitools/api/UserApi.java | 18 +- .../model/AdditionalPropertiesAnyType.java | 2 - .../model/AdditionalPropertiesArray.java | 2 - .../model/AdditionalPropertiesBoolean.java | 2 - .../model/AdditionalPropertiesClass.java | 26 +- .../model/AdditionalPropertiesInteger.java | 2 - .../model/AdditionalPropertiesNumber.java | 2 - .../model/AdditionalPropertiesObject.java | 2 - .../model/AdditionalPropertiesString.java | 2 - .../java/org/openapitools/model/Animal.java | 7 +- .../model/ArrayOfArrayOfNumberOnly.java | 3 - .../openapitools/model/ArrayOfNumberOnly.java | 3 - .../org/openapitools/model/ArrayTest.java | 13 +- .../java/org/openapitools/model/BigCat.java | 6 +- .../openapitools/model/Capitalization.java | 7 - .../main/java/org/openapitools/model/Cat.java | 2 - .../java/org/openapitools/model/Category.java | 7 +- .../openapitools/model/ChildWithNullable.java | 4 +- .../org/openapitools/model/ClassModel.java | 2 - .../java/org/openapitools/model/Client.java | 2 - .../model/ContainerDefaultValue.java | 35 +-- .../main/java/org/openapitools/model/Dog.java | 2 - .../org/openapitools/model/EnumArrays.java | 12 +- .../java/org/openapitools/model/EnumTest.java | 22 +- .../java/org/openapitools/model/File.java | 2 - .../model/FileSchemaTestClass.java | 12 +- .../org/openapitools/model/FormatTest.java | 51 ++- .../openapitools/model/HasOnlyReadOnly.java | 3 - .../java/org/openapitools/model/MapTest.java | 13 +- ...ropertiesAndAdditionalPropertiesClass.java | 9 +- .../openapitools/model/Model200Response.java | 3 - .../openapitools/model/ModelApiResponse.java | 4 - .../org/openapitools/model/ModelList.java | 2 - .../org/openapitools/model/ModelReturn.java | 2 - .../java/org/openapitools/model/Name.java | 9 +- .../model/NullableMapProperty.java | 9 +- .../org/openapitools/model/NumberOnly.java | 2 - .../java/org/openapitools/model/Order.java | 11 +- .../openapitools/model/OuterComposite.java | 4 - .../model/ParentWithNullable.java | 13 +- .../main/java/org/openapitools/model/Pet.java | 29 +- .../org/openapitools/model/ReadOnlyFirst.java | 3 - ...ResponseObjectWithDifferentFieldNames.java | 5 - .../openapitools/model/SpecialModelName.java | 2 - .../main/java/org/openapitools/model/Tag.java | 3 - .../openapitools/model/TypeHolderDefault.java | 27 +- .../openapitools/model/TypeHolderExample.java | 32 +- .../java/org/openapitools/model/User.java | 9 - .../java/org/openapitools/model/XmlItem.java | 39 --- .../org/openapitools/api/NullableApi.java | 2 +- .../model/ObjectWithUniqueItems.java | 23 +- .../org/openapitools/api/AnotherFakeApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 90 +++--- .../api/FakeClassnameTestApi.java | 2 +- .../java/org/openapitools/api/PetApi.java | 30 +- .../java/org/openapitools/api/StoreApi.java | 10 +- .../java/org/openapitools/api/UserApi.java | 18 +- .../model/AdditionalPropertiesAnyType.java | 2 - .../model/AdditionalPropertiesArray.java | 2 - .../model/AdditionalPropertiesBoolean.java | 2 - .../model/AdditionalPropertiesClass.java | 20 -- .../model/AdditionalPropertiesInteger.java | 2 - .../model/AdditionalPropertiesNumber.java | 2 - .../model/AdditionalPropertiesObject.java | 2 - .../model/AdditionalPropertiesString.java | 2 - .../java/org/openapitools/model/Animal.java | 7 +- .../model/ArrayOfArrayOfNumberOnly.java | 3 - .../openapitools/model/ArrayOfNumberOnly.java | 3 - .../org/openapitools/model/ArrayTest.java | 13 +- .../java/org/openapitools/model/BigCat.java | 6 +- .../openapitools/model/Capitalization.java | 7 - .../main/java/org/openapitools/model/Cat.java | 2 - .../java/org/openapitools/model/Category.java | 7 +- .../openapitools/model/ChildWithNullable.java | 2 - .../org/openapitools/model/ClassModel.java | 2 - .../java/org/openapitools/model/Client.java | 2 - .../model/ContainerDefaultValue.java | 17 +- .../main/java/org/openapitools/model/Dog.java | 2 - .../org/openapitools/model/EnumArrays.java | 12 +- .../java/org/openapitools/model/EnumTest.java | 22 +- .../java/org/openapitools/model/File.java | 2 - .../model/FileSchemaTestClass.java | 12 +- .../org/openapitools/model/FormatTest.java | 51 ++- .../openapitools/model/HasOnlyReadOnly.java | 3 - .../java/org/openapitools/model/MapTest.java | 13 +- ...ropertiesAndAdditionalPropertiesClass.java | 9 +- .../openapitools/model/Model200Response.java | 3 - .../openapitools/model/ModelApiResponse.java | 4 - .../org/openapitools/model/ModelList.java | 2 - .../org/openapitools/model/ModelReturn.java | 2 - .../java/org/openapitools/model/Name.java | 9 +- .../model/NullableMapProperty.java | 5 +- .../org/openapitools/model/NumberOnly.java | 2 - .../java/org/openapitools/model/Order.java | 11 +- .../openapitools/model/OuterComposite.java | 4 - .../model/ParentWithNullable.java | 7 +- .../main/java/org/openapitools/model/Pet.java | 29 +- .../org/openapitools/model/ReadOnlyFirst.java | 3 - ...ResponseObjectWithDifferentFieldNames.java | 5 - .../openapitools/model/SpecialModelName.java | 2 - .../main/java/org/openapitools/model/Tag.java | 3 - .../openapitools/model/TypeHolderDefault.java | 27 +- .../openapitools/model/TypeHolderExample.java | 32 +- .../java/org/openapitools/model/User.java | 9 - .../java/org/openapitools/model/XmlItem.java | 39 --- .../org/openapitools/api/AnotherFakeApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 90 +++--- .../api/FakeClassnameTestApi.java | 2 +- .../java/org/openapitools/api/PetApi.java | 30 +- .../java/org/openapitools/api/StoreApi.java | 10 +- .../java/org/openapitools/api/UserApi.java | 18 +- .../model/AdditionalPropertiesAnyType.java | 2 - .../model/AdditionalPropertiesArray.java | 2 - .../model/AdditionalPropertiesBoolean.java | 2 - .../model/AdditionalPropertiesClass.java | 26 +- .../model/AdditionalPropertiesInteger.java | 2 - .../model/AdditionalPropertiesNumber.java | 2 - .../model/AdditionalPropertiesObject.java | 2 - .../model/AdditionalPropertiesString.java | 2 - .../java/org/openapitools/model/Animal.java | 7 +- .../model/ArrayOfArrayOfNumberOnly.java | 3 - .../openapitools/model/ArrayOfNumberOnly.java | 3 - .../org/openapitools/model/ArrayTest.java | 13 +- .../java/org/openapitools/model/BigCat.java | 6 +- .../openapitools/model/Capitalization.java | 7 - .../main/java/org/openapitools/model/Cat.java | 2 - .../java/org/openapitools/model/Category.java | 7 +- .../openapitools/model/ChildWithNullable.java | 4 +- .../org/openapitools/model/ClassModel.java | 2 - .../java/org/openapitools/model/Client.java | 2 - .../model/ContainerDefaultValue.java | 35 +-- .../main/java/org/openapitools/model/Dog.java | 2 - .../org/openapitools/model/EnumArrays.java | 12 +- .../java/org/openapitools/model/EnumTest.java | 22 +- .../java/org/openapitools/model/File.java | 2 - .../model/FileSchemaTestClass.java | 12 +- .../org/openapitools/model/FormatTest.java | 51 ++- .../openapitools/model/HasOnlyReadOnly.java | 3 - .../java/org/openapitools/model/MapTest.java | 13 +- ...ropertiesAndAdditionalPropertiesClass.java | 9 +- .../openapitools/model/Model200Response.java | 3 - .../openapitools/model/ModelApiResponse.java | 4 - .../org/openapitools/model/ModelList.java | 2 - .../org/openapitools/model/ModelReturn.java | 2 - .../java/org/openapitools/model/Name.java | 9 +- .../model/NullableMapProperty.java | 9 +- .../org/openapitools/model/NumberOnly.java | 2 - .../java/org/openapitools/model/Order.java | 11 +- .../openapitools/model/OuterComposite.java | 4 - .../model/ParentWithNullable.java | 13 +- .../main/java/org/openapitools/model/Pet.java | 29 +- .../org/openapitools/model/ReadOnlyFirst.java | 3 - ...ResponseObjectWithDifferentFieldNames.java | 5 - .../openapitools/model/SpecialModelName.java | 2 - .../main/java/org/openapitools/model/Tag.java | 3 - .../openapitools/model/TypeHolderDefault.java | 27 +- .../openapitools/model/TypeHolderExample.java | 32 +- .../java/org/openapitools/model/User.java | 9 - .../java/org/openapitools/model/XmlItem.java | 39 --- .../org/openapitools/api/AnotherFakeApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 90 +++--- .../org/openapitools/api/FakeApiDelegate.java | 16 +- .../api/FakeClassnameTestApi.java | 2 +- .../java/org/openapitools/api/PetApi.java | 30 +- .../org/openapitools/api/PetApiDelegate.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 10 +- .../java/org/openapitools/api/UserApi.java | 18 +- .../org/openapitools/api/UserApiDelegate.java | 4 +- .../model/AdditionalPropertiesAnyType.java | 2 - .../model/AdditionalPropertiesArray.java | 2 - .../model/AdditionalPropertiesBoolean.java | 2 - .../model/AdditionalPropertiesClass.java | 26 +- .../model/AdditionalPropertiesInteger.java | 2 - .../model/AdditionalPropertiesNumber.java | 2 - .../model/AdditionalPropertiesObject.java | 2 - .../model/AdditionalPropertiesString.java | 2 - .../java/org/openapitools/model/Animal.java | 7 +- .../model/ArrayOfArrayOfNumberOnly.java | 3 - .../openapitools/model/ArrayOfNumberOnly.java | 3 - .../org/openapitools/model/ArrayTest.java | 13 +- .../java/org/openapitools/model/BigCat.java | 6 +- .../openapitools/model/Capitalization.java | 7 - .../main/java/org/openapitools/model/Cat.java | 2 - .../java/org/openapitools/model/Category.java | 7 +- .../openapitools/model/ChildWithNullable.java | 4 +- .../org/openapitools/model/ClassModel.java | 2 - .../java/org/openapitools/model/Client.java | 2 - .../model/ContainerDefaultValue.java | 35 +-- .../main/java/org/openapitools/model/Dog.java | 2 - .../org/openapitools/model/EnumArrays.java | 12 +- .../java/org/openapitools/model/EnumTest.java | 22 +- .../java/org/openapitools/model/File.java | 2 - .../model/FileSchemaTestClass.java | 12 +- .../org/openapitools/model/FormatTest.java | 51 ++- .../openapitools/model/HasOnlyReadOnly.java | 3 - .../java/org/openapitools/model/MapTest.java | 13 +- ...ropertiesAndAdditionalPropertiesClass.java | 9 +- .../openapitools/model/Model200Response.java | 3 - .../openapitools/model/ModelApiResponse.java | 4 - .../org/openapitools/model/ModelList.java | 2 - .../org/openapitools/model/ModelReturn.java | 2 - .../java/org/openapitools/model/Name.java | 9 +- .../model/NullableMapProperty.java | 9 +- .../org/openapitools/model/NumberOnly.java | 2 - .../java/org/openapitools/model/Order.java | 11 +- .../openapitools/model/OuterComposite.java | 4 - .../model/ParentWithNullable.java | 13 +- .../main/java/org/openapitools/model/Pet.java | 29 +- .../org/openapitools/model/ReadOnlyFirst.java | 3 - ...ResponseObjectWithDifferentFieldNames.java | 5 - .../openapitools/model/SpecialModelName.java | 2 - .../main/java/org/openapitools/model/Tag.java | 3 - .../openapitools/model/TypeHolderDefault.java | 27 +- .../openapitools/model/TypeHolderExample.java | 32 +- .../java/org/openapitools/model/User.java | 9 - .../java/org/openapitools/model/XmlItem.java | 39 --- .../java/org/openapitools/api/PetApi.java | 30 +- .../org/openapitools/api/PetApiDelegate.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 10 +- .../java/org/openapitools/api/UserApi.java | 18 +- .../org/openapitools/api/UserApiDelegate.java | 4 +- .../java/org/openapitools/model/Category.java | 7 +- .../openapitools/model/ModelApiResponse.java | 4 - .../java/org/openapitools/model/Order.java | 11 +- .../main/java/org/openapitools/model/Pet.java | 29 +- .../main/java/org/openapitools/model/Tag.java | 3 - .../java/org/openapitools/model/User.java | 9 - .../org/openapitools/api/AnotherFakeApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 90 +++--- .../org/openapitools/api/FakeApiDelegate.java | 16 +- .../api/FakeClassnameTestApi.java | 2 +- .../java/org/openapitools/api/PetApi.java | 30 +- .../org/openapitools/api/PetApiDelegate.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 10 +- .../java/org/openapitools/api/UserApi.java | 18 +- .../org/openapitools/api/UserApiDelegate.java | 4 +- .../model/AdditionalPropertiesAnyType.java | 4 +- .../model/AdditionalPropertiesArray.java | 4 +- .../model/AdditionalPropertiesBoolean.java | 4 +- .../model/AdditionalPropertiesClass.java | 50 +-- .../model/AdditionalPropertiesInteger.java | 4 +- .../model/AdditionalPropertiesNumber.java | 4 +- .../model/AdditionalPropertiesObject.java | 4 +- .../model/AdditionalPropertiesString.java | 4 +- .../java/org/openapitools/model/Animal.java | 11 +- .../model/ArrayOfArrayOfNumberOnly.java | 5 +- .../openapitools/model/ArrayOfNumberOnly.java | 5 +- .../org/openapitools/model/ArrayTest.java | 21 +- .../java/org/openapitools/model/BigCat.java | 10 +- .../openapitools/model/Capitalization.java | 19 +- .../main/java/org/openapitools/model/Cat.java | 6 +- .../java/org/openapitools/model/Category.java | 11 +- .../openapitools/model/ChildWithNullable.java | 10 +- .../org/openapitools/model/ClassModel.java | 4 +- .../java/org/openapitools/model/Client.java | 4 +- .../model/ContainerDefaultValue.java | 45 ++- .../main/java/org/openapitools/model/Dog.java | 6 +- .../org/openapitools/model/EnumArrays.java | 16 +- .../java/org/openapitools/model/EnumTest.java | 32 +- .../java/org/openapitools/model/File.java | 4 +- .../model/FileSchemaTestClass.java | 18 +- .../org/openapitools/model/FormatTest.java | 79 ++--- .../openapitools/model/HasOnlyReadOnly.java | 7 +- .../java/org/openapitools/model/MapTest.java | 21 +- ...ropertiesAndAdditionalPropertiesClass.java | 15 +- .../openapitools/model/Model200Response.java | 7 +- .../openapitools/model/ModelApiResponse.java | 10 +- .../org/openapitools/model/ModelList.java | 4 +- .../org/openapitools/model/ModelReturn.java | 4 +- .../java/org/openapitools/model/Name.java | 17 +- .../model/NullableMapProperty.java | 13 +- .../org/openapitools/model/NumberOnly.java | 4 +- .../java/org/openapitools/model/Order.java | 23 +- .../openapitools/model/OuterComposite.java | 10 +- .../model/ParentWithNullable.java | 19 +- .../main/java/org/openapitools/model/Pet.java | 43 +-- .../org/openapitools/model/ReadOnlyFirst.java | 7 +- ...ResponseObjectWithDifferentFieldNames.java | 13 +- .../openapitools/model/SpecialModelName.java | 4 +- .../main/java/org/openapitools/model/Tag.java | 7 +- .../openapitools/model/TypeHolderDefault.java | 27 +- .../openapitools/model/TypeHolderExample.java | 32 +- .../java/org/openapitools/model/User.java | 25 +- .../java/org/openapitools/model/XmlItem.java | 97 ++---- .../java/org/openapitools/api/DummyApi.java | 2 +- .../java/org/openapitools/api/PetApi.java | 22 +- .../java/org/openapitools/api/StoreApi.java | 6 +- .../java/org/openapitools/api/UserApi.java | 18 +- .../java/org/openapitools/model/Category.java | 7 +- .../openapitools/model/ModelApiResponse.java | 4 - .../java/org/openapitools/model/Order.java | 11 +- .../main/java/org/openapitools/model/Pet.java | 29 +- .../main/java/org/openapitools/model/Tag.java | 3 - .../java/org/openapitools/model/User.java | 9 - .../org/openapitools/api/AnotherFakeApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 90 +++--- .../api/FakeClassnameTestApi.java | 2 +- .../java/org/openapitools/api/PetApi.java | 30 +- .../java/org/openapitools/api/StoreApi.java | 10 +- .../java/org/openapitools/api/UserApi.java | 18 +- .../model/AdditionalPropertiesAnyType.java | 2 - .../model/AdditionalPropertiesArray.java | 2 - .../model/AdditionalPropertiesBoolean.java | 2 - .../model/AdditionalPropertiesClass.java | 26 +- .../model/AdditionalPropertiesInteger.java | 2 - .../model/AdditionalPropertiesNumber.java | 2 - .../model/AdditionalPropertiesObject.java | 2 - .../model/AdditionalPropertiesString.java | 2 - .../java/org/openapitools/model/Animal.java | 7 +- .../model/ArrayOfArrayOfNumberOnly.java | 3 - .../openapitools/model/ArrayOfNumberOnly.java | 3 - .../org/openapitools/model/ArrayTest.java | 13 +- .../java/org/openapitools/model/BigCat.java | 6 +- .../openapitools/model/Capitalization.java | 7 - .../main/java/org/openapitools/model/Cat.java | 2 - .../java/org/openapitools/model/Category.java | 7 +- .../openapitools/model/ChildWithNullable.java | 4 +- .../org/openapitools/model/ClassModel.java | 2 - .../java/org/openapitools/model/Client.java | 2 - .../model/ContainerDefaultValue.java | 35 +-- .../main/java/org/openapitools/model/Dog.java | 2 - .../org/openapitools/model/EnumArrays.java | 12 +- .../java/org/openapitools/model/EnumTest.java | 22 +- .../java/org/openapitools/model/File.java | 2 - .../model/FileSchemaTestClass.java | 12 +- .../org/openapitools/model/FormatTest.java | 51 ++- .../openapitools/model/HasOnlyReadOnly.java | 3 - .../java/org/openapitools/model/MapTest.java | 13 +- ...ropertiesAndAdditionalPropertiesClass.java | 9 +- .../openapitools/model/Model200Response.java | 3 - .../openapitools/model/ModelApiResponse.java | 4 - .../org/openapitools/model/ModelList.java | 2 - .../org/openapitools/model/ModelReturn.java | 2 - .../java/org/openapitools/model/Name.java | 9 +- .../model/NullableMapProperty.java | 9 +- .../org/openapitools/model/NumberOnly.java | 2 - .../java/org/openapitools/model/Order.java | 11 +- .../openapitools/model/OuterComposite.java | 4 - .../model/ParentWithNullable.java | 13 +- .../main/java/org/openapitools/model/Pet.java | 29 +- .../org/openapitools/model/ReadOnlyFirst.java | 3 - ...ResponseObjectWithDifferentFieldNames.java | 5 - .../openapitools/model/SpecialModelName.java | 2 - .../main/java/org/openapitools/model/Tag.java | 3 - .../openapitools/model/TypeHolderDefault.java | 27 +- .../openapitools/model/TypeHolderExample.java | 32 +- .../java/org/openapitools/model/User.java | 9 - .../java/org/openapitools/model/XmlItem.java | 39 --- .../java/org/openapitools/api/PetApi.java | 22 +- .../java/org/openapitools/api/StoreApi.java | 6 +- .../java/org/openapitools/api/UserApi.java | 18 +- .../java/org/openapitools/model/Category.java | 3 +- .../openapitools/model/ModelApiResponse.java | 1 - .../java/org/openapitools/model/Order.java | 3 +- .../main/java/org/openapitools/model/Pet.java | 11 +- .../main/java/org/openapitools/model/Tag.java | 1 - .../java/org/openapitools/model/User.java | 1 - .../java/org/openapitools/api/PetApi.java | 22 +- .../java/org/openapitools/api/StoreApi.java | 6 +- .../java/org/openapitools/api/UserApi.java | 18 +- .../java/org/openapitools/model/Category.java | 3 +- .../openapitools/model/ModelApiResponse.java | 1 - .../java/org/openapitools/model/Order.java | 3 +- .../main/java/org/openapitools/model/Pet.java | 13 +- .../main/java/org/openapitools/model/Tag.java | 1 - .../java/org/openapitools/model/User.java | 1 - .../org/openapitools/api/AnotherFakeApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 90 +++--- .../org/openapitools/api/FakeApiDelegate.java | 16 +- .../api/FakeClassnameTestApi.java | 2 +- .../java/org/openapitools/api/PetApi.java | 30 +- .../org/openapitools/api/PetApiDelegate.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 10 +- .../java/org/openapitools/api/UserApi.java | 18 +- .../model/AdditionalPropertiesAnyType.java | 2 - .../model/AdditionalPropertiesArray.java | 2 - .../model/AdditionalPropertiesBoolean.java | 2 - .../model/AdditionalPropertiesClass.java | 26 +- .../model/AdditionalPropertiesInteger.java | 2 - .../model/AdditionalPropertiesNumber.java | 2 - .../model/AdditionalPropertiesObject.java | 2 - .../model/AdditionalPropertiesString.java | 2 - .../java/org/openapitools/model/Animal.java | 7 +- .../model/ArrayOfArrayOfNumberOnly.java | 3 - .../openapitools/model/ArrayOfNumberOnly.java | 3 - .../org/openapitools/model/ArrayTest.java | 13 +- .../java/org/openapitools/model/BigCat.java | 6 +- .../openapitools/model/Capitalization.java | 7 - .../main/java/org/openapitools/model/Cat.java | 2 - .../java/org/openapitools/model/Category.java | 7 +- .../openapitools/model/ChildWithNullable.java | 4 +- .../org/openapitools/model/ClassModel.java | 2 - .../java/org/openapitools/model/Client.java | 2 - .../model/ContainerDefaultValue.java | 35 +-- .../main/java/org/openapitools/model/Dog.java | 2 - .../org/openapitools/model/EnumArrays.java | 12 +- .../java/org/openapitools/model/EnumTest.java | 22 +- .../java/org/openapitools/model/File.java | 2 - .../model/FileSchemaTestClass.java | 12 +- .../org/openapitools/model/FormatTest.java | 51 ++- .../openapitools/model/HasOnlyReadOnly.java | 3 - .../java/org/openapitools/model/MapTest.java | 13 +- ...ropertiesAndAdditionalPropertiesClass.java | 9 +- .../openapitools/model/Model200Response.java | 3 - .../openapitools/model/ModelApiResponse.java | 4 - .../org/openapitools/model/ModelList.java | 2 - .../org/openapitools/model/ModelReturn.java | 2 - .../java/org/openapitools/model/Name.java | 9 +- .../model/NullableMapProperty.java | 9 +- .../org/openapitools/model/NumberOnly.java | 2 - .../java/org/openapitools/model/Order.java | 11 +- .../openapitools/model/OuterComposite.java | 4 - .../model/ParentWithNullable.java | 13 +- .../main/java/org/openapitools/model/Pet.java | 29 +- .../org/openapitools/model/ReadOnlyFirst.java | 3 - ...ResponseObjectWithDifferentFieldNames.java | 5 - .../openapitools/model/SpecialModelName.java | 2 - .../main/java/org/openapitools/model/Tag.java | 3 - .../openapitools/model/TypeHolderDefault.java | 27 +- .../openapitools/model/TypeHolderExample.java | 32 +- .../java/org/openapitools/model/User.java | 9 - .../java/org/openapitools/model/XmlItem.java | 39 --- .../org/openapitools/api/AnotherFakeApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 90 +++--- .../org/openapitools/api/FakeApiDelegate.java | 16 +- .../api/FakeClassnameTestApi.java | 2 +- .../java/org/openapitools/api/PetApi.java | 30 +- .../org/openapitools/api/PetApiDelegate.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 10 +- .../java/org/openapitools/api/UserApi.java | 18 +- .../model/AdditionalPropertiesAnyType.java | 2 - .../model/AdditionalPropertiesArray.java | 2 - .../model/AdditionalPropertiesBoolean.java | 2 - .../model/AdditionalPropertiesClass.java | 26 +- .../model/AdditionalPropertiesInteger.java | 2 - .../model/AdditionalPropertiesNumber.java | 2 - .../model/AdditionalPropertiesObject.java | 2 - .../model/AdditionalPropertiesString.java | 2 - .../java/org/openapitools/model/Animal.java | 7 +- .../model/ArrayOfArrayOfNumberOnly.java | 3 - .../openapitools/model/ArrayOfNumberOnly.java | 3 - .../org/openapitools/model/ArrayTest.java | 13 +- .../java/org/openapitools/model/BigCat.java | 6 +- .../openapitools/model/Capitalization.java | 7 - .../main/java/org/openapitools/model/Cat.java | 2 - .../java/org/openapitools/model/Category.java | 7 +- .../openapitools/model/ChildWithNullable.java | 4 +- .../org/openapitools/model/ClassModel.java | 2 - .../java/org/openapitools/model/Client.java | 2 - .../model/ContainerDefaultValue.java | 35 +-- .../main/java/org/openapitools/model/Dog.java | 2 - .../org/openapitools/model/EnumArrays.java | 12 +- .../java/org/openapitools/model/EnumTest.java | 22 +- .../java/org/openapitools/model/File.java | 2 - .../model/FileSchemaTestClass.java | 12 +- .../org/openapitools/model/FormatTest.java | 51 ++- .../openapitools/model/HasOnlyReadOnly.java | 3 - .../java/org/openapitools/model/MapTest.java | 13 +- ...ropertiesAndAdditionalPropertiesClass.java | 9 +- .../openapitools/model/Model200Response.java | 3 - .../openapitools/model/ModelApiResponse.java | 4 - .../org/openapitools/model/ModelList.java | 2 - .../org/openapitools/model/ModelReturn.java | 2 - .../java/org/openapitools/model/Name.java | 9 +- .../model/NullableMapProperty.java | 9 +- .../org/openapitools/model/NumberOnly.java | 2 - .../java/org/openapitools/model/Order.java | 11 +- .../openapitools/model/OuterComposite.java | 4 - .../model/ParentWithNullable.java | 13 +- .../main/java/org/openapitools/model/Pet.java | 29 +- .../org/openapitools/model/ReadOnlyFirst.java | 3 - ...ResponseObjectWithDifferentFieldNames.java | 5 - .../openapitools/model/SpecialModelName.java | 2 - .../main/java/org/openapitools/model/Tag.java | 3 - .../openapitools/model/TypeHolderDefault.java | 27 +- .../openapitools/model/TypeHolderExample.java | 32 +- .../java/org/openapitools/model/User.java | 9 - .../java/org/openapitools/model/XmlItem.java | 39 --- .../org/openapitools/api/AnotherFakeApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 88 +++--- .../org/openapitools/api/FakeApiDelegate.java | 16 +- .../api/FakeClassnameTestApi.java | 2 +- .../java/org/openapitools/api/PetApi.java | 34 +- .../org/openapitools/api/PetApiDelegate.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 10 +- .../java/org/openapitools/api/UserApi.java | 18 +- .../org/openapitools/api/UserApiDelegate.java | 4 +- .../org/openapitools/api/VersioningApi.java | 14 +- .../model/AdditionalPropertiesAnyType.java | 2 - .../model/AdditionalPropertiesArray.java | 2 - .../model/AdditionalPropertiesBoolean.java | 2 - .../model/AdditionalPropertiesClass.java | 20 -- .../model/AdditionalPropertiesInteger.java | 2 - .../model/AdditionalPropertiesNumber.java | 2 - .../model/AdditionalPropertiesObject.java | 2 - .../model/AdditionalPropertiesString.java | 2 - .../java/org/openapitools/model/Animal.java | 7 +- .../model/ArrayOfArrayOfNumberOnly.java | 3 - .../openapitools/model/ArrayOfNumberOnly.java | 3 - .../org/openapitools/model/ArrayTest.java | 13 +- .../openapitools/model/Capitalization.java | 7 - .../main/java/org/openapitools/model/Cat.java | 2 - .../java/org/openapitools/model/Category.java | 7 +- .../org/openapitools/model/ClassModel.java | 2 - .../java/org/openapitools/model/Client.java | 2 - .../main/java/org/openapitools/model/Dog.java | 2 - .../org/openapitools/model/EnumArrays.java | 12 +- .../java/org/openapitools/model/EnumTest.java | 22 +- .../java/org/openapitools/model/File.java | 2 - .../model/FileSchemaTestClass.java | 12 +- .../org/openapitools/model/FormatTest.java | 51 ++- .../openapitools/model/HasOnlyReadOnly.java | 3 - .../java/org/openapitools/model/MapTest.java | 13 +- ...ropertiesAndAdditionalPropertiesClass.java | 9 +- .../openapitools/model/Model200Response.java | 3 - .../openapitools/model/ModelApiResponse.java | 4 - .../org/openapitools/model/ModelList.java | 2 - .../org/openapitools/model/ModelReturn.java | 2 - .../java/org/openapitools/model/Name.java | 9 +- .../org/openapitools/model/NumberOnly.java | 2 - .../java/org/openapitools/model/Order.java | 11 +- .../openapitools/model/OuterComposite.java | 4 - .../main/java/org/openapitools/model/Pet.java | 29 +- .../org/openapitools/model/ReadOnlyFirst.java | 3 - .../openapitools/model/SpecialModelName.java | 2 - .../main/java/org/openapitools/model/Tag.java | 3 - .../openapitools/model/TypeHolderDefault.java | 27 +- .../openapitools/model/TypeHolderExample.java | 32 +- .../java/org/openapitools/model/User.java | 9 - .../java/org/openapitools/model/XmlItem.java | 39 --- .../org/openapitools/api/AnotherFakeApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 88 +++--- .../org/openapitools/api/FakeApiDelegate.java | 16 +- .../api/FakeClassnameTestApi.java | 2 +- .../java/org/openapitools/api/PetApi.java | 34 +- .../org/openapitools/api/PetApiDelegate.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 10 +- .../java/org/openapitools/api/UserApi.java | 18 +- .../org/openapitools/api/UserApiDelegate.java | 4 +- .../org/openapitools/api/VersioningApi.java | 14 +- .../model/AdditionalPropertiesAnyType.java | 2 - .../model/AdditionalPropertiesArray.java | 2 - .../model/AdditionalPropertiesBoolean.java | 2 - .../model/AdditionalPropertiesClass.java | 20 -- .../model/AdditionalPropertiesInteger.java | 2 - .../model/AdditionalPropertiesNumber.java | 2 - .../model/AdditionalPropertiesObject.java | 2 - .../model/AdditionalPropertiesString.java | 2 - .../java/org/openapitools/model/Animal.java | 7 +- .../model/ArrayOfArrayOfNumberOnly.java | 3 - .../openapitools/model/ArrayOfNumberOnly.java | 3 - .../org/openapitools/model/ArrayTest.java | 13 +- .../openapitools/model/Capitalization.java | 7 - .../main/java/org/openapitools/model/Cat.java | 2 - .../java/org/openapitools/model/Category.java | 7 +- .../org/openapitools/model/ClassModel.java | 2 - .../java/org/openapitools/model/Client.java | 2 - .../main/java/org/openapitools/model/Dog.java | 2 - .../org/openapitools/model/EnumArrays.java | 12 +- .../java/org/openapitools/model/EnumTest.java | 22 +- .../java/org/openapitools/model/File.java | 2 - .../model/FileSchemaTestClass.java | 12 +- .../org/openapitools/model/FormatTest.java | 51 ++- .../openapitools/model/HasOnlyReadOnly.java | 3 - .../java/org/openapitools/model/MapTest.java | 13 +- ...ropertiesAndAdditionalPropertiesClass.java | 9 +- .../openapitools/model/Model200Response.java | 3 - .../openapitools/model/ModelApiResponse.java | 4 - .../org/openapitools/model/ModelList.java | 2 - .../org/openapitools/model/ModelReturn.java | 2 - .../java/org/openapitools/model/Name.java | 9 +- .../org/openapitools/model/NumberOnly.java | 2 - .../java/org/openapitools/model/Order.java | 11 +- .../openapitools/model/OuterComposite.java | 4 - .../main/java/org/openapitools/model/Pet.java | 29 +- .../org/openapitools/model/ReadOnlyFirst.java | 3 - .../openapitools/model/SpecialModelName.java | 2 - .../main/java/org/openapitools/model/Tag.java | 3 - .../openapitools/model/TypeHolderDefault.java | 27 +- .../openapitools/model/TypeHolderExample.java | 32 +- .../java/org/openapitools/model/User.java | 9 - .../java/org/openapitools/model/XmlItem.java | 39 --- .../org/openapitools/api/AnotherFakeApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 88 +++--- .../api/FakeClassnameTestApi.java | 2 +- .../java/org/openapitools/api/PetApi.java | 34 +- .../java/org/openapitools/api/StoreApi.java | 10 +- .../java/org/openapitools/api/UserApi.java | 18 +- .../org/openapitools/api/VersioningApi.java | 14 +- .../model/AdditionalPropertiesAnyType.java | 2 - .../model/AdditionalPropertiesArray.java | 2 - .../model/AdditionalPropertiesBoolean.java | 2 - .../model/AdditionalPropertiesClass.java | 20 -- .../model/AdditionalPropertiesInteger.java | 2 - .../model/AdditionalPropertiesNumber.java | 2 - .../model/AdditionalPropertiesObject.java | 2 - .../model/AdditionalPropertiesString.java | 2 - .../java/org/openapitools/model/Animal.java | 7 +- .../model/ArrayOfArrayOfNumberOnly.java | 3 - .../openapitools/model/ArrayOfNumberOnly.java | 3 - .../org/openapitools/model/ArrayTest.java | 13 +- .../openapitools/model/Capitalization.java | 7 - .../main/java/org/openapitools/model/Cat.java | 2 - .../java/org/openapitools/model/Category.java | 7 +- .../org/openapitools/model/ClassModel.java | 2 - .../java/org/openapitools/model/Client.java | 2 - .../main/java/org/openapitools/model/Dog.java | 2 - .../org/openapitools/model/EnumArrays.java | 12 +- .../java/org/openapitools/model/EnumTest.java | 22 +- .../java/org/openapitools/model/File.java | 2 - .../model/FileSchemaTestClass.java | 12 +- .../org/openapitools/model/FormatTest.java | 51 ++- .../openapitools/model/HasOnlyReadOnly.java | 3 - .../java/org/openapitools/model/MapTest.java | 13 +- ...ropertiesAndAdditionalPropertiesClass.java | 9 +- .../openapitools/model/Model200Response.java | 3 - .../openapitools/model/ModelApiResponse.java | 4 - .../org/openapitools/model/ModelList.java | 2 - .../org/openapitools/model/ModelReturn.java | 2 - .../java/org/openapitools/model/Name.java | 9 +- .../org/openapitools/model/NumberOnly.java | 2 - .../java/org/openapitools/model/Order.java | 11 +- .../openapitools/model/OuterComposite.java | 4 - .../main/java/org/openapitools/model/Pet.java | 29 +- .../org/openapitools/model/ReadOnlyFirst.java | 3 - .../openapitools/model/SpecialModelName.java | 2 - .../main/java/org/openapitools/model/Tag.java | 3 - .../openapitools/model/TypeHolderDefault.java | 27 +- .../openapitools/model/TypeHolderExample.java | 32 +- .../java/org/openapitools/model/User.java | 9 - .../java/org/openapitools/model/XmlItem.java | 39 --- .../org/openapitools/api/AnotherFakeApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 88 +++--- .../api/FakeClassnameTestApi.java | 2 +- .../java/org/openapitools/api/PetApi.java | 34 +- .../java/org/openapitools/api/StoreApi.java | 10 +- .../java/org/openapitools/api/UserApi.java | 18 +- .../org/openapitools/api/VersioningApi.java | 14 +- .../model/AdditionalPropertiesAnyType.java | 2 - .../model/AdditionalPropertiesArray.java | 2 - .../model/AdditionalPropertiesBoolean.java | 2 - .../model/AdditionalPropertiesClass.java | 20 -- .../model/AdditionalPropertiesInteger.java | 2 - .../model/AdditionalPropertiesNumber.java | 2 - .../model/AdditionalPropertiesObject.java | 2 - .../model/AdditionalPropertiesString.java | 2 - .../java/org/openapitools/model/Animal.java | 7 +- .../model/ArrayOfArrayOfNumberOnly.java | 3 - .../openapitools/model/ArrayOfNumberOnly.java | 3 - .../org/openapitools/model/ArrayTest.java | 13 +- .../openapitools/model/Capitalization.java | 7 - .../main/java/org/openapitools/model/Cat.java | 2 - .../java/org/openapitools/model/Category.java | 7 +- .../org/openapitools/model/ClassModel.java | 2 - .../java/org/openapitools/model/Client.java | 2 - .../main/java/org/openapitools/model/Dog.java | 2 - .../org/openapitools/model/EnumArrays.java | 12 +- .../java/org/openapitools/model/EnumTest.java | 22 +- .../java/org/openapitools/model/File.java | 2 - .../model/FileSchemaTestClass.java | 12 +- .../org/openapitools/model/FormatTest.java | 51 ++- .../openapitools/model/HasOnlyReadOnly.java | 3 - .../java/org/openapitools/model/MapTest.java | 13 +- ...ropertiesAndAdditionalPropertiesClass.java | 9 +- .../openapitools/model/Model200Response.java | 3 - .../openapitools/model/ModelApiResponse.java | 4 - .../org/openapitools/model/ModelList.java | 2 - .../org/openapitools/model/ModelReturn.java | 2 - .../java/org/openapitools/model/Name.java | 9 +- .../org/openapitools/model/NumberOnly.java | 2 - .../java/org/openapitools/model/Order.java | 11 +- .../openapitools/model/OuterComposite.java | 4 - .../main/java/org/openapitools/model/Pet.java | 29 +- .../org/openapitools/model/ReadOnlyFirst.java | 3 - .../openapitools/model/SpecialModelName.java | 2 - .../main/java/org/openapitools/model/Tag.java | 3 - .../openapitools/model/TypeHolderDefault.java | 27 +- .../openapitools/model/TypeHolderExample.java | 32 +- .../java/org/openapitools/model/User.java | 9 - .../java/org/openapitools/model/XmlItem.java | 39 --- .../java/org/openapitools/api/UserApi.java | 4 +- .../java/org/openapitools/model/Category.java | 3 - .../openapitools/model/ModelApiResponse.java | 4 - .../java/org/openapitools/model/Order.java | 11 +- .../main/java/org/openapitools/model/Pet.java | 29 +- .../main/java/org/openapitools/model/Tag.java | 3 - .../java/org/openapitools/model/User.java | 9 - .../org/openapitools/api/AnotherFakeApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 90 +++--- .../api/FakeClassnameTestApi.java | 2 +- .../java/org/openapitools/api/PetApi.java | 30 +- .../java/org/openapitools/api/StoreApi.java | 10 +- .../java/org/openapitools/api/UserApi.java | 18 +- .../model/AdditionalPropertiesAnyType.java | 9 +- .../model/AdditionalPropertiesArray.java | 9 +- .../model/AdditionalPropertiesBoolean.java | 9 +- .../model/AdditionalPropertiesClass.java | 152 ++++----- .../model/AdditionalPropertiesInteger.java | 9 +- .../model/AdditionalPropertiesNumber.java | 9 +- .../model/AdditionalPropertiesObject.java | 9 +- .../model/AdditionalPropertiesString.java | 9 +- .../java/org/openapitools/model/Animal.java | 15 +- .../model/ArrayOfArrayOfNumberOnly.java | 16 +- .../openapitools/model/ArrayOfNumberOnly.java | 16 +- .../org/openapitools/model/ArrayTest.java | 46 ++- .../java/org/openapitools/model/BigCat.java | 24 +- .../openapitools/model/Capitalization.java | 49 ++- .../main/java/org/openapitools/model/Cat.java | 15 +- .../java/org/openapitools/model/Category.java | 15 +- .../openapitools/model/ChildWithNullable.java | 24 +- .../org/openapitools/model/ClassModel.java | 9 +- .../java/org/openapitools/model/Client.java | 9 +- .../model/ContainerDefaultValue.java | 86 ++--- .../main/java/org/openapitools/model/Dog.java | 15 +- .../org/openapitools/model/EnumArrays.java | 28 +- .../java/org/openapitools/model/EnumTest.java | 51 ++- .../java/org/openapitools/model/File.java | 9 +- .../model/FileSchemaTestClass.java | 28 +- .../org/openapitools/model/FormatTest.java | 105 +++---- .../openapitools/model/HasOnlyReadOnly.java | 17 +- .../java/org/openapitools/model/MapTest.java | 61 ++-- ...ropertiesAndAdditionalPropertiesClass.java | 32 +- .../openapitools/model/Model200Response.java | 17 +- .../openapitools/model/ModelApiResponse.java | 25 +- .../org/openapitools/model/ModelList.java | 9 +- .../org/openapitools/model/ModelReturn.java | 9 +- .../java/org/openapitools/model/Name.java | 31 +- .../model/NullableMapProperty.java | 23 +- .../org/openapitools/model/NumberOnly.java | 9 +- .../java/org/openapitools/model/Order.java | 53 ++-- .../openapitools/model/OuterComposite.java | 25 +- .../model/ParentWithNullable.java | 28 +- .../main/java/org/openapitools/model/Pet.java | 71 ++--- .../org/openapitools/model/ReadOnlyFirst.java | 17 +- ...ResponseObjectWithDifferentFieldNames.java | 33 +- .../openapitools/model/SpecialModelName.java | 9 +- .../main/java/org/openapitools/model/Tag.java | 17 +- .../openapitools/model/TypeHolderDefault.java | 42 +-- .../openapitools/model/TypeHolderExample.java | 48 +-- .../java/org/openapitools/model/User.java | 65 ++-- .../java/org/openapitools/model/XmlItem.java | 296 +++++++----------- .../virtualan/api/AnotherFakeApi.java | 2 +- .../openapitools/virtualan/api/FakeApi.java | 90 +++--- .../virtualan/api/FakeClassnameTestApi.java | 2 +- .../openapitools/virtualan/api/PetApi.java | 22 +- .../openapitools/virtualan/api/StoreApi.java | 6 +- .../openapitools/virtualan/api/UserApi.java | 18 +- .../model/AdditionalPropertiesAnyType.java | 2 - .../model/AdditionalPropertiesArray.java | 2 - .../model/AdditionalPropertiesBoolean.java | 2 - .../model/AdditionalPropertiesClass.java | 26 +- .../model/AdditionalPropertiesInteger.java | 2 - .../model/AdditionalPropertiesNumber.java | 2 - .../model/AdditionalPropertiesObject.java | 2 - .../model/AdditionalPropertiesString.java | 2 - .../openapitools/virtualan/model/Animal.java | 7 +- .../model/ArrayOfArrayOfNumberOnly.java | 3 - .../virtualan/model/ArrayOfNumberOnly.java | 3 - .../virtualan/model/ArrayTest.java | 13 +- .../openapitools/virtualan/model/BigCat.java | 6 +- .../virtualan/model/Capitalization.java | 7 - .../org/openapitools/virtualan/model/Cat.java | 2 - .../virtualan/model/Category.java | 7 +- .../virtualan/model/ChildWithNullable.java | 4 +- .../virtualan/model/ClassModel.java | 2 - .../openapitools/virtualan/model/Client.java | 2 - .../model/ContainerDefaultValue.java | 35 +-- .../org/openapitools/virtualan/model/Dog.java | 2 - .../virtualan/model/EnumArrays.java | 12 +- .../virtualan/model/EnumTest.java | 22 +- .../openapitools/virtualan/model/File.java | 2 - .../virtualan/model/FileSchemaTestClass.java | 12 +- .../virtualan/model/FormatTest.java | 51 ++- .../virtualan/model/HasOnlyReadOnly.java | 3 - .../openapitools/virtualan/model/MapTest.java | 13 +- ...ropertiesAndAdditionalPropertiesClass.java | 9 +- .../virtualan/model/Model200Response.java | 3 - .../virtualan/model/ModelApiResponse.java | 4 - .../virtualan/model/ModelList.java | 2 - .../virtualan/model/ModelReturn.java | 2 - .../openapitools/virtualan/model/Name.java | 9 +- .../virtualan/model/NullableMapProperty.java | 9 +- .../virtualan/model/NumberOnly.java | 2 - .../openapitools/virtualan/model/Order.java | 11 +- .../virtualan/model/OuterComposite.java | 4 - .../virtualan/model/ParentWithNullable.java | 13 +- .../org/openapitools/virtualan/model/Pet.java | 29 +- .../virtualan/model/ReadOnlyFirst.java | 3 - ...ResponseObjectWithDifferentFieldNames.java | 5 - .../virtualan/model/SpecialModelName.java | 2 - .../org/openapitools/virtualan/model/Tag.java | 3 - .../virtualan/model/TypeHolderDefault.java | 27 +- .../virtualan/model/TypeHolderExample.java | 32 +- .../openapitools/virtualan/model/User.java | 9 - .../openapitools/virtualan/model/XmlItem.java | 39 --- .../org/openapitools/api/AnotherFakeApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 90 +++--- .../api/FakeClassnameTestApi.java | 2 +- .../java/org/openapitools/api/PetApi.java | 30 +- .../java/org/openapitools/api/StoreApi.java | 10 +- .../java/org/openapitools/api/UserApi.java | 18 +- .../model/AdditionalPropertiesAnyTypeDto.java | 2 - .../model/AdditionalPropertiesArrayDto.java | 2 - .../model/AdditionalPropertiesBooleanDto.java | 2 - .../model/AdditionalPropertiesClassDto.java | 26 +- .../model/AdditionalPropertiesIntegerDto.java | 2 - .../model/AdditionalPropertiesNumberDto.java | 2 - .../model/AdditionalPropertiesObjectDto.java | 2 - .../model/AdditionalPropertiesStringDto.java | 2 - .../org/openapitools/model/AnimalDto.java | 7 +- .../openapitools/model/ApiResponseDto.java | 4 - .../model/ArrayOfArrayOfNumberOnlyDto.java | 3 - .../model/ArrayOfNumberOnlyDto.java | 3 - .../org/openapitools/model/ArrayTestDto.java | 13 +- .../org/openapitools/model/BigCatDto.java | 6 +- .../openapitools/model/CapitalizationDto.java | 7 - .../java/org/openapitools/model/CatDto.java | 2 - .../org/openapitools/model/CategoryDto.java | 7 +- .../model/ChildWithNullableDto.java | 4 +- .../org/openapitools/model/ClassModelDto.java | 2 - .../org/openapitools/model/ClientDto.java | 2 - .../model/ContainerDefaultValueDto.java | 35 +-- .../java/org/openapitools/model/DogDto.java | 2 - .../org/openapitools/model/EnumArraysDto.java | 12 +- .../org/openapitools/model/EnumTestDto.java | 22 +- .../java/org/openapitools/model/FileDto.java | 2 - .../model/FileSchemaTestClassDto.java | 12 +- .../org/openapitools/model/FormatTestDto.java | 51 ++- .../model/HasOnlyReadOnlyDto.java | 3 - .../java/org/openapitools/model/ListDto.java | 2 - .../org/openapitools/model/MapTestDto.java | 13 +- ...ertiesAndAdditionalPropertiesClassDto.java | 9 +- .../model/Model200ResponseDto.java | 3 - .../java/org/openapitools/model/NameDto.java | 9 +- .../model/NullableMapPropertyDto.java | 9 +- .../org/openapitools/model/NumberOnlyDto.java | 2 - .../java/org/openapitools/model/OrderDto.java | 11 +- .../openapitools/model/OuterCompositeDto.java | 4 - .../model/ParentWithNullableDto.java | 13 +- .../java/org/openapitools/model/PetDto.java | 29 +- .../openapitools/model/ReadOnlyFirstDto.java | 3 - ...ponseObjectWithDifferentFieldNamesDto.java | 5 - .../org/openapitools/model/ReturnDto.java | 2 - .../model/SpecialModelNameDto.java | 2 - .../java/org/openapitools/model/TagDto.java | 3 - .../model/TypeHolderDefaultDto.java | 27 +- .../model/TypeHolderExampleDto.java | 32 +- .../java/org/openapitools/model/UserDto.java | 9 - .../org/openapitools/model/XmlItemDto.java | 39 --- 1288 files changed, 4953 insertions(+), 10586 deletions(-) diff --git a/samples/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java b/samples/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java index 4b7b98251d4b..6a6f227791a8 100644 --- a/samples/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java +++ b/samples/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java @@ -52,8 +52,8 @@ public interface DefaultApi { ) ResponseEntity get( - @ApiParam(value = "A date path parameter", required = true, defaultValue = "1972-01-01") @PathVariable("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, - @NotNull @ApiParam(value = "A date-time query parameter", required = true, defaultValue = "1973-12-19T03:39:57-08:00") @Valid @RequestParam(value = "dateTime", required = true, defaultValue = "1973-12-19T03:39:57-08:00") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "A date path parameter", required = true, defaultValue = "1972-01-01") @PathVariable("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) @NotNull LocalDate date, + @ApiParam(value = "A date-time query parameter", required = true, defaultValue = "1973-12-19T03:39:57-08:00") @RequestParam(value = "dateTime", defaultValue = "1973-12-19T03:39:57-08:00") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) @NotNull OffsetDateTime dateTime, @NotNull @ApiParam(value = "A date header parameter", required = true, defaultValue = "1974-01-01") @RequestHeader(value = "X-Order-Date", required = true, defaultValue = "1974-01-01") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate xOrderDate, @ApiParam(value = "A date cookie parameter", defaultValue = "1975-01-01") @CookieValue(name = "loginDate", required = false, defaultValue = "1975-01-01") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate loginDate ); @@ -82,8 +82,8 @@ ResponseEntity get( ) ResponseEntity updatePetWithForm( - @ApiParam(value = "A date path parameter", required = true, defaultValue = "1970-01-01") @PathVariable("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "Updated last visit timestamp", defaultValue = "1971-12-19T03:39:57-08:00") @Valid @RequestParam(value = "visitDate", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime visitDate + @ApiParam(value = "A date path parameter", required = true, defaultValue = "1970-01-01") @PathVariable("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) @NotNull LocalDate date, + @ApiParam(value = "Updated last visit timestamp", defaultValue = "1971-12-19T03:39:57-08:00") @RequestParam(value = "visitDate", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime visitDate ); } diff --git a/samples/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/model/Pet.java index d58c3567fdbf..aca8eb94c458 100644 --- a/samples/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/model/Pet.java @@ -26,7 +26,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class Pet { - private String atType = "Pet"; + private @NotNull String atType = "Pet"; private Integer age = 4; @@ -60,10 +60,9 @@ public Pet atType(String atType) { * Get atType * @return atType */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("@type") - public String getAtType() { + public @NotNull String getAtType() { return atType; } @@ -80,7 +79,6 @@ public Pet age(Integer age) { * Get age * @return age */ - @ApiModelProperty(value = "") @JsonProperty("age") public Integer getAge() { @@ -100,7 +98,6 @@ public Pet happy(Boolean happy) { * Get happy * @return happy */ - @ApiModelProperty(value = "") @JsonProperty("happy") public Boolean getHappy() { @@ -120,7 +117,6 @@ public Pet price(BigDecimal price) { * Get price * @return price */ - @Valid @ApiModelProperty(value = "") @JsonProperty("price") public BigDecimal getPrice() { @@ -140,7 +136,6 @@ public Pet lastFeed(OffsetDateTime lastFeed) { * Get lastFeed * @return lastFeed */ - @Valid @ApiModelProperty(value = "") @JsonProperty("lastFeed") public OffsetDateTime getLastFeed() { @@ -160,7 +155,6 @@ public Pet dateOfBirth(LocalDate dateOfBirth) { * Get dateOfBirth * @return dateOfBirth */ - @Valid @ApiModelProperty(value = "") @JsonProperty("dateOfBirth") public LocalDate getDateOfBirth() { @@ -218,4 +212,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/PetApi.java index c1d2425f98cc..e0334b046c6c 100644 --- a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/PetApi.java @@ -64,7 +64,7 @@ public interface PetApi { ) ResponseEntity addPet( - @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet pet ); @@ -94,7 +94,7 @@ ResponseEntity addPet( ) ResponseEntity deletePet( - @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, @Parameter(name = "api_key", description = "", in = ParameterIn.HEADER) @RequestHeader(value = "api_key", required = false) String apiKey ); @@ -130,7 +130,7 @@ ResponseEntity deletePet( ) ResponseEntity> findPetsByStatus( - @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) List status + @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @RequestParam(value = "status") @NotNull List status ); @@ -168,7 +168,7 @@ ResponseEntity> findPetsByStatus( ) ResponseEntity> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) List tags + @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @RequestParam(value = "tags") @NotNull List tags ); @@ -205,7 +205,7 @@ ResponseEntity> findPetsByTags( ) ResponseEntity getPetById( - @Parameter(name = "petId", deprecated = true, description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") @Deprecated Long petId + @Parameter(name = "petId", deprecated = true, description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") @Deprecated @NotNull Long petId ); @@ -239,7 +239,7 @@ ResponseEntity getPetById( ) ResponseEntity updatePet( - @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet pet ); @@ -271,9 +271,9 @@ ResponseEntity updatePet( ) ResponseEntity updatePetWithForm( - @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, - @Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, - @Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status + @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, + @Parameter(name = "name", description = "Updated name of the pet") @RequestParam(value = "name", required = false) String name, + @Parameter(name = "status", description = "Updated status of the pet") @RequestParam(value = "status", required = false) String status ); @@ -308,8 +308,8 @@ ResponseEntity updatePetWithForm( ) ResponseEntity uploadFile( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, - @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, + @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, + @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ); diff --git a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/StoreApi.java index da7467f0f0b4..2f75eb7ca2bf 100644 --- a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/StoreApi.java @@ -62,7 +62,7 @@ public interface StoreApi { ) ResponseEntity deleteOrder( - @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId + @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") @NotNull String orderId ); @@ -127,7 +127,7 @@ ResponseEntity> getInventory( ) ResponseEntity getOrderById( - @Min(1L) @Max(5L) @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("orderId") Long orderId + @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("orderId") @NotNull @Min(1L) @Max(5L) Long orderId ); @@ -160,7 +160,7 @@ ResponseEntity getOrderById( ) ResponseEntity placeOrder( - @Parameter(name = "Order", description = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order + @Parameter(name = "Order", description = "order placed for purchasing the pet", required = true) @RequestBody @NotNull @Valid Order order ); } diff --git a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/UserApi.java index 39d77371e20f..f4ca9280707c 100644 --- a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/UserApi.java @@ -64,7 +64,7 @@ public interface UserApi { ) ResponseEntity createUser( - @Parameter(name = "User", description = "Created user object", required = true) @Valid @RequestBody User user + @Parameter(name = "User", description = "Created user object", required = true) @RequestBody @NotNull @Valid User user ); @@ -94,7 +94,7 @@ ResponseEntity createUser( ) ResponseEntity createUsersWithArrayInput( - @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + @Parameter(name = "User", description = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> user ); @@ -124,7 +124,7 @@ ResponseEntity createUsersWithArrayInput( ) ResponseEntity createUsersWithListInput( - @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + @Parameter(name = "User", description = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> user ); @@ -155,7 +155,7 @@ ResponseEntity createUsersWithListInput( ) ResponseEntity deleteUser( - @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") @NotNull String username ); @@ -189,7 +189,7 @@ ResponseEntity deleteUser( ) ResponseEntity getUserByName( - @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") @NotNull String username ); @@ -222,8 +222,8 @@ ResponseEntity getUserByName( ) ResponseEntity loginUser( - @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username, - @NotNull @Parameter(name = "password", deprecated = true, description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) @Deprecated String password + @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @RequestParam(value = "username") @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String username, + @Parameter(name = "password", deprecated = true, description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @RequestParam(value = "password") @Deprecated @NotNull String password ); @@ -284,8 +284,8 @@ ResponseEntity logoutUser( ) ResponseEntity updateUser( - @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, - @Parameter(name = "User", description = "Updated user object", required = true) @Valid @RequestBody User user + @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") @NotNull String username, + @Parameter(name = "User", description = "Updated user object", required = true) @RequestBody @NotNull @Valid User user ); } diff --git a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/model/Category.java b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/model/Category.java index 404ff8514e68..c0ab61ef2083 100644 --- a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/model/Category.java +++ b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/model/Category.java @@ -24,7 +24,7 @@ public class Category { private Long id; - private String name; + private @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String name; public Category id(Long id) { this.id = id; @@ -35,7 +35,6 @@ public Category id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -55,10 +54,9 @@ public Category name(String name) { * Get name * @return name */ - @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") - public String getName() { + public @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String getName() { return name; } @@ -105,4 +103,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/model/ModelApiResponse.java index 0446e2562ee0..46704d751615 100644 --- a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -39,7 +39,6 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @Schema(name = "code", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("code") public Integer getCode() { @@ -59,7 +58,6 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @Schema(name = "type", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("type") public String getType() { @@ -79,7 +77,6 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @Schema(name = "message", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("message") public String getMessage() { @@ -131,4 +128,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/model/Order.java b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/model/Order.java index 40c158a67053..a5f50fa01732 100644 --- a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/model/Order.java +++ b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/model/Order.java @@ -73,7 +73,7 @@ public static StatusEnum fromValue(String value) { } } - private StatusEnum status; + private String status; private Boolean complete = false; @@ -86,7 +86,6 @@ public Order id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -106,7 +105,6 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @Schema(name = "petId", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("petId") public Long getPetId() { @@ -126,7 +124,6 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @Schema(name = "quantity", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("quantity") public Integer getQuantity() { @@ -146,7 +143,6 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Valid @Schema(name = "shipDate", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("shipDate") public OffsetDateTime getShipDate() { @@ -166,10 +162,9 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @Schema(name = "status", description = "Order Status", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("status") - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -186,7 +181,6 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @Schema(name = "complete", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("complete") public Boolean getComplete() { @@ -244,4 +238,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/model/Pet.java index e6b262462910..f12bc78def95 100644 --- a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/model/Pet.java @@ -30,15 +30,13 @@ public class Pet { private Long id; - private Category category; + private @Valid Category category; - private JsonNullable name = JsonNullable.undefined(); + private JsonNullable name = JsonNullable.undefined(); @Deprecated - @Valid - private List photoUrls = new ArrayList<>(); + private @NotNull List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** @@ -78,7 +76,7 @@ public static StatusEnum fromValue(String value) { } } - private StatusEnum status; + private String status; public Pet() { super(); @@ -87,8 +85,8 @@ public Pet() { /** * Constructor with only required parameters */ - public Pet(String name, List photoUrls) { - this.name = JsonNullable.of(name); + public Pet(JsonNullable name, List photoUrls) { + this.name = name; this.photoUrls = photoUrls; } @@ -101,7 +99,6 @@ public Pet id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -121,10 +118,9 @@ public Pet category(Category category) { * Get category * @return category */ - @Valid @Schema(name = "category", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("category") - public Category getCategory() { + public @Valid Category getCategory() { return category; } @@ -132,8 +128,8 @@ public void setCategory(Category category) { this.category = category; } - public Pet name(String name) { - this.name = JsonNullable.of(name); + public Pet name(JsonNullable name) { + this.name = name; return this; } @@ -141,7 +137,6 @@ public Pet name(String name) { * Get name * @return name */ - @NotNull @Schema(name = "name", example = "doggie", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("name") public JsonNullable getName() { @@ -170,11 +165,10 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * @return photoUrls * @deprecated */ - @NotNull @Schema(name = "photoUrls", deprecated = true, requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("photoUrls") @Deprecated - public List getPhotoUrls() { + public @NotNull List getPhotoUrls() { return photoUrls; } @@ -186,7 +180,7 @@ public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List<@Valid Tag> tags) { + public Pet tags(List tags) { this.tags = tags; return this; } @@ -203,14 +197,13 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Valid @Schema(name = "tags", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("tags") public List<@Valid Tag> getTags() { return tags; } - public void setTags(List<@Valid Tag> tags) { + public void setTags(List tags) { this.tags = tags; } @@ -223,10 +216,9 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ - @Schema(name = "status", description = "pet status in the store", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("status") - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -281,4 +273,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/model/Tag.java b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/model/Tag.java index f1a466ed802e..7e2360011252 100644 --- a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/model/Tag.java +++ b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/model/Tag.java @@ -35,7 +35,6 @@ public Tag id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -55,7 +54,6 @@ public Tag name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -105,4 +103,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/model/User.java b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/model/User.java index 916cc3d937f9..84014db8ad34 100644 --- a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/model/User.java +++ b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/model/User.java @@ -47,7 +47,6 @@ public User id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -67,7 +66,6 @@ public User username(String username) { * Get username * @return username */ - @Schema(name = "username", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("username") public String getUsername() { @@ -87,7 +85,6 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @Schema(name = "firstName", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("firstName") public String getFirstName() { @@ -107,7 +104,6 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @Schema(name = "lastName", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("lastName") public String getLastName() { @@ -127,7 +123,6 @@ public User email(String email) { * Get email * @return email */ - @Schema(name = "email", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("email") public String getEmail() { @@ -147,7 +142,6 @@ public User password(String password) { * Get password * @return password */ - @Schema(name = "password", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("password") public String getPassword() { @@ -167,7 +161,6 @@ public User phone(String phone) { * Get phone * @return phone */ - @Schema(name = "phone", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("phone") public String getPhone() { @@ -187,7 +180,6 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @Schema(name = "userStatus", description = "User Status", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("userStatus") public Integer getUserStatus() { @@ -249,4 +241,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/PetApi.java index 7d328943b754..c0ae2adf2f23 100644 --- a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/PetApi.java @@ -61,7 +61,7 @@ public interface PetApi { ) ResponseEntity addPet( - @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet pet ); @@ -94,7 +94,7 @@ ResponseEntity addPet( ) ResponseEntity deletePet( - @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") @NotNull Long petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey ); @@ -113,7 +113,7 @@ ResponseEntity deletePet( nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, - responseContainer = "List", + responseContainer = "array", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "read:pets", description = "read your pets") @@ -121,7 +121,7 @@ ResponseEntity deletePet( } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "array"), @ApiResponse(code = 400, message = "Invalid status value") }) @RequestMapping( @@ -131,7 +131,7 @@ ResponseEntity deletePet( ) ResponseEntity> findPetsByStatus( - @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) @Deprecated List status + @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @RequestParam(value = "status") @Deprecated @NotNull List status ); @@ -151,7 +151,7 @@ ResponseEntity> findPetsByStatus( nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, - responseContainer = "List", + responseContainer = "array", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "read:pets", description = "read your pets") @@ -159,7 +159,7 @@ ResponseEntity> findPetsByStatus( } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "array"), @ApiResponse(code = 400, message = "Invalid tag value") }) @RequestMapping( @@ -169,7 +169,7 @@ ResponseEntity> findPetsByStatus( ) ResponseEntity> findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags + @ApiParam(value = "Tags to filter by", required = true) @RequestParam(value = "tags") @NotNull List tags ); @@ -204,7 +204,7 @@ ResponseEntity> findPetsByTags( ) ResponseEntity getPetById( - @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") @NotNull Long petId ); @@ -247,7 +247,7 @@ ResponseEntity getPetById( ) ResponseEntity updatePet( - @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet pet ); @@ -282,9 +282,9 @@ ResponseEntity updatePet( ) ResponseEntity updatePetWithForm( - @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, - @ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, - @ApiParam(value = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status + @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") @NotNull Long petId, + @ApiParam(value = "Updated name of the pet") @RequestParam(value = "name", required = false) String name, + @ApiParam(value = "Updated status of the pet") @RequestParam(value = "status", required = false) String status ); @@ -321,8 +321,8 @@ ResponseEntity updatePetWithForm( ) ResponseEntity uploadFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, - @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") @NotNull Long petId, + @ApiParam(value = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ); diff --git a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/StoreApi.java index c2d954a74383..5d6353baa1d2 100644 --- a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/StoreApi.java @@ -52,7 +52,7 @@ public interface StoreApi { ) ResponseEntity deleteOrder( - @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") String orderId + @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") @NotNull String orderId ); @@ -68,13 +68,13 @@ ResponseEntity deleteOrder( nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, - responseContainer = "Map", + responseContainer = "map", authorizations = { @Authorization(value = "api_key") } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "map") }) @RequestMapping( method = RequestMethod.GET, @@ -115,7 +115,7 @@ ResponseEntity> getInventory( ) ResponseEntity getOrderById( - @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") Long orderId + @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") @NotNull @Min(1L) @Max(5L) Long orderId ); @@ -146,7 +146,7 @@ ResponseEntity getOrderById( ) ResponseEntity placeOrder( - @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order + @ApiParam(value = "order placed for purchasing the pet", required = true) @RequestBody @NotNull @Valid Order order ); } diff --git a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/UserApi.java index c6eeed632646..7fac8f762bb0 100644 --- a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/UserApi.java @@ -54,7 +54,7 @@ public interface UserApi { ) ResponseEntity createUser( - @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User user + @ApiParam(value = "Created user object", required = true) @RequestBody @NotNull @Valid User user ); @@ -84,7 +84,7 @@ ResponseEntity createUser( ) ResponseEntity createUsersWithArrayInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + @ApiParam(value = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> user ); @@ -114,7 +114,7 @@ ResponseEntity createUsersWithArrayInput( ) ResponseEntity createUsersWithListInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + @ApiParam(value = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> user ); @@ -145,7 +145,7 @@ ResponseEntity createUsersWithListInput( ) ResponseEntity deleteUser( - @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") @NotNull String username ); @@ -177,7 +177,7 @@ ResponseEntity deleteUser( ) ResponseEntity getUserByName( - @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") @NotNull String username ); @@ -208,8 +208,8 @@ ResponseEntity getUserByName( ) ResponseEntity loginUser( - @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, - @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + @ApiParam(value = "The user name for login", required = true) @RequestParam(value = "username") @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String username, + @ApiParam(value = "The password for login in clear text", required = true) @RequestParam(value = "password") @NotNull String password ); @@ -270,8 +270,8 @@ ResponseEntity logoutUser( ) ResponseEntity updateUser( - @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, - @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User user + @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") @NotNull String username, + @ApiParam(value = "Updated user object", required = true) @RequestBody @NotNull @Valid User user ); } diff --git a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/model/Category.java b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/model/Category.java index c111d7098b6c..4c3f2e10974f 100644 --- a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/model/Category.java +++ b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/model/Category.java @@ -25,7 +25,7 @@ public class Category { private Long id; - private String name; + private @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String name; public Category id(Long id) { this.id = id; @@ -36,7 +36,6 @@ public Category id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -56,10 +55,9 @@ public Category name(String name) { * Get name * @return name */ - @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @ApiModelProperty(value = "") @JsonProperty("name") - public String getName() { + public @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String getName() { return name; } @@ -106,4 +104,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/model/ModelApiResponse.java index 26bff480bd2e..ebff2e113b53 100644 --- a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -40,7 +40,6 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @ApiModelProperty(value = "") @JsonProperty("code") public Integer getCode() { @@ -60,7 +59,6 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @ApiModelProperty(value = "") @JsonProperty("type") public String getType() { @@ -80,7 +78,6 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @ApiModelProperty(value = "") @JsonProperty("message") public String getMessage() { @@ -132,4 +129,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/model/Order.java b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/model/Order.java index 7f2afea000ca..1a5e36de756f 100644 --- a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/model/Order.java +++ b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/model/Order.java @@ -72,7 +72,7 @@ public static StatusEnum fromValue(String value) { } } - private StatusEnum status; + private String status; private Boolean complete = false; @@ -85,7 +85,6 @@ public Order id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -105,7 +104,6 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @ApiModelProperty(value = "") @JsonProperty("petId") public Long getPetId() { @@ -125,7 +123,6 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @ApiModelProperty(value = "") @JsonProperty("quantity") public Integer getQuantity() { @@ -145,7 +142,6 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Valid @ApiModelProperty(value = "") @JsonProperty("shipDate") public OffsetDateTime getShipDate() { @@ -165,10 +161,9 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @ApiModelProperty(value = "Order Status") @JsonProperty("status") - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -185,7 +180,6 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @ApiModelProperty(value = "") @JsonProperty("complete") public Boolean getComplete() { @@ -243,4 +237,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/model/Pet.java index 9f754f06e053..b79b9d52f849 100644 --- a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/model/Pet.java @@ -31,14 +31,12 @@ public class Pet { private Long id; - private Category category; + private @Valid Category category; - private String name; + private @NotNull String name; - @Valid - private List photoUrls = new ArrayList<>(); + private @NotNull List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** @@ -79,7 +77,7 @@ public static StatusEnum fromValue(String value) { } @Deprecated - private StatusEnum status; + private String status; public Pet() { super(); @@ -102,7 +100,6 @@ public Pet id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -122,10 +119,9 @@ public Pet category(Category category) { * Get category * @return category */ - @Valid @ApiModelProperty(value = "") @JsonProperty("category") - public Category getCategory() { + public @Valid Category getCategory() { return category; } @@ -142,10 +138,9 @@ public Pet name(String name) { * Get name * @return name */ - @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -170,10 +165,9 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("photoUrls") - public List getPhotoUrls() { + public @NotNull List getPhotoUrls() { return photoUrls; } @@ -181,7 +175,7 @@ public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List<@Valid Tag> tags) { + public Pet tags(List tags) { this.tags = tags; return this; } @@ -198,14 +192,13 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Valid @ApiModelProperty(value = "") @JsonProperty("tags") public List<@Valid Tag> getTags() { return tags; } - public void setTags(List<@Valid Tag> tags) { + public void setTags(List tags) { this.tags = tags; } @@ -219,11 +212,10 @@ public Pet status(StatusEnum status) { * @return status * @deprecated */ - @ApiModelProperty(value = "pet status in the store") @JsonProperty("status") @Deprecated - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -282,4 +274,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/model/Tag.java b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/model/Tag.java index ad381537546e..c049d8369909 100644 --- a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/model/Tag.java +++ b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/model/Tag.java @@ -36,7 +36,6 @@ public Tag id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -56,7 +55,6 @@ public Tag name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -106,4 +104,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/model/User.java b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/model/User.java index e3db6d80260e..5a700b967918 100644 --- a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/model/User.java +++ b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/model/User.java @@ -48,7 +48,6 @@ public User id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -68,7 +67,6 @@ public User username(String username) { * Get username * @return username */ - @ApiModelProperty(value = "") @JsonProperty("username") public String getUsername() { @@ -88,7 +86,6 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @ApiModelProperty(value = "") @JsonProperty("firstName") public String getFirstName() { @@ -108,7 +105,6 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @ApiModelProperty(value = "") @JsonProperty("lastName") public String getLastName() { @@ -128,7 +124,6 @@ public User email(String email) { * Get email * @return email */ - @ApiModelProperty(value = "") @JsonProperty("email") public String getEmail() { @@ -148,7 +143,6 @@ public User password(String password) { * Get password * @return password */ - @ApiModelProperty(value = "") @JsonProperty("password") public String getPassword() { @@ -168,7 +162,6 @@ public User phone(String phone) { * Get phone * @return phone */ - @ApiModelProperty(value = "") @JsonProperty("phone") public String getPhone() { @@ -188,7 +181,6 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @ApiModelProperty(value = "User Status") @JsonProperty("userStatus") public Integer getUserStatus() { @@ -250,4 +242,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/PetController.java b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/PetController.java index 73893a16b2d9..6dbdab0b9ec0 100644 --- a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/PetController.java +++ b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/PetController.java @@ -58,7 +58,7 @@ public interface PetController { ) ResponseEntity addPet( - @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet body ); @@ -90,7 +90,7 @@ ResponseEntity addPet( ) ResponseEntity deletePet( - @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") @NotNull Long petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey ); @@ -109,7 +109,7 @@ ResponseEntity deletePet( nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, - responseContainer = "List", + responseContainer = "array", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @@ -118,7 +118,7 @@ ResponseEntity deletePet( } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "array"), @ApiResponse(code = 400, message = "Invalid status value") }) @RequestMapping( @@ -128,7 +128,7 @@ ResponseEntity deletePet( ) ResponseEntity> findPetsByStatus( - @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status, + @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @RequestParam(value = "status") @NotNull List status, @ApiIgnore final Pageable pageable ); @@ -149,7 +149,7 @@ ResponseEntity> findPetsByStatus( nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, - responseContainer = "List", + responseContainer = "array", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @@ -158,7 +158,7 @@ ResponseEntity> findPetsByStatus( } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "array"), @ApiResponse(code = 400, message = "Invalid tag value") }) @RequestMapping( @@ -168,7 +168,7 @@ ResponseEntity> findPetsByStatus( ) ResponseEntity> findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, + @ApiParam(value = "Tags to filter by", required = true) @RequestParam(value = "tags") @NotNull List tags, @ApiIgnore final Pageable pageable ); @@ -204,7 +204,7 @@ ResponseEntity> findPetsByTags( ) ResponseEntity getPetById( - @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") @NotNull Long petId ); @@ -240,7 +240,7 @@ ResponseEntity getPetById( ) ResponseEntity updatePet( - @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet body ); @@ -274,9 +274,9 @@ ResponseEntity updatePet( ) ResponseEntity updatePetWithForm( - @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, - @ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, - @ApiParam(value = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status + @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") @NotNull Long petId, + @ApiParam(value = "Updated name of the pet") @RequestParam(value = "name", required = false) String name, + @ApiParam(value = "Updated status of the pet") @RequestParam(value = "status", required = false) String status ); @@ -312,8 +312,8 @@ ResponseEntity updatePetWithForm( ) ResponseEntity uploadFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, - @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") @NotNull Long petId, + @ApiParam(value = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ); diff --git a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/StoreController.java b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/StoreController.java index 030f51750e01..739c79ec498f 100644 --- a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/StoreController.java +++ b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/StoreController.java @@ -52,7 +52,7 @@ public interface StoreController { ) ResponseEntity deleteOrder( - @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") String orderId + @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") @NotNull String orderId ); @@ -68,13 +68,13 @@ ResponseEntity deleteOrder( nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, - responseContainer = "Map", + responseContainer = "map", authorizations = { @Authorization(value = "api_key") } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "map") }) @RequestMapping( method = RequestMethod.GET, @@ -115,7 +115,7 @@ ResponseEntity> getInventory( ) ResponseEntity getOrderById( - @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") Long orderId + @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") @NotNull @Min(1L) @Max(5L) Long orderId ); @@ -144,7 +144,7 @@ ResponseEntity getOrderById( ) ResponseEntity placeOrder( - @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body + @ApiParam(value = "order placed for purchasing the pet", required = true) @RequestBody @NotNull @Valid Order body ); } diff --git a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/UserController.java b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/UserController.java index 31b8c6d0c504..9a1b16e313ff 100644 --- a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/UserController.java +++ b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/UserController.java @@ -50,7 +50,7 @@ public interface UserController { ) ResponseEntity createUser( - @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body + @ApiParam(value = "Created user object", required = true) @RequestBody @NotNull @Valid User body ); @@ -75,7 +75,7 @@ ResponseEntity createUser( ) ResponseEntity createUsersWithArrayInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@Valid User> body + @ApiParam(value = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> body ); @@ -100,7 +100,7 @@ ResponseEntity createUsersWithArrayInput( ) ResponseEntity createUsersWithListInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@Valid User> body + @ApiParam(value = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> body ); @@ -128,7 +128,7 @@ ResponseEntity createUsersWithListInput( ) ResponseEntity deleteUser( - @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") @NotNull String username ); @@ -159,7 +159,7 @@ ResponseEntity deleteUser( ) ResponseEntity getUserByName( - @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") @NotNull String username ); @@ -189,8 +189,8 @@ ResponseEntity getUserByName( ) ResponseEntity loginUser( - @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, - @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + @ApiParam(value = "The user name for login", required = true) @RequestParam(value = "username") @NotNull String username, + @ApiParam(value = "The password for login in clear text", required = true) @RequestParam(value = "password") @NotNull String password ); @@ -267,8 +267,8 @@ ResponseEntity logoutUserOptions( ) ResponseEntity updateUser( - @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, - @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body + @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") @NotNull String username, + @ApiParam(value = "Updated user object", required = true) @RequestBody @NotNull @Valid User body ); } diff --git a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/model/Category.java b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/model/Category.java index 0f0f42d1c102..cf47b5ae52ce 100644 --- a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/model/Category.java +++ b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/model/Category.java @@ -36,7 +36,6 @@ public Category id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -56,7 +55,6 @@ public Category name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -106,4 +104,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/model/ModelApiResponse.java index 26bff480bd2e..ebff2e113b53 100644 --- a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -40,7 +40,6 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @ApiModelProperty(value = "") @JsonProperty("code") public Integer getCode() { @@ -60,7 +59,6 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @ApiModelProperty(value = "") @JsonProperty("type") public String getType() { @@ -80,7 +78,6 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @ApiModelProperty(value = "") @JsonProperty("message") public String getMessage() { @@ -132,4 +129,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/model/Order.java b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/model/Order.java index 7f2afea000ca..1a5e36de756f 100644 --- a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/model/Order.java +++ b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/model/Order.java @@ -72,7 +72,7 @@ public static StatusEnum fromValue(String value) { } } - private StatusEnum status; + private String status; private Boolean complete = false; @@ -85,7 +85,6 @@ public Order id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -105,7 +104,6 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @ApiModelProperty(value = "") @JsonProperty("petId") public Long getPetId() { @@ -125,7 +123,6 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @ApiModelProperty(value = "") @JsonProperty("quantity") public Integer getQuantity() { @@ -145,7 +142,6 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Valid @ApiModelProperty(value = "") @JsonProperty("shipDate") public OffsetDateTime getShipDate() { @@ -165,10 +161,9 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @ApiModelProperty(value = "Order Status") @JsonProperty("status") - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -185,7 +180,6 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @ApiModelProperty(value = "") @JsonProperty("complete") public Boolean getComplete() { @@ -243,4 +237,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/model/Pet.java index 20e501f8c652..e63450a419ee 100644 --- a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/model/Pet.java @@ -31,14 +31,12 @@ public class Pet { private Long id; - private Category category; + private @Valid Category category; - private String name; + private @NotNull String name; - @Valid - private List photoUrls = new ArrayList<>(); + private @NotNull List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** @@ -78,7 +76,7 @@ public static StatusEnum fromValue(String value) { } } - private StatusEnum status; + private String status; public Pet() { super(); @@ -101,7 +99,6 @@ public Pet id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -121,10 +118,9 @@ public Pet category(Category category) { * Get category * @return category */ - @Valid @ApiModelProperty(value = "") @JsonProperty("category") - public Category getCategory() { + public @Valid Category getCategory() { return category; } @@ -141,10 +137,9 @@ public Pet name(String name) { * Get name * @return name */ - @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -169,10 +164,9 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("photoUrls") - public List getPhotoUrls() { + public @NotNull List getPhotoUrls() { return photoUrls; } @@ -180,7 +174,7 @@ public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List<@Valid Tag> tags) { + public Pet tags(List tags) { this.tags = tags; return this; } @@ -197,14 +191,13 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Valid @ApiModelProperty(value = "") @JsonProperty("tags") public List<@Valid Tag> getTags() { return tags; } - public void setTags(List<@Valid Tag> tags) { + public void setTags(List tags) { this.tags = tags; } @@ -217,10 +210,9 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ - @ApiModelProperty(value = "pet status in the store") @JsonProperty("status") - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -275,4 +267,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/model/Tag.java b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/model/Tag.java index ad381537546e..c049d8369909 100644 --- a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/model/Tag.java +++ b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/model/Tag.java @@ -36,7 +36,6 @@ public Tag id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -56,7 +55,6 @@ public Tag name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -106,4 +104,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/model/User.java b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/model/User.java index e3db6d80260e..5a700b967918 100644 --- a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/model/User.java +++ b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/model/User.java @@ -48,7 +48,6 @@ public User id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -68,7 +67,6 @@ public User username(String username) { * Get username * @return username */ - @ApiModelProperty(value = "") @JsonProperty("username") public String getUsername() { @@ -88,7 +86,6 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @ApiModelProperty(value = "") @JsonProperty("firstName") public String getFirstName() { @@ -108,7 +105,6 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @ApiModelProperty(value = "") @JsonProperty("lastName") public String getLastName() { @@ -128,7 +124,6 @@ public User email(String email) { * Get email * @return email */ - @ApiModelProperty(value = "") @JsonProperty("email") public String getEmail() { @@ -148,7 +143,6 @@ public User password(String password) { * Get password * @return password */ - @ApiModelProperty(value = "") @JsonProperty("password") public String getPassword() { @@ -168,7 +162,6 @@ public User phone(String phone) { * Get phone * @return phone */ - @ApiModelProperty(value = "") @JsonProperty("phone") public String getPhone() { @@ -188,7 +181,6 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @ApiModelProperty(value = "User Status") @JsonProperty("userStatus") public Integer getUserStatus() { @@ -250,4 +242,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java index 7d328943b754..c0ae2adf2f23 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java @@ -61,7 +61,7 @@ public interface PetApi { ) ResponseEntity addPet( - @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet pet ); @@ -94,7 +94,7 @@ ResponseEntity addPet( ) ResponseEntity deletePet( - @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") @NotNull Long petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey ); @@ -113,7 +113,7 @@ ResponseEntity deletePet( nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, - responseContainer = "List", + responseContainer = "array", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "read:pets", description = "read your pets") @@ -121,7 +121,7 @@ ResponseEntity deletePet( } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "array"), @ApiResponse(code = 400, message = "Invalid status value") }) @RequestMapping( @@ -131,7 +131,7 @@ ResponseEntity deletePet( ) ResponseEntity> findPetsByStatus( - @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) @Deprecated List status + @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @RequestParam(value = "status") @Deprecated @NotNull List status ); @@ -151,7 +151,7 @@ ResponseEntity> findPetsByStatus( nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, - responseContainer = "List", + responseContainer = "array", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "read:pets", description = "read your pets") @@ -159,7 +159,7 @@ ResponseEntity> findPetsByStatus( } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "array"), @ApiResponse(code = 400, message = "Invalid tag value") }) @RequestMapping( @@ -169,7 +169,7 @@ ResponseEntity> findPetsByStatus( ) ResponseEntity> findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags + @ApiParam(value = "Tags to filter by", required = true) @RequestParam(value = "tags") @NotNull List tags ); @@ -204,7 +204,7 @@ ResponseEntity> findPetsByTags( ) ResponseEntity getPetById( - @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") @NotNull Long petId ); @@ -247,7 +247,7 @@ ResponseEntity getPetById( ) ResponseEntity updatePet( - @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet pet ); @@ -282,9 +282,9 @@ ResponseEntity updatePet( ) ResponseEntity updatePetWithForm( - @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, - @ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, - @ApiParam(value = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status + @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") @NotNull Long petId, + @ApiParam(value = "Updated name of the pet") @RequestParam(value = "name", required = false) String name, + @ApiParam(value = "Updated status of the pet") @RequestParam(value = "status", required = false) String status ); @@ -321,8 +321,8 @@ ResponseEntity updatePetWithForm( ) ResponseEntity uploadFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, - @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") @NotNull Long petId, + @ApiParam(value = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ); diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java index c2d954a74383..5d6353baa1d2 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java @@ -52,7 +52,7 @@ public interface StoreApi { ) ResponseEntity deleteOrder( - @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") String orderId + @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") @NotNull String orderId ); @@ -68,13 +68,13 @@ ResponseEntity deleteOrder( nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, - responseContainer = "Map", + responseContainer = "map", authorizations = { @Authorization(value = "api_key") } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "map") }) @RequestMapping( method = RequestMethod.GET, @@ -115,7 +115,7 @@ ResponseEntity> getInventory( ) ResponseEntity getOrderById( - @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") Long orderId + @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") @NotNull @Min(1L) @Max(5L) Long orderId ); @@ -146,7 +146,7 @@ ResponseEntity getOrderById( ) ResponseEntity placeOrder( - @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order + @ApiParam(value = "order placed for purchasing the pet", required = true) @RequestBody @NotNull @Valid Order order ); } diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java index c6eeed632646..7fac8f762bb0 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java @@ -54,7 +54,7 @@ public interface UserApi { ) ResponseEntity createUser( - @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User user + @ApiParam(value = "Created user object", required = true) @RequestBody @NotNull @Valid User user ); @@ -84,7 +84,7 @@ ResponseEntity createUser( ) ResponseEntity createUsersWithArrayInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + @ApiParam(value = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> user ); @@ -114,7 +114,7 @@ ResponseEntity createUsersWithArrayInput( ) ResponseEntity createUsersWithListInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + @ApiParam(value = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> user ); @@ -145,7 +145,7 @@ ResponseEntity createUsersWithListInput( ) ResponseEntity deleteUser( - @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") @NotNull String username ); @@ -177,7 +177,7 @@ ResponseEntity deleteUser( ) ResponseEntity getUserByName( - @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") @NotNull String username ); @@ -208,8 +208,8 @@ ResponseEntity getUserByName( ) ResponseEntity loginUser( - @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, - @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + @ApiParam(value = "The user name for login", required = true) @RequestParam(value = "username") @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String username, + @ApiParam(value = "The password for login in clear text", required = true) @RequestParam(value = "password") @NotNull String password ); @@ -270,8 +270,8 @@ ResponseEntity logoutUser( ) ResponseEntity updateUser( - @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, - @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User user + @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") @NotNull String username, + @ApiParam(value = "Updated user object", required = true) @RequestBody @NotNull @Valid User user ); } diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Category.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Category.java index c111d7098b6c..4c3f2e10974f 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Category.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Category.java @@ -25,7 +25,7 @@ public class Category { private Long id; - private String name; + private @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String name; public Category id(Long id) { this.id = id; @@ -36,7 +36,6 @@ public Category id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -56,10 +55,9 @@ public Category name(String name) { * Get name * @return name */ - @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @ApiModelProperty(value = "") @JsonProperty("name") - public String getName() { + public @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String getName() { return name; } @@ -106,4 +104,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/ModelApiResponse.java index 26bff480bd2e..ebff2e113b53 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -40,7 +40,6 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @ApiModelProperty(value = "") @JsonProperty("code") public Integer getCode() { @@ -60,7 +59,6 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @ApiModelProperty(value = "") @JsonProperty("type") public String getType() { @@ -80,7 +78,6 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @ApiModelProperty(value = "") @JsonProperty("message") public String getMessage() { @@ -132,4 +129,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java index 7f2afea000ca..1a5e36de756f 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java @@ -72,7 +72,7 @@ public static StatusEnum fromValue(String value) { } } - private StatusEnum status; + private String status; private Boolean complete = false; @@ -85,7 +85,6 @@ public Order id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -105,7 +104,6 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @ApiModelProperty(value = "") @JsonProperty("petId") public Long getPetId() { @@ -125,7 +123,6 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @ApiModelProperty(value = "") @JsonProperty("quantity") public Integer getQuantity() { @@ -145,7 +142,6 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Valid @ApiModelProperty(value = "") @JsonProperty("shipDate") public OffsetDateTime getShipDate() { @@ -165,10 +161,9 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @ApiModelProperty(value = "Order Status") @JsonProperty("status") - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -185,7 +180,6 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @ApiModelProperty(value = "") @JsonProperty("complete") public Boolean getComplete() { @@ -243,4 +237,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java index 9f754f06e053..b79b9d52f849 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java @@ -31,14 +31,12 @@ public class Pet { private Long id; - private Category category; + private @Valid Category category; - private String name; + private @NotNull String name; - @Valid - private List photoUrls = new ArrayList<>(); + private @NotNull List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** @@ -79,7 +77,7 @@ public static StatusEnum fromValue(String value) { } @Deprecated - private StatusEnum status; + private String status; public Pet() { super(); @@ -102,7 +100,6 @@ public Pet id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -122,10 +119,9 @@ public Pet category(Category category) { * Get category * @return category */ - @Valid @ApiModelProperty(value = "") @JsonProperty("category") - public Category getCategory() { + public @Valid Category getCategory() { return category; } @@ -142,10 +138,9 @@ public Pet name(String name) { * Get name * @return name */ - @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -170,10 +165,9 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("photoUrls") - public List getPhotoUrls() { + public @NotNull List getPhotoUrls() { return photoUrls; } @@ -181,7 +175,7 @@ public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List<@Valid Tag> tags) { + public Pet tags(List tags) { this.tags = tags; return this; } @@ -198,14 +192,13 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Valid @ApiModelProperty(value = "") @JsonProperty("tags") public List<@Valid Tag> getTags() { return tags; } - public void setTags(List<@Valid Tag> tags) { + public void setTags(List tags) { this.tags = tags; } @@ -219,11 +212,10 @@ public Pet status(StatusEnum status) { * @return status * @deprecated */ - @ApiModelProperty(value = "pet status in the store") @JsonProperty("status") @Deprecated - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -282,4 +274,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Tag.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Tag.java index ad381537546e..c049d8369909 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Tag.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Tag.java @@ -36,7 +36,6 @@ public Tag id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -56,7 +55,6 @@ public Tag name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -106,4 +104,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/User.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/User.java index e3db6d80260e..5a700b967918 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/User.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/User.java @@ -48,7 +48,6 @@ public User id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -68,7 +67,6 @@ public User username(String username) { * Get username * @return username */ - @ApiModelProperty(value = "") @JsonProperty("username") public String getUsername() { @@ -88,7 +86,6 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @ApiModelProperty(value = "") @JsonProperty("firstName") public String getFirstName() { @@ -108,7 +105,6 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @ApiModelProperty(value = "") @JsonProperty("lastName") public String getLastName() { @@ -128,7 +124,6 @@ public User email(String email) { * Get email * @return email */ - @ApiModelProperty(value = "") @JsonProperty("email") public String getEmail() { @@ -148,7 +143,6 @@ public User password(String password) { * Get password * @return password */ - @ApiModelProperty(value = "") @JsonProperty("password") public String getPassword() { @@ -168,7 +162,6 @@ public User phone(String phone) { * Get phone * @return phone */ - @ApiModelProperty(value = "") @JsonProperty("phone") public String getPhone() { @@ -188,7 +181,6 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @ApiModelProperty(value = "User Status") @JsonProperty("userStatus") public Integer getUserStatus() { @@ -250,4 +242,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/FakeApi.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/FakeApi.java index 3c54eef28b94..2abe9d6dbe3e 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/FakeApi.java @@ -156,7 +156,7 @@ Mono> testBodyWithFileSchema( contentType = "application/json" ) Mono> testBodyWithQueryParams( - @RequestParam(value = "query", required = true) String query, + @RequestParam(value = "query") String query, @RequestBody Mono user ); @@ -207,10 +207,10 @@ Mono> testClientModel( contentType = "application/x-www-form-urlencoded" ) Mono> testEndpointParameters( - @RequestPart(value = "number", required = true) BigDecimal number, - @RequestPart(value = "double", required = true) Double _double, - @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, - @RequestPart(value = "byte", required = true) byte[] _byte, + @RequestPart(value = "number") BigDecimal number, + @RequestPart(value = "double") Double _double, + @RequestPart(value = "pattern_without_delimiter") String patternWithoutDelimiter, + @RequestPart(value = "byte") byte[] _byte, @RequestPart(value = "integer", required = false) Integer integer, @RequestPart(value = "int32", required = false) Integer int32, @RequestPart(value = "int64", required = false) Long int64, @@ -246,7 +246,7 @@ Mono> testEndpointParameters( contentType = "application/x-www-form-urlencoded" ) Mono> testEnumParameters( - @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, @@ -275,9 +275,9 @@ Mono> testEnumParameters( accept = { "application/json" } ) Mono> testGroupParameters( - @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @RequestParam(value = "required_string_group") Integer requiredStringGroup, @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, - @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, + @RequestParam(value = "required_int64_group") Long requiredInt64Group, @RequestParam(value = "string_group", required = false) Integer stringGroup, @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup, @RequestParam(value = "int64_group", required = false) Long int64Group @@ -317,8 +317,8 @@ Mono> testInlineAdditionalProperties( contentType = "application/x-www-form-urlencoded" ) Mono> testJsonFormData( - @RequestPart(value = "param", required = true) String param, - @RequestPart(value = "param2", required = true) String param2 + @RequestPart(value = "param") String param, + @RequestPart(value = "param2") String param2 ); @@ -356,10 +356,10 @@ Mono> testNullable( accept = { "application/json" } ) Mono> testQueryParameterCollectionFormat( - @RequestParam(value = "pipe", required = true) List pipe, - @RequestParam(value = "http", required = true) List http, - @RequestParam(value = "url", required = true) List url, - @RequestParam(value = "context", required = true) List context + @RequestParam(value = "pipe") List pipe, + @RequestParam(value = "http") List http, + @RequestParam(value = "url") List url, + @RequestParam(value = "context") List context ); diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/PetApi.java index f165768c5f4c..8891482cbeaf 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/PetApi.java @@ -80,7 +80,7 @@ Mono> deletePet( accept = { "application/json", "application/xml" } ) Mono>> findPetsByStatus( - @RequestParam(value = "status", required = true) List status + @RequestParam(value = "status") List status ); @@ -100,7 +100,7 @@ Mono>> findPetsByStatus( accept = { "application/json", "application/xml" } ) Mono>> findPetsByTags( - @RequestParam(value = "tags", required = true) Set tags + @RequestParam(value = "tags") Set tags ); @@ -221,7 +221,7 @@ Mono> uploadFile( ) Mono> uploadFileWithRequiredFile( @PathVariable("petId") Long petId, - @RequestPart(value = "requiredFile", required = true) Flux requiredFile, + @RequestPart(value = "requiredFile") Flux requiredFile, @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata ); diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/UserApi.java index 1fa32dfb4c34..4290c342bb60 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/UserApi.java @@ -131,8 +131,8 @@ Mono> getUserByName( accept = { "application/json", "application/xml" } ) Mono> loginUser( - @RequestParam(value = "username", required = true) String username, - @RequestParam(value = "password", required = true) String password + @RequestParam(value = "username") String username, + @RequestParam(value = "password") String password ); diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index df092301ae73..d446612be805 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -121,4 +121,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index b93c9c6ff786..34226adaeda2 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -122,4 +122,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 9a2783b21376..535751d0572c 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -121,4 +121,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index e9b3202155f6..ae5ecade1b23 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -26,33 +26,25 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class AdditionalPropertiesClass { - private Map mapString = new HashMap<>(); - private Map mapNumber = new HashMap<>(); - private Map mapInteger = new HashMap<>(); - private Map mapBoolean = new HashMap<>(); - private Map> mapArrayInteger = new HashMap<>(); - private Map> mapArrayAnytype = new HashMap<>(); - private Map> mapMapString = new HashMap<>(); - private Map> mapMapAnytype = new HashMap<>(); private Object anytype1; - private JsonNullable anytype2 = JsonNullable.undefined(); + private JsonNullable anytype2 = JsonNullable.of(null); private Object anytype3; @@ -291,8 +283,8 @@ public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; } - public AdditionalPropertiesClass anytype2(Object anytype2) { - this.anytype2 = JsonNullable.of(anytype2); + public AdditionalPropertiesClass anytype2(JsonNullable anytype2) { + this.anytype2 = anytype2; return this; } @@ -397,4 +389,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 75b7eb0c76e5..d9a11bfcb030 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -121,4 +121,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 0730bf768b45..051d8d0d881a 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -122,4 +122,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 4c901273109c..fc376cdc10c1 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -122,4 +122,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 9d52548cc6b2..aab30087b6d3 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -121,4 +121,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Animal.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Animal.java index 73eab9469593..9c4c626e2f71 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Animal.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Animal.java @@ -125,4 +125,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 1ef137435693..bf3249127a51 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -23,7 +23,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnly { - private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { @@ -90,4 +89,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 43009232fef9..288ffacfe59b 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -23,7 +23,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayOfNumberOnly { - private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnly arrayNumber(List arrayNumber) { @@ -90,4 +89,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ArrayTest.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ArrayTest.java index e8c1bccb3894..fe752dadeb95 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ArrayTest.java @@ -23,13 +23,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayTest { - private List arrayOfString = new ArrayList<>(); - private List> arrayArrayOfInteger = new ArrayList<>(); - private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTest arrayOfString(List arrayOfString) { @@ -154,4 +151,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/BigCat.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/BigCat.java index a6564eae4a2e..2c942996b028 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/BigCat.java @@ -64,7 +64,7 @@ public static KindEnum fromValue(String value) { } } - private KindEnum kind; + private String kind; public BigCat() { super(); @@ -88,7 +88,7 @@ public BigCat kind(KindEnum kind) { */ @JsonProperty("kind") - public KindEnum getKind() { + public String getKind() { return kind; } @@ -150,4 +150,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Capitalization.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Capitalization.java index 806fad288272..bdd3883b62a2 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Capitalization.java @@ -192,4 +192,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Cat.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Cat.java index b044bd58e333..473a56f111b9 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Cat.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Cat.java @@ -113,4 +113,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Category.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Category.java index f75d256ffde0..ac99bb2c5235 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Category.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Category.java @@ -111,4 +111,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ChildWithNullable.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ChildWithNullable.java index a02a96f451f0..616f72eac687 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ChildWithNullable.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ChildWithNullable.java @@ -54,7 +54,7 @@ public ChildWithNullable type(TypeEnum type) { return this; } - public ChildWithNullable nullableProperty(String nullableProperty) { + public ChildWithNullable nullableProperty(JsonNullable nullableProperty) { super.nullableProperty(nullableProperty); return this; } @@ -108,4 +108,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ClassModel.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ClassModel.java index 4797dc899caa..a1f3a01dbbb2 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ClassModel.java @@ -77,4 +77,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Client.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Client.java index 399367857d67..0b34f8e3d19c 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Client.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Client.java @@ -77,4 +77,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ContainerDefaultValue.java index 10b3b2ab7144..037ff343d6ba 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ContainerDefaultValue.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -24,17 +24,13 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ContainerDefaultValue { - - private JsonNullable> nullableArray = JsonNullable.>undefined(); + private JsonNullable> nullableArray = JsonNullable.undefined(); - - private JsonNullable> nullableRequiredArray = JsonNullable.>undefined(); + private JsonNullable> nullableRequiredArray = JsonNullable.undefined(); - private List requiredArray = new ArrayList<>(); - - private JsonNullable> nullableArrayWithDefault = JsonNullable.>undefined(); + private JsonNullable> nullableArrayWithDefault = JsonNullable.of(new ArrayList<>(Arrays.asList("foo", "bar"))); public ContainerDefaultValue() { super(); @@ -43,13 +39,13 @@ public ContainerDefaultValue() { /** * Constructor with only required parameters */ - public ContainerDefaultValue(List nullableRequiredArray, List requiredArray) { - this.nullableRequiredArray = JsonNullable.of(nullableRequiredArray); + public ContainerDefaultValue(JsonNullable> nullableRequiredArray, List requiredArray) { + this.nullableRequiredArray = nullableRequiredArray; this.requiredArray = requiredArray; } - public ContainerDefaultValue nullableArray(List nullableArray) { - this.nullableArray = JsonNullable.of(nullableArray); + public ContainerDefaultValue nullableArray(JsonNullable> nullableArray) { + this.nullableArray = nullableArray; return this; } @@ -75,8 +71,8 @@ public void setNullableArray(JsonNullable> nullableArray) { this.nullableArray = nullableArray; } - public ContainerDefaultValue nullableRequiredArray(List nullableRequiredArray) { - this.nullableRequiredArray = JsonNullable.of(nullableRequiredArray); + public ContainerDefaultValue nullableRequiredArray(JsonNullable> nullableRequiredArray) { + this.nullableRequiredArray = nullableRequiredArray; return this; } @@ -129,8 +125,8 @@ public void setRequiredArray(List requiredArray) { this.requiredArray = requiredArray; } - public ContainerDefaultValue nullableArrayWithDefault(List nullableArrayWithDefault) { - this.nullableArrayWithDefault = JsonNullable.of(nullableArrayWithDefault); + public ContainerDefaultValue nullableArrayWithDefault(JsonNullable> nullableArrayWithDefault) { + this.nullableArrayWithDefault = nullableArrayWithDefault; return this; } @@ -210,4 +206,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Dog.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Dog.java index ed45a165acc9..a4b6cc2cefde 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Dog.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Dog.java @@ -105,4 +105,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/EnumArrays.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/EnumArrays.java index 38e8cd6ecc80..71a3d6840d7c 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/EnumArrays.java @@ -58,7 +58,7 @@ public static JustSymbolEnum fromValue(String value) { } } - private JustSymbolEnum justSymbol; + private String justSymbol; /** * Gets or Sets arrayEnum @@ -95,8 +95,7 @@ public static ArrayEnumEnum fromValue(String value) { } } - - private List arrayEnum = new ArrayList<>(); + private List arrayEnum = new ArrayList<>(); public EnumArrays justSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; @@ -109,7 +108,7 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { */ @JsonProperty("just_symbol") - public JustSymbolEnum getJustSymbol() { + public String getJustSymbol() { return justSymbol; } @@ -136,7 +135,7 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { */ @JsonProperty("array_enum") - public List getArrayEnum() { + public List getArrayEnum() { return arrayEnum; } @@ -183,4 +182,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/EnumTest.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/EnumTest.java index 9eb19885cad6..acef6bad3a93 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/EnumTest.java @@ -60,7 +60,7 @@ public static EnumStringEnum fromValue(String value) { } } - private EnumStringEnum enumString; + private String enumString; /** * Gets or Sets enumStringRequired @@ -99,7 +99,7 @@ public static EnumStringRequiredEnum fromValue(String value) { } } - private EnumStringRequiredEnum enumStringRequired; + private String enumStringRequired; /** * Gets or Sets enumInteger @@ -136,7 +136,7 @@ public static EnumIntegerEnum fromValue(Integer value) { } } - private EnumIntegerEnum enumInteger; + private Integer enumInteger; /** * Gets or Sets enumNumber @@ -173,7 +173,7 @@ public static EnumNumberEnum fromValue(Double value) { } } - private EnumNumberEnum enumNumber; + private Double enumNumber; private OuterEnum outerEnum; @@ -199,7 +199,7 @@ public EnumTest enumString(EnumStringEnum enumString) { */ @JsonProperty("enum_string") - public EnumStringEnum getEnumString() { + public String getEnumString() { return enumString; } @@ -218,7 +218,7 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { */ @NotNull @JsonProperty("enum_string_required") - public EnumStringRequiredEnum getEnumStringRequired() { + public String getEnumStringRequired() { return enumStringRequired; } @@ -237,7 +237,7 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { */ @JsonProperty("enum_integer") - public EnumIntegerEnum getEnumInteger() { + public Integer getEnumInteger() { return enumInteger; } @@ -256,7 +256,7 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { */ @JsonProperty("enum_number") - public EnumNumberEnum getEnumNumber() { + public Double getEnumNumber() { return enumNumber; } @@ -328,4 +328,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/File.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/File.java index 6f9ffb2fb646..63aa65114c58 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/File.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/File.java @@ -77,4 +77,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 0455d17ddd0c..3d6804d2fcf8 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -25,7 +25,6 @@ public class FileSchemaTestClass { private File file; - private List files = new ArrayList<>(); public FileSchemaTestClass file(File file) { @@ -113,4 +112,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/FormatTest.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/FormatTest.java index cac885fbf34c..1fdba6f1db69 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/FormatTest.java @@ -410,4 +410,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 78f6ee6c920a..e6fd53a0878f 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -102,4 +102,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/MapTest.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/MapTest.java index 11dc14b9ef03..e1ef31dedc20 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/MapTest.java @@ -22,7 +22,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class MapTest { - private Map> mapMapOfString = new HashMap<>(); /** @@ -60,13 +59,10 @@ public static InnerEnum fromValue(String value) { } } - - private Map mapOfEnumString = new HashMap<>(); + private Map mapOfEnumString = new HashMap<>(); - private Map directMap = new HashMap<>(); - private Map indirectMap = new HashMap<>(); public MapTest mapMapOfString(Map> mapMapOfString) { @@ -115,7 +111,7 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) */ @JsonProperty("map_of_enum_string") - public Map getMapOfEnumString() { + public Map getMapOfEnumString() { return mapOfEnumString; } @@ -220,4 +216,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 182c14d73b2f..db0f53db13a3 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -30,7 +30,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; - private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { @@ -139,4 +138,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Model200Response.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Model200Response.java index 85a8cac0df6b..451b570e1ddd 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Model200Response.java @@ -102,4 +102,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ModelApiResponse.java index dcc603529c28..4f2890042d50 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -125,4 +125,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ModelList.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ModelList.java index afaf79c85fd0..24b7aa845bcf 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ModelList.java @@ -79,4 +79,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ModelReturn.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ModelReturn.java index 4800936be7e1..b2d1681810c0 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ModelReturn.java @@ -79,4 +79,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Name.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Name.java index afd43164dea2..020a270d769d 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Name.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Name.java @@ -157,4 +157,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/NullableMapProperty.java index 2da4996f1c11..1c3ce5b4830a 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/NullableMapProperty.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -24,11 +24,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class NullableMapProperty { - - private JsonNullable> languageValues = JsonNullable.>undefined(); + private JsonNullable> languageValues = JsonNullable.undefined(); - public NullableMapProperty languageValues(Map languageValues) { - this.languageValues = JsonNullable.of(languageValues); + public NullableMapProperty languageValues(JsonNullable> languageValues) { + this.languageValues = languageValues; return this; } @@ -102,4 +101,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/NumberOnly.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/NumberOnly.java index d1a81cc9db25..23e7bac81531 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/NumberOnly.java @@ -78,4 +78,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Order.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Order.java index 1d2078b84f89..f8c9774bc501 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Order.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Order.java @@ -68,7 +68,7 @@ public static StatusEnum fromValue(String value) { } } - private StatusEnum status; + private String status; private Boolean complete = false; @@ -159,7 +159,7 @@ public Order status(StatusEnum status) { */ @JsonProperty("status") - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -233,4 +233,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/OuterComposite.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/OuterComposite.java index cb86ec2a2376..6fff6df2fc07 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/OuterComposite.java @@ -124,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ParentWithNullable.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ParentWithNullable.java index 261315a07531..13d74ed3eeb0 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ParentWithNullable.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ParentWithNullable.java @@ -68,9 +68,9 @@ public static TypeEnum fromValue(String value) { } } - private TypeEnum type; + private String type; - private JsonNullable nullableProperty = JsonNullable.undefined(); + private JsonNullable nullableProperty = JsonNullable.undefined(); public ParentWithNullable type(TypeEnum type) { this.type = type; @@ -83,7 +83,7 @@ public ParentWithNullable type(TypeEnum type) { */ @JsonProperty("type") - public TypeEnum getType() { + public String getType() { return type; } @@ -91,8 +91,8 @@ public void setType(TypeEnum type) { this.type = type; } - public ParentWithNullable nullableProperty(String nullableProperty) { - this.nullableProperty = JsonNullable.of(nullableProperty); + public ParentWithNullable nullableProperty(JsonNullable nullableProperty) { + this.nullableProperty = nullableProperty; return this; } @@ -160,4 +160,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Pet.java index dc126626846a..47358c6acaa4 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Pet.java @@ -34,10 +34,8 @@ public class Pet { private String name; - private Set photoUrls = new LinkedHashSet<>(); - private List tags = new ArrayList<>(); /** @@ -78,7 +76,7 @@ public static StatusEnum fromValue(String value) { } @Deprecated - private StatusEnum status; + private String status; public Pet() { super(); @@ -217,7 +215,7 @@ public Pet status(StatusEnum status) { @JsonProperty("status") @Deprecated - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -276,4 +274,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ReadOnlyFirst.java index cfcbd385a322..244cdda17536 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -100,4 +100,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java index 27d0eea94eda..4dc11c168c91 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java @@ -146,4 +146,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/SpecialModelName.java index badda51e5aba..9a7d877a55e5 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/SpecialModelName.java @@ -79,4 +79,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Tag.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Tag.java index b033da3874c6..f77d50efe9cf 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Tag.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Tag.java @@ -100,4 +100,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java index 2610c57ed2e5..57408dad29e6 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -31,7 +31,6 @@ public class TypeHolderDefault { private Boolean boolItem = true; - private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); public TypeHolderDefault() { @@ -197,4 +196,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java index 91e6f4853608..078bfe6662a3 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -33,7 +33,6 @@ public class TypeHolderExample { private Boolean boolItem; - private List arrayItem = new ArrayList<>(); public TypeHolderExample() { @@ -221,4 +220,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/User.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/User.java index ddbbdc49a0fd..6d2b75fc7d29 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/User.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/User.java @@ -238,4 +238,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/XmlItem.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/XmlItem.java index 4688dd6eb45e..31e07b39398c 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/XmlItem.java @@ -31,7 +31,6 @@ public class XmlItem { private Boolean attributeBoolean; - private List wrappedArray = new ArrayList<>(); private String nameString; @@ -42,10 +41,8 @@ public class XmlItem { private Boolean nameBoolean; - private List nameArray = new ArrayList<>(); - private List nameWrappedArray = new ArrayList<>(); private String prefixString; @@ -56,10 +53,8 @@ public class XmlItem { private Boolean prefixBoolean; - private List prefixArray = new ArrayList<>(); - private List prefixWrappedArray = new ArrayList<>(); private String namespaceString; @@ -70,10 +65,8 @@ public class XmlItem { private Boolean namespaceBoolean; - private List namespaceArray = new ArrayList<>(); - private List namespaceWrappedArray = new ArrayList<>(); private String prefixNsString; @@ -84,10 +77,8 @@ public class XmlItem { private Boolean prefixNsBoolean; - private List prefixNsArray = new ArrayList<>(); - private List prefixNsWrappedArray = new ArrayList<>(); public XmlItem attributeString(String attributeString) { @@ -806,4 +797,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/FakeApi.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/FakeApi.java index 4809f9b6fbba..6a7208b5be41 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/FakeApi.java @@ -152,7 +152,7 @@ ResponseEntity testBodyWithFileSchema( contentType = "application/json" ) ResponseEntity testBodyWithQueryParams( - @RequestParam(value = "query", required = true) String query, + @RequestParam(value = "query") String query, @RequestBody UserDto userDto ); @@ -203,10 +203,10 @@ ResponseEntity testClientModel( contentType = "application/x-www-form-urlencoded" ) ResponseEntity testEndpointParameters( - @RequestParam(value = "number", required = true) BigDecimal number, - @RequestParam(value = "double", required = true) Double _double, - @RequestParam(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, - @RequestParam(value = "byte", required = true) byte[] _byte, + @RequestParam(value = "number") BigDecimal number, + @RequestParam(value = "double") Double _double, + @RequestParam(value = "pattern_without_delimiter") String patternWithoutDelimiter, + @RequestParam(value = "byte") byte[] _byte, @RequestParam(value = "integer", required = false) Integer integer, @RequestParam(value = "int32", required = false) Integer int32, @RequestParam(value = "int64", required = false) Long int64, @@ -242,7 +242,7 @@ ResponseEntity testEndpointParameters( contentType = "application/x-www-form-urlencoded" ) ResponseEntity testEnumParameters( - @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, @@ -271,9 +271,9 @@ ResponseEntity testEnumParameters( accept = { "application/json" } ) ResponseEntity testGroupParameters( - @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @RequestParam(value = "required_string_group") Integer requiredStringGroup, @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, - @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, + @RequestParam(value = "required_int64_group") Long requiredInt64Group, @RequestParam(value = "string_group", required = false) Integer stringGroup, @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup, @RequestParam(value = "int64_group", required = false) Long int64Group @@ -313,8 +313,8 @@ ResponseEntity testInlineAdditionalProperties( contentType = "application/x-www-form-urlencoded" ) ResponseEntity testJsonFormData( - @RequestParam(value = "param", required = true) String param, - @RequestParam(value = "param2", required = true) String param2 + @RequestParam(value = "param") String param, + @RequestParam(value = "param2") String param2 ); @@ -352,10 +352,10 @@ ResponseEntity testNullable( accept = { "application/json" } ) ResponseEntity testQueryParameterCollectionFormat( - @RequestParam(value = "pipe", required = true) List pipe, - @RequestParam(value = "http", required = true) List http, - @RequestParam(value = "url", required = true) List url, - @RequestParam(value = "context", required = true) List context + @RequestParam(value = "pipe") List pipe, + @RequestParam(value = "http") List http, + @RequestParam(value = "url") List url, + @RequestParam(value = "context") List context ); diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/PetApi.java index fe490a20f7c3..da215d1de9b2 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/PetApi.java @@ -76,7 +76,7 @@ ResponseEntity deletePet( accept = { "application/json", "application/xml" } ) ResponseEntity> findPetsByStatus( - @RequestParam(value = "status", required = true) List status + @RequestParam(value = "status") List status ); @@ -96,7 +96,7 @@ ResponseEntity> findPetsByStatus( accept = { "application/json", "application/xml" } ) ResponseEntity> findPetsByTags( - @RequestParam(value = "tags", required = true) Set tags + @RequestParam(value = "tags") Set tags ); @@ -217,7 +217,7 @@ ResponseEntity uploadFile( ) ResponseEntity uploadFileWithRequiredFile( @PathVariable("petId") Long petId, - @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, + @RequestPart(value = "requiredFile") MultipartFile requiredFile, @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata ); diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/UserApi.java index 187614127b32..87d87dcfca46 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/UserApi.java @@ -127,8 +127,8 @@ ResponseEntity getUserByName( accept = { "application/json", "application/xml" } ) ResponseEntity loginUser( - @RequestParam(value = "username", required = true) String username, - @RequestParam(value = "password", required = true) String password + @RequestParam(value = "username") String username, + @RequestParam(value = "password") String password ); diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/AdditionalPropertiesAnyTypeDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/AdditionalPropertiesAnyTypeDto.java index 64000f13ddbc..a624041c6b82 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/AdditionalPropertiesAnyTypeDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/AdditionalPropertiesAnyTypeDto.java @@ -123,4 +123,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/AdditionalPropertiesArrayDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/AdditionalPropertiesArrayDto.java index eda46f099c75..adadac0413d6 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/AdditionalPropertiesArrayDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/AdditionalPropertiesArrayDto.java @@ -124,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/AdditionalPropertiesBooleanDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/AdditionalPropertiesBooleanDto.java index 3fba9c5dbb09..e272d689f849 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/AdditionalPropertiesBooleanDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/AdditionalPropertiesBooleanDto.java @@ -123,4 +123,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java index 3928b3fa25a5..5057317101bc 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java @@ -28,33 +28,25 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class AdditionalPropertiesClassDto { - private Map mapString = new HashMap<>(); - private Map mapNumber = new HashMap<>(); - private Map mapInteger = new HashMap<>(); - private Map mapBoolean = new HashMap<>(); - private Map> mapArrayInteger = new HashMap<>(); - private Map> mapArrayAnytype = new HashMap<>(); - private Map> mapMapString = new HashMap<>(); - private Map> mapMapAnytype = new HashMap<>(); private Object anytype1; - private JsonNullable anytype2 = JsonNullable.undefined(); + private JsonNullable anytype2 = JsonNullable.of(null); private Object anytype3; @@ -293,8 +285,8 @@ public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; } - public AdditionalPropertiesClassDto anytype2(Object anytype2) { - this.anytype2 = JsonNullable.of(anytype2); + public AdditionalPropertiesClassDto anytype2(JsonNullable anytype2) { + this.anytype2 = anytype2; return this; } @@ -399,4 +391,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/AdditionalPropertiesIntegerDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/AdditionalPropertiesIntegerDto.java index ef1abf3fc9d9..0a05f489e396 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/AdditionalPropertiesIntegerDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/AdditionalPropertiesIntegerDto.java @@ -123,4 +123,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/AdditionalPropertiesNumberDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/AdditionalPropertiesNumberDto.java index 51a4c6607ee4..e50a1b49ccc4 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/AdditionalPropertiesNumberDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/AdditionalPropertiesNumberDto.java @@ -124,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/AdditionalPropertiesObjectDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/AdditionalPropertiesObjectDto.java index f84b1e288c52..9f85fa506226 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/AdditionalPropertiesObjectDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/AdditionalPropertiesObjectDto.java @@ -124,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/AdditionalPropertiesStringDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/AdditionalPropertiesStringDto.java index 03c2267cd0d5..2b8cedb0381f 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/AdditionalPropertiesStringDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/AdditionalPropertiesStringDto.java @@ -123,4 +123,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/AnimalDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/AnimalDto.java index 19d86586871e..de5e95751ea8 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/AnimalDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/AnimalDto.java @@ -119,4 +119,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ApiResponseDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ApiResponseDto.java index 506ac6be5074..c7d1a9d1168b 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ApiResponseDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ApiResponseDto.java @@ -125,4 +125,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java index 29fa007289ab..80156f9fcbe5 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnlyDto { - private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnlyDto arrayArrayNumber(List> arrayArrayNumber) { @@ -92,4 +91,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java index a0e9a01eca6c..dab486f9972e 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayOfNumberOnlyDto { - private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnlyDto arrayNumber(List arrayNumber) { @@ -92,4 +91,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ArrayTestDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ArrayTestDto.java index 20f8e9a0fc25..cd6e9757d1b1 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ArrayTestDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ArrayTestDto.java @@ -25,13 +25,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayTestDto { - private List arrayOfString = new ArrayList<>(); - private List> arrayArrayOfInteger = new ArrayList<>(); - private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTestDto arrayOfString(List arrayOfString) { @@ -156,4 +153,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/BigCatDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/BigCatDto.java index 1322fdef0d7a..74d4edebe1ad 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/BigCatDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/BigCatDto.java @@ -66,7 +66,7 @@ public static KindEnum fromValue(String value) { } } - private KindEnum kind; + private String kind; public BigCatDto() { super(); @@ -83,7 +83,7 @@ public BigCatDto kind(KindEnum kind) { */ @JsonProperty("kind") - public KindEnum getKind() { + public String getKind() { return kind; } @@ -145,4 +145,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/CapitalizationDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/CapitalizationDto.java index f757af27cf81..4883a8aaea18 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/CapitalizationDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/CapitalizationDto.java @@ -194,4 +194,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/CatDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/CatDto.java index 76ccc1ea1346..013a19a3bcb9 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/CatDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/CatDto.java @@ -107,4 +107,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/CategoryDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/CategoryDto.java index 7138ae2c99c2..8796b19a8731 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/CategoryDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/CategoryDto.java @@ -106,4 +106,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ChildWithNullableDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ChildWithNullableDto.java index 8b067555e118..1b11d306a1d3 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ChildWithNullableDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ChildWithNullableDto.java @@ -56,7 +56,7 @@ public ChildWithNullableDto type(TypeEnum type) { return this; } - public ChildWithNullableDto nullableProperty(String nullableProperty) { + public ChildWithNullableDto nullableProperty(JsonNullable nullableProperty) { super.nullableProperty(nullableProperty); return this; } @@ -110,4 +110,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ClassModelDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ClassModelDto.java index ca6b9e279504..bf2b62f48c8f 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ClassModelDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ClassModelDto.java @@ -79,4 +79,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ClientDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ClientDto.java index b8a41181961c..1ec96b26679c 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ClientDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ClientDto.java @@ -79,4 +79,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java index b2f502e50219..7ad2a676817b 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java @@ -26,24 +26,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ContainerDefaultValueDto { - - private JsonNullable> nullableArray = JsonNullable.>undefined(); + private JsonNullable> nullableArray = JsonNullable.undefined(); - - private JsonNullable> nullableRequiredArray = JsonNullable.>undefined(); + private JsonNullable> nullableRequiredArray = JsonNullable.undefined(); - private List requiredArray = new ArrayList<>(); - - private JsonNullable> nullableArrayWithDefault = JsonNullable.>undefined(); + private JsonNullable> nullableArrayWithDefault = JsonNullable.of(new ArrayList<>(Arrays.asList("foo", "bar"))); public ContainerDefaultValueDto() { super(); } - public ContainerDefaultValueDto nullableArray(List nullableArray) { - this.nullableArray = JsonNullable.of(nullableArray); + public ContainerDefaultValueDto nullableArray(JsonNullable> nullableArray) { + this.nullableArray = nullableArray; return this; } @@ -69,8 +65,8 @@ public void setNullableArray(JsonNullable> nullableArray) { this.nullableArray = nullableArray; } - public ContainerDefaultValueDto nullableRequiredArray(List nullableRequiredArray) { - this.nullableRequiredArray = JsonNullable.of(nullableRequiredArray); + public ContainerDefaultValueDto nullableRequiredArray(JsonNullable> nullableRequiredArray) { + this.nullableRequiredArray = nullableRequiredArray; return this; } @@ -123,8 +119,8 @@ public void setRequiredArray(List requiredArray) { this.requiredArray = requiredArray; } - public ContainerDefaultValueDto nullableArrayWithDefault(List nullableArrayWithDefault) { - this.nullableArrayWithDefault = JsonNullable.of(nullableArrayWithDefault); + public ContainerDefaultValueDto nullableArrayWithDefault(JsonNullable> nullableArrayWithDefault) { + this.nullableArrayWithDefault = nullableArrayWithDefault; return this; } @@ -204,4 +200,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/DogDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/DogDto.java index 302cc0b52884..85ac7bc552ac 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/DogDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/DogDto.java @@ -100,4 +100,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/EnumArraysDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/EnumArraysDto.java index 71c9676673fb..3b1165c7a58b 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/EnumArraysDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/EnumArraysDto.java @@ -60,7 +60,7 @@ public static JustSymbolEnum fromValue(String value) { } } - private JustSymbolEnum justSymbol; + private String justSymbol; /** * Gets or Sets arrayEnum @@ -97,8 +97,7 @@ public static ArrayEnumEnum fromValue(String value) { } } - - private List arrayEnum = new ArrayList<>(); + private List arrayEnum = new ArrayList<>(); public EnumArraysDto justSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; @@ -111,7 +110,7 @@ public EnumArraysDto justSymbol(JustSymbolEnum justSymbol) { */ @JsonProperty("just_symbol") - public JustSymbolEnum getJustSymbol() { + public String getJustSymbol() { return justSymbol; } @@ -138,7 +137,7 @@ public EnumArraysDto addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { */ @JsonProperty("array_enum") - public List getArrayEnum() { + public List getArrayEnum() { return arrayEnum; } @@ -185,4 +184,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/EnumTestDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/EnumTestDto.java index 6e09ab8baedd..9aba6d131576 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/EnumTestDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/EnumTestDto.java @@ -60,7 +60,7 @@ public static EnumStringEnum fromValue(String value) { } } - private EnumStringEnum enumString; + private String enumString; /** * Gets or Sets enumStringRequired @@ -99,7 +99,7 @@ public static EnumStringRequiredEnum fromValue(String value) { } } - private EnumStringRequiredEnum enumStringRequired; + private String enumStringRequired; /** * Gets or Sets enumInteger @@ -136,7 +136,7 @@ public static EnumIntegerEnum fromValue(Integer value) { } } - private EnumIntegerEnum enumInteger; + private Integer enumInteger; /** * Gets or Sets enumNumber @@ -173,7 +173,7 @@ public static EnumNumberEnum fromValue(Double value) { } } - private EnumNumberEnum enumNumber; + private Double enumNumber; private OuterEnumDto outerEnum; @@ -192,7 +192,7 @@ public EnumTestDto enumString(EnumStringEnum enumString) { */ @JsonProperty("enum_string") - public EnumStringEnum getEnumString() { + public String getEnumString() { return enumString; } @@ -211,7 +211,7 @@ public EnumTestDto enumStringRequired(EnumStringRequiredEnum enumStringRequired) */ @NotNull @JsonProperty("enum_string_required") - public EnumStringRequiredEnum getEnumStringRequired() { + public String getEnumStringRequired() { return enumStringRequired; } @@ -230,7 +230,7 @@ public EnumTestDto enumInteger(EnumIntegerEnum enumInteger) { */ @JsonProperty("enum_integer") - public EnumIntegerEnum getEnumInteger() { + public Integer getEnumInteger() { return enumInteger; } @@ -249,7 +249,7 @@ public EnumTestDto enumNumber(EnumNumberEnum enumNumber) { */ @JsonProperty("enum_number") - public EnumNumberEnum getEnumNumber() { + public Double getEnumNumber() { return enumNumber; } @@ -321,4 +321,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/FileDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/FileDto.java index 6df2206c13b0..be2cb6494aea 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/FileDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/FileDto.java @@ -79,4 +79,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java index 7ca51e5796d2..9e8084802003 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java @@ -27,7 +27,6 @@ public class FileSchemaTestClassDto { private FileDto file; - private List files = new ArrayList<>(); public FileSchemaTestClassDto file(FileDto file) { @@ -115,4 +114,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/FormatTestDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/FormatTestDto.java index 40b8ed14ef41..19ba1233d72c 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/FormatTestDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/FormatTestDto.java @@ -400,4 +400,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/HasOnlyReadOnlyDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/HasOnlyReadOnlyDto.java index b47c9477c22d..397d98813ae0 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/HasOnlyReadOnlyDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/HasOnlyReadOnlyDto.java @@ -102,4 +102,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ListDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ListDto.java index 58bbe2b4aa70..772132b56654 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ListDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ListDto.java @@ -79,4 +79,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/MapTestDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/MapTestDto.java index de0a0eb211e0..c20c196704f6 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/MapTestDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/MapTestDto.java @@ -24,7 +24,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class MapTestDto { - private Map> mapMapOfString = new HashMap<>(); /** @@ -62,13 +61,10 @@ public static InnerEnum fromValue(String value) { } } - - private Map mapOfEnumString = new HashMap<>(); + private Map mapOfEnumString = new HashMap<>(); - private Map directMap = new HashMap<>(); - private Map indirectMap = new HashMap<>(); public MapTestDto mapMapOfString(Map> mapMapOfString) { @@ -117,7 +113,7 @@ public MapTestDto putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringIt */ @JsonProperty("map_of_enum_string") - public Map getMapOfEnumString() { + public Map getMapOfEnumString() { return mapOfEnumString; } @@ -222,4 +218,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java index 9bf0388b26ea..d7c14fd5a733 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java @@ -32,7 +32,6 @@ public class MixedPropertiesAndAdditionalPropertiesClassDto { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; - private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClassDto uuid(UUID uuid) { @@ -141,4 +140,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/Model200ResponseDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/Model200ResponseDto.java index 854c0700238d..3d46aafb05f0 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/Model200ResponseDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/Model200ResponseDto.java @@ -102,4 +102,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/NameDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/NameDto.java index ff4868b773fe..02e40ce5878e 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/NameDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/NameDto.java @@ -152,4 +152,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/NullableMapPropertyDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/NullableMapPropertyDto.java index fecd09830263..c56a52ec286e 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/NullableMapPropertyDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/NullableMapPropertyDto.java @@ -26,11 +26,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class NullableMapPropertyDto { - - private JsonNullable> languageValues = JsonNullable.>undefined(); + private JsonNullable> languageValues = JsonNullable.undefined(); - public NullableMapPropertyDto languageValues(Map languageValues) { - this.languageValues = JsonNullable.of(languageValues); + public NullableMapPropertyDto languageValues(JsonNullable> languageValues) { + this.languageValues = languageValues; return this; } @@ -104,4 +103,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/NumberOnlyDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/NumberOnlyDto.java index 50020ee36d23..1189f5467477 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/NumberOnlyDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/NumberOnlyDto.java @@ -80,4 +80,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/OrderDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/OrderDto.java index de9282033424..ecb218e1e7be 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/OrderDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/OrderDto.java @@ -70,7 +70,7 @@ public static StatusEnum fromValue(String value) { } } - private StatusEnum status; + private String status; private Boolean complete = false; @@ -161,7 +161,7 @@ public OrderDto status(StatusEnum status) { */ @JsonProperty("status") - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -235,4 +235,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/OuterCompositeDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/OuterCompositeDto.java index 6e55042b80f5..8f4a0f18095a 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/OuterCompositeDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/OuterCompositeDto.java @@ -126,4 +126,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ParentWithNullableDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ParentWithNullableDto.java index 4ee7d5f372bf..e03ecb2366bc 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ParentWithNullableDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ParentWithNullableDto.java @@ -69,9 +69,9 @@ public static TypeEnum fromValue(String value) { } } - private TypeEnum type; + private String type; - private JsonNullable nullableProperty = JsonNullable.undefined(); + private JsonNullable nullableProperty = JsonNullable.undefined(); public ParentWithNullableDto type(TypeEnum type) { this.type = type; @@ -84,7 +84,7 @@ public ParentWithNullableDto type(TypeEnum type) { */ @JsonProperty("type") - public TypeEnum getType() { + public String getType() { return type; } @@ -92,8 +92,8 @@ public void setType(TypeEnum type) { this.type = type; } - public ParentWithNullableDto nullableProperty(String nullableProperty) { - this.nullableProperty = JsonNullable.of(nullableProperty); + public ParentWithNullableDto nullableProperty(JsonNullable nullableProperty) { + this.nullableProperty = nullableProperty; return this; } @@ -161,4 +161,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/PetDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/PetDto.java index af18c40d5c1d..720c65a9dfc3 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/PetDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/PetDto.java @@ -36,10 +36,8 @@ public class PetDto { private String name; - private Set photoUrls = new LinkedHashSet<>(); - private List tags = new ArrayList<>(); /** @@ -80,7 +78,7 @@ public static StatusEnum fromValue(String value) { } @Deprecated - private StatusEnum status; + private String status; public PetDto() { super(); @@ -211,7 +209,7 @@ public PetDto status(StatusEnum status) { @JsonProperty("status") @Deprecated - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -270,4 +268,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ReadOnlyFirstDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ReadOnlyFirstDto.java index 169c007096e9..2da0e8b06f9e 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ReadOnlyFirstDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ReadOnlyFirstDto.java @@ -102,4 +102,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNamesDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNamesDto.java index 00651566c82f..1e71cc523ff0 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNamesDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNamesDto.java @@ -148,4 +148,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ReturnDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ReturnDto.java index 681e8a02a248..a83c1312eebf 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ReturnDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ReturnDto.java @@ -79,4 +79,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/SpecialModelNameDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/SpecialModelNameDto.java index 8cc663abf832..4aa8419e0cde 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/SpecialModelNameDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/SpecialModelNameDto.java @@ -79,4 +79,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/TagDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/TagDto.java index 61087193c1d4..233597f4116c 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/TagDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/TagDto.java @@ -102,4 +102,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java index a40732c4e1c3..83423d751d72 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java @@ -33,7 +33,6 @@ public class TypeHolderDefaultDto { private Boolean boolItem = true; - private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); public TypeHolderDefaultDto() { @@ -188,4 +187,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/TypeHolderExampleDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/TypeHolderExampleDto.java index 574042feefbf..f7433326ea9f 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/TypeHolderExampleDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/TypeHolderExampleDto.java @@ -35,7 +35,6 @@ public class TypeHolderExampleDto { private Boolean boolItem; - private List arrayItem = new ArrayList<>(); public TypeHolderExampleDto() { @@ -211,4 +210,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/UserDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/UserDto.java index 30a394bfd1a4..2be1145585f4 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/UserDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/UserDto.java @@ -240,4 +240,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/XmlItemDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/XmlItemDto.java index 819675e5dc73..054f1c7a6485 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/XmlItemDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/XmlItemDto.java @@ -33,7 +33,6 @@ public class XmlItemDto { private Boolean attributeBoolean; - private List wrappedArray = new ArrayList<>(); private String nameString; @@ -44,10 +43,8 @@ public class XmlItemDto { private Boolean nameBoolean; - private List nameArray = new ArrayList<>(); - private List nameWrappedArray = new ArrayList<>(); private String prefixString; @@ -58,10 +55,8 @@ public class XmlItemDto { private Boolean prefixBoolean; - private List prefixArray = new ArrayList<>(); - private List prefixWrappedArray = new ArrayList<>(); private String namespaceString; @@ -72,10 +67,8 @@ public class XmlItemDto { private Boolean namespaceBoolean; - private List namespaceArray = new ArrayList<>(); - private List namespaceWrappedArray = new ArrayList<>(); private String prefixNsString; @@ -86,10 +79,8 @@ public class XmlItemDto { private Boolean prefixNsBoolean; - private List prefixNsArray = new ArrayList<>(); - private List prefixNsWrappedArray = new ArrayList<>(); public XmlItemDto attributeString(String attributeString) { @@ -808,4 +799,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/PetApi.java index 1fc8b1c47628..e5d93c40d5cc 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/PetApi.java @@ -42,7 +42,7 @@ public interface PetApi { ) ResponseEntity addPet( - @Valid @RequestBody Pet pet + @RequestBody @NotNull @Valid Pet pet ); @@ -60,7 +60,7 @@ ResponseEntity addPet( ) ResponseEntity deletePet( - @PathVariable("petId") Long petId, + @PathVariable("petId") @NotNull Long petId, @RequestHeader(value = "api_key", required = false) Optional apiKey ); @@ -80,7 +80,7 @@ ResponseEntity deletePet( ) ResponseEntity> findPetsByStatus( - @NotNull @Valid @RequestParam(value = "status", required = true) @Deprecated List status + @RequestParam(value = "status") @Deprecated @NotNull List> status ); @@ -101,7 +101,7 @@ ResponseEntity> findPetsByStatus( ) ResponseEntity> findPetsByTags( - @NotNull @Valid @RequestParam(value = "tags", required = true) List tags + @RequestParam(value = "tags") @NotNull List> tags ); @@ -121,7 +121,7 @@ ResponseEntity> findPetsByTags( ) ResponseEntity getPetById( - @PathVariable("petId") Long petId + @PathVariable("petId") @NotNull Long petId ); @@ -145,7 +145,7 @@ ResponseEntity getPetById( ) ResponseEntity updatePet( - @Valid @RequestBody Pet pet + @RequestBody @NotNull @Valid Pet pet ); @@ -165,9 +165,9 @@ ResponseEntity updatePet( ) ResponseEntity updatePetWithForm( - @PathVariable("petId") Long petId, - @Valid @RequestParam(value = "name", required = false) String name, - @Valid @RequestParam(value = "status", required = false) String status + @PathVariable("petId") @NotNull Long petId, + @RequestParam(value = "name", required = false) Optional name, + @RequestParam(value = "status", required = false) Optional status ); @@ -188,8 +188,8 @@ ResponseEntity updatePetWithForm( ) ResponseEntity uploadFile( - @PathVariable("petId") Long petId, - @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, + @PathVariable("petId") @NotNull Long petId, + @RequestParam(value = "additionalMetadata", required = false) Optional additionalMetadata, @RequestPart(value = "file", required = false) MultipartFile file ); diff --git a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/StoreApi.java index 60949e3335ac..ba5df2c61a1a 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/StoreApi.java @@ -40,7 +40,7 @@ public interface StoreApi { ) ResponseEntity deleteOrder( - @PathVariable("orderId") String orderId + @PathVariable("orderId") @NotNull String orderId ); @@ -77,7 +77,7 @@ ResponseEntity> getInventory( ) ResponseEntity getOrderById( - @Min(1L) @Max(5L) @PathVariable("orderId") Long orderId + @PathVariable("orderId") @NotNull @Min(1L) @Max(5L) Long orderId ); @@ -97,7 +97,7 @@ ResponseEntity getOrderById( ) ResponseEntity placeOrder( - @Valid @RequestBody Order order + @RequestBody @NotNull @Valid Order order ); } diff --git a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/UserApi.java index f328d4600db6..c9cac0423e62 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/UserApi.java @@ -40,7 +40,7 @@ public interface UserApi { ) ResponseEntity createUser( - @Valid @RequestBody User user + @RequestBody @NotNull @Valid User user ); @@ -58,7 +58,7 @@ ResponseEntity createUser( ) ResponseEntity createUsersWithArrayInput( - @Valid @RequestBody List<@Valid User> user + @RequestBody @NotNull List> user ); @@ -76,7 +76,7 @@ ResponseEntity createUsersWithArrayInput( ) ResponseEntity createUsersWithListInput( - @Valid @RequestBody List<@Valid User> user + @RequestBody @NotNull List> user ); @@ -94,7 +94,7 @@ ResponseEntity createUsersWithListInput( ) ResponseEntity deleteUser( - @PathVariable("username") String username + @PathVariable("username") @NotNull String username ); @@ -114,7 +114,7 @@ ResponseEntity deleteUser( ) ResponseEntity getUserByName( - @PathVariable("username") String username + @PathVariable("username") @NotNull String username ); @@ -134,8 +134,8 @@ ResponseEntity getUserByName( ) ResponseEntity loginUser( - @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @Valid @RequestParam(value = "username", required = true) String username, - @NotNull @Valid @RequestParam(value = "password", required = true) String password + @RequestParam(value = "username") @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String username, + @RequestParam(value = "password") @NotNull String password ); @@ -171,8 +171,8 @@ ResponseEntity logoutUser( ) ResponseEntity updateUser( - @PathVariable("username") String username, - @Valid @RequestBody User user + @PathVariable("username") @NotNull String username, + @RequestBody @NotNull @Valid User user ); } diff --git a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/model/Category.java index 12618bc1942a..624f6bbe278f 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/model/Category.java @@ -24,8 +24,8 @@ public class Category { private Optional<@Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String> name = Optional.empty(); - public Category id(Long id) { - this.id = Optional.of(id); + public Category id(Optional id) { + this.id = id; return this; } @@ -33,7 +33,6 @@ public Category id(Long id) { * Get id * @return id */ - @JsonProperty("id") public Optional getId() { return id; @@ -43,8 +42,8 @@ public void setId(Optional id) { this.id = id; } - public Category name(String name) { - this.name = Optional.of(name); + public Category name(Optional name) { + this.name = name; return this; } @@ -52,7 +51,6 @@ public Category name(String name) { * Get name * @return name */ - @JsonProperty("name") public Optional<@Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String> getName() { return name; @@ -101,4 +99,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/model/ModelApiResponse.java index 77efc408aa54..723e6eb3f976 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -28,8 +28,8 @@ public class ModelApiResponse { private Optional message = Optional.empty(); - public ModelApiResponse code(Integer code) { - this.code = Optional.of(code); + public ModelApiResponse code(Optional code) { + this.code = code; return this; } @@ -37,7 +37,6 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @JsonProperty("code") public Optional getCode() { return code; @@ -47,8 +46,8 @@ public void setCode(Optional code) { this.code = code; } - public ModelApiResponse type(String type) { - this.type = Optional.of(type); + public ModelApiResponse type(Optional type) { + this.type = type; return this; } @@ -56,7 +55,6 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @JsonProperty("type") public Optional getType() { return type; @@ -66,8 +64,8 @@ public void setType(Optional type) { this.type = type; } - public ModelApiResponse message(String message) { - this.message = Optional.of(message); + public ModelApiResponse message(Optional message) { + this.message = message; return this; } @@ -75,7 +73,6 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @JsonProperty("message") public Optional getMessage() { return message; @@ -126,4 +123,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/model/Order.java index c19c2413ee08..e22f18f7ac1d 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/model/Order.java +++ b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/model/Order.java @@ -69,12 +69,12 @@ public static StatusEnum fromValue(String value) { } } - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Optional complete = Optional.of(false); - public Order id(Long id) { - this.id = Optional.of(id); + public Order id(Optional id) { + this.id = id; return this; } @@ -82,7 +82,6 @@ public Order id(Long id) { * Get id * @return id */ - @JsonProperty("id") public Optional getId() { return id; @@ -92,8 +91,8 @@ public void setId(Optional id) { this.id = id; } - public Order petId(Long petId) { - this.petId = Optional.of(petId); + public Order petId(Optional petId) { + this.petId = petId; return this; } @@ -101,7 +100,6 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @JsonProperty("petId") public Optional getPetId() { return petId; @@ -111,8 +109,8 @@ public void setPetId(Optional petId) { this.petId = petId; } - public Order quantity(Integer quantity) { - this.quantity = Optional.of(quantity); + public Order quantity(Optional quantity) { + this.quantity = quantity; return this; } @@ -120,7 +118,6 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @JsonProperty("quantity") public Optional getQuantity() { return quantity; @@ -130,8 +127,8 @@ public void setQuantity(Optional quantity) { this.quantity = quantity; } - public Order shipDate(OffsetDateTime shipDate) { - this.shipDate = Optional.of(shipDate); + public Order shipDate(Optional shipDate) { + this.shipDate = shipDate; return this; } @@ -139,7 +136,6 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Valid @JsonProperty("shipDate") public Optional getShipDate() { return shipDate; @@ -149,8 +145,8 @@ public void setShipDate(Optional shipDate) { this.shipDate = shipDate; } - public Order status(StatusEnum status) { - this.status = Optional.of(status); + public Order status(Optional status) { + this.status = status; return this; } @@ -158,9 +154,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @JsonProperty("status") - public Optional getStatus() { + public Optional getStatus() { return status; } @@ -168,8 +163,8 @@ public void setStatus(Optional status) { this.status = status; } - public Order complete(Boolean complete) { - this.complete = Optional.of(complete); + public Order complete(Optional complete) { + this.complete = complete; return this; } @@ -177,7 +172,6 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @JsonProperty("complete") public Optional getComplete() { return complete; @@ -234,4 +228,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/model/Pet.java index c14caaab47af..784a30564e47 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/model/Pet.java @@ -28,15 +28,13 @@ public class Pet { private Optional id = Optional.empty(); - private Optional category = Optional.empty(); + private Optional<@Valid Category> category = Optional.empty(); - private String name; + private @NotNull String name; - @Valid - private List photoUrls = new ArrayList<>(); + private @NotNull List> photoUrls = new ArrayList<>(); - @Valid - private List<@Valid Tag> tags = new ArrayList<>(); + private List> tags = new ArrayList<>(); /** * pet status in the store @@ -76,7 +74,7 @@ public static StatusEnum fromValue(String value) { } @Deprecated - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); public Pet() { super(); @@ -85,13 +83,13 @@ public Pet() { /** * Constructor with only required parameters */ - public Pet(String name, List photoUrls) { + public Pet(String name, List> photoUrls) { this.name = name; this.photoUrls = photoUrls; } - public Pet id(Long id) { - this.id = Optional.of(id); + public Pet id(Optional id) { + this.id = id; return this; } @@ -99,7 +97,6 @@ public Pet id(Long id) { * Get id * @return id */ - @JsonProperty("id") public Optional getId() { return id; @@ -109,8 +106,8 @@ public void setId(Optional id) { this.id = id; } - public Pet category(Category category) { - this.category = Optional.of(category); + public Pet category(Optional category) { + this.category = category; return this; } @@ -118,9 +115,8 @@ public Pet category(Category category) { * Get category * @return category */ - @Valid @JsonProperty("category") - public Optional getCategory() { + public Optional<@Valid Category> getCategory() { return category; } @@ -137,9 +133,8 @@ public Pet name(String name) { * Get name * @return name */ - @NotNull @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -147,12 +142,12 @@ public void setName(String name) { this.name = name; } - public Pet photoUrls(List photoUrls) { + public Pet photoUrls(List> photoUrls) { this.photoUrls = photoUrls; return this; } - public Pet addPhotoUrlsItem(String photoUrlsItem) { + public Pet addPhotoUrlsItem(Optional photoUrlsItem) { if (this.photoUrls == null) { this.photoUrls = new ArrayList<>(); } @@ -164,22 +159,21 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @NotNull @JsonProperty("photoUrls") - public List getPhotoUrls() { + public @NotNull List> getPhotoUrls() { return photoUrls; } - public void setPhotoUrls(List photoUrls) { + public void setPhotoUrls(List> photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List<@Valid Tag> tags) { + public Pet tags(List> tags) { this.tags = tags; return this; } - public Pet addTagsItem(Tag tagsItem) { + public Pet addTagsItem(Optional tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); } @@ -191,18 +185,17 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Valid @JsonProperty("tags") - public List<@Valid Tag> getTags() { + public List> getTags() { return tags; } - public void setTags(List<@Valid Tag> tags) { + public void setTags(List> tags) { this.tags = tags; } - public Pet status(StatusEnum status) { - this.status = Optional.of(status); + public Pet status(Optional status) { + this.status = status; return this; } @@ -211,10 +204,9 @@ public Pet status(StatusEnum status) { * @return status * @deprecated */ - @JsonProperty("status") @Deprecated - public Optional getStatus() { + public Optional getStatus() { return status; } @@ -273,4 +265,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/model/Tag.java index 72b0113fc84a..d15512055eb2 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/model/Tag.java @@ -24,8 +24,8 @@ public class Tag { private Optional name = Optional.empty(); - public Tag id(Long id) { - this.id = Optional.of(id); + public Tag id(Optional id) { + this.id = id; return this; } @@ -33,7 +33,6 @@ public Tag id(Long id) { * Get id * @return id */ - @JsonProperty("id") public Optional getId() { return id; @@ -43,8 +42,8 @@ public void setId(Optional id) { this.id = id; } - public Tag name(String name) { - this.name = Optional.of(name); + public Tag name(Optional name) { + this.name = name; return this; } @@ -52,7 +51,6 @@ public Tag name(String name) { * Get name * @return name */ - @JsonProperty("name") public Optional getName() { return name; @@ -101,4 +99,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/model/User.java b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/model/User.java index d9f5550d71f7..16b9a1840289 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/model/User.java +++ b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/model/User.java @@ -36,8 +36,8 @@ public class User { private Optional userStatus = Optional.empty(); - public User id(Long id) { - this.id = Optional.of(id); + public User id(Optional id) { + this.id = id; return this; } @@ -45,7 +45,6 @@ public User id(Long id) { * Get id * @return id */ - @JsonProperty("id") public Optional getId() { return id; @@ -55,8 +54,8 @@ public void setId(Optional id) { this.id = id; } - public User username(String username) { - this.username = Optional.of(username); + public User username(Optional username) { + this.username = username; return this; } @@ -64,7 +63,6 @@ public User username(String username) { * Get username * @return username */ - @JsonProperty("username") public Optional getUsername() { return username; @@ -74,8 +72,8 @@ public void setUsername(Optional username) { this.username = username; } - public User firstName(String firstName) { - this.firstName = Optional.of(firstName); + public User firstName(Optional firstName) { + this.firstName = firstName; return this; } @@ -83,7 +81,6 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @JsonProperty("firstName") public Optional getFirstName() { return firstName; @@ -93,8 +90,8 @@ public void setFirstName(Optional firstName) { this.firstName = firstName; } - public User lastName(String lastName) { - this.lastName = Optional.of(lastName); + public User lastName(Optional lastName) { + this.lastName = lastName; return this; } @@ -102,7 +99,6 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @JsonProperty("lastName") public Optional getLastName() { return lastName; @@ -112,8 +108,8 @@ public void setLastName(Optional lastName) { this.lastName = lastName; } - public User email(String email) { - this.email = Optional.of(email); + public User email(Optional email) { + this.email = email; return this; } @@ -121,7 +117,6 @@ public User email(String email) { * Get email * @return email */ - @JsonProperty("email") public Optional getEmail() { return email; @@ -131,8 +126,8 @@ public void setEmail(Optional email) { this.email = email; } - public User password(String password) { - this.password = Optional.of(password); + public User password(Optional password) { + this.password = password; return this; } @@ -140,7 +135,6 @@ public User password(String password) { * Get password * @return password */ - @JsonProperty("password") public Optional getPassword() { return password; @@ -150,8 +144,8 @@ public void setPassword(Optional password) { this.password = password; } - public User phone(String phone) { - this.phone = Optional.of(phone); + public User phone(Optional phone) { + this.phone = phone; return this; } @@ -159,7 +153,6 @@ public User phone(String phone) { * Get phone * @return phone */ - @JsonProperty("phone") public Optional getPhone() { return phone; @@ -169,8 +162,8 @@ public void setPhone(Optional phone) { this.phone = phone; } - public User userStatus(Integer userStatus) { - this.userStatus = Optional.of(userStatus); + public User userStatus(Optional userStatus) { + this.userStatus = userStatus; return this; } @@ -178,7 +171,6 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @JsonProperty("userStatus") public Optional getUserStatus() { return userStatus; @@ -239,4 +231,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/PetApi.java index a908a5e21a5c..e4ae2815453a 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/PetApi.java @@ -70,7 +70,7 @@ public interface PetApi { ) ResponseEntity addPet( - @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet pet ); @@ -100,7 +100,7 @@ ResponseEntity addPet( ) ResponseEntity deletePet( - @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, @Parameter(name = "api_key", description = "", in = ParameterIn.HEADER) @RequestHeader(value = "api_key", required = false) String apiKey ); @@ -136,7 +136,7 @@ ResponseEntity deletePet( ) ResponseEntity> findPetsByStatus( - @NotNull @Parameter(name = "status", deprecated = true, description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) @Deprecated List status + @Parameter(name = "status", deprecated = true, description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @RequestParam(value = "status") @Deprecated @NotNull List status ); @@ -174,7 +174,7 @@ ResponseEntity> findPetsByStatus( ) ResponseEntity> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) List tags + @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @RequestParam(value = "tags") @NotNull List tags ); @@ -211,7 +211,7 @@ ResponseEntity> findPetsByTags( ) ResponseEntity getPetById( - @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId + @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId ); @@ -254,7 +254,7 @@ ResponseEntity getPetById( ) ResponseEntity updatePet( - @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet pet ); @@ -286,9 +286,9 @@ ResponseEntity updatePet( ) ResponseEntity updatePetWithForm( - @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, - @Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, - @Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status + @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, + @Parameter(name = "name", description = "Updated name of the pet") @RequestParam(value = "name", required = false) String name, + @Parameter(name = "status", description = "Updated status of the pet") @RequestParam(value = "status", required = false) String status ); @@ -323,8 +323,8 @@ ResponseEntity updatePetWithForm( ) ResponseEntity uploadFile( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, - @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, + @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, + @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ); diff --git a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/StoreApi.java index be61d188bc79..4933a2ecea35 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/StoreApi.java @@ -62,7 +62,7 @@ public interface StoreApi { ) ResponseEntity deleteOrder( - @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId + @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") @NotNull String orderId ); @@ -127,7 +127,7 @@ ResponseEntity> getInventory( ) ResponseEntity getOrderById( - @Min(1L) @Max(5L) @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("orderId") Long orderId + @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("orderId") @NotNull @Min(1L) @Max(5L) Long orderId ); @@ -160,7 +160,7 @@ ResponseEntity getOrderById( ) ResponseEntity placeOrder( - @Parameter(name = "Order", description = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order + @Parameter(name = "Order", description = "order placed for purchasing the pet", required = true) @RequestBody @NotNull @Valid Order order ); } diff --git a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/UserApi.java index 9a8e513e07d9..c06f81db398f 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/UserApi.java @@ -64,7 +64,7 @@ public interface UserApi { ) ResponseEntity createUser( - @Parameter(name = "User", description = "Created user object", required = true) @Valid @RequestBody User user + @Parameter(name = "User", description = "Created user object", required = true) @RequestBody @NotNull @Valid User user ); @@ -94,7 +94,7 @@ ResponseEntity createUser( ) ResponseEntity createUsersWithArrayInput( - @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + @Parameter(name = "User", description = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> user ); @@ -124,7 +124,7 @@ ResponseEntity createUsersWithArrayInput( ) ResponseEntity createUsersWithListInput( - @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + @Parameter(name = "User", description = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> user ); @@ -155,7 +155,7 @@ ResponseEntity createUsersWithListInput( ) ResponseEntity deleteUser( - @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") @NotNull String username ); @@ -189,7 +189,7 @@ ResponseEntity deleteUser( ) ResponseEntity getUserByName( - @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") @NotNull String username ); @@ -222,8 +222,8 @@ ResponseEntity getUserByName( ) ResponseEntity loginUser( - @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username, - @NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) String password + @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @RequestParam(value = "username") @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String username, + @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @RequestParam(value = "password") @NotNull String password ); @@ -284,8 +284,8 @@ ResponseEntity logoutUser( ) ResponseEntity updateUser( - @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, - @Parameter(name = "User", description = "Updated user object", required = true) @Valid @RequestBody User user + @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") @NotNull String username, + @Parameter(name = "User", description = "Updated user object", required = true) @RequestBody @NotNull @Valid User user ); } diff --git a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/model/Category.java index b99d974fa59f..8325d1ddc6ed 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/model/Category.java @@ -24,7 +24,7 @@ public class Category { private Long id; - private String name; + private @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String name; public Category id(Long id) { this.id = id; @@ -35,7 +35,6 @@ public Category id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -55,10 +54,9 @@ public Category name(String name) { * Get name * @return name */ - @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") - public String getName() { + public @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String getName() { return name; } @@ -105,4 +103,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/model/ModelApiResponse.java index 0246602db365..b11182b8506f 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -39,7 +39,6 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @Schema(name = "code", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("code") public Integer getCode() { @@ -59,7 +58,6 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @Schema(name = "type", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("type") public String getType() { @@ -79,7 +77,6 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @Schema(name = "message", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("message") public String getMessage() { @@ -131,4 +128,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/model/Order.java index 3fff67df24d8..c326e96da4fb 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/model/Order.java +++ b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/model/Order.java @@ -71,7 +71,7 @@ public static StatusEnum fromValue(String value) { } } - private StatusEnum status; + private String status; private Boolean complete = false; @@ -84,7 +84,6 @@ public Order id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -104,7 +103,6 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @Schema(name = "petId", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("petId") public Long getPetId() { @@ -124,7 +122,6 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @Schema(name = "quantity", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("quantity") public Integer getQuantity() { @@ -144,7 +141,6 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Valid @Schema(name = "shipDate", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("shipDate") public OffsetDateTime getShipDate() { @@ -164,10 +160,9 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @Schema(name = "status", description = "Order Status", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("status") - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -184,7 +179,6 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @Schema(name = "complete", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("complete") public Boolean getComplete() { @@ -242,4 +236,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/model/Pet.java index 5d06d847e953..9e394df52f14 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/model/Pet.java @@ -30,14 +30,12 @@ public class Pet { private Long id; - private Category category; + private @Valid Category category; - private String name; + private @NotNull String name; - @Valid - private List photoUrls = new ArrayList<>(); + private @NotNull List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** @@ -78,7 +76,7 @@ public static StatusEnum fromValue(String value) { } @Deprecated - private StatusEnum status; + private String status; public Pet() { super(); @@ -101,7 +99,6 @@ public Pet id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -121,10 +118,9 @@ public Pet category(Category category) { * Get category * @return category */ - @Valid @Schema(name = "category", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("category") - public Category getCategory() { + public @Valid Category getCategory() { return category; } @@ -141,10 +137,9 @@ public Pet name(String name) { * Get name * @return name */ - @NotNull @Schema(name = "name", example = "doggie", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -169,10 +164,9 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @NotNull @Schema(name = "photoUrls", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("photoUrls") - public List getPhotoUrls() { + public @NotNull List getPhotoUrls() { return photoUrls; } @@ -180,7 +174,7 @@ public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List<@Valid Tag> tags) { + public Pet tags(List tags) { this.tags = tags; return this; } @@ -197,14 +191,13 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Valid @Schema(name = "tags", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("tags") public List<@Valid Tag> getTags() { return tags; } - public void setTags(List<@Valid Tag> tags) { + public void setTags(List tags) { this.tags = tags; } @@ -218,11 +211,10 @@ public Pet status(StatusEnum status) { * @return status * @deprecated */ - @Schema(name = "status", description = "pet status in the store", deprecated = true, requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("status") @Deprecated - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -281,4 +273,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/model/Tag.java index 6bdf1a1360d1..8e1859cea2fe 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/model/Tag.java @@ -35,7 +35,6 @@ public Tag id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -55,7 +54,6 @@ public Tag name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -105,4 +103,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/model/User.java b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/model/User.java index 822f80ab3f18..27b94307a64b 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/model/User.java +++ b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/model/User.java @@ -47,7 +47,6 @@ public User id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -67,7 +66,6 @@ public User username(String username) { * Get username * @return username */ - @Schema(name = "username", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("username") public String getUsername() { @@ -87,7 +85,6 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @Schema(name = "firstName", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("firstName") public String getFirstName() { @@ -107,7 +104,6 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @Schema(name = "lastName", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("lastName") public String getLastName() { @@ -127,7 +123,6 @@ public User email(String email) { * Get email * @return email */ - @Schema(name = "email", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("email") public String getEmail() { @@ -147,7 +142,6 @@ public User password(String password) { * Get password * @return password */ - @Schema(name = "password", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("password") public String getPassword() { @@ -167,7 +161,6 @@ public User phone(String phone) { * Get phone * @return phone */ - @Schema(name = "phone", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("phone") public String getPhone() { @@ -187,7 +180,6 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @Schema(name = "userStatus", description = "User Status", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("userStatus") public Integer getUserStatus() { @@ -249,4 +241,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java index b32c8211c9d2..ba2bcf562664 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java @@ -71,7 +71,7 @@ public interface PetApi { ) CompletableFuture> addPet( - @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet pet ); @@ -101,7 +101,7 @@ CompletableFuture> addPet( ) CompletableFuture> deletePet( - @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, @Parameter(name = "api_key", description = "", in = ParameterIn.HEADER) @RequestHeader(value = "api_key", required = false) String apiKey ); @@ -137,7 +137,7 @@ CompletableFuture> deletePet( ) CompletableFuture>> findPetsByStatus( - @NotNull @Parameter(name = "status", deprecated = true, description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) @Deprecated List status + @Parameter(name = "status", deprecated = true, description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @RequestParam(value = "status") @Deprecated @NotNull List status ); @@ -175,7 +175,7 @@ CompletableFuture>> findPetsByStatus( ) CompletableFuture>> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) List tags + @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @RequestParam(value = "tags") @NotNull List tags ); @@ -212,7 +212,7 @@ CompletableFuture>> findPetsByTags( ) CompletableFuture> getPetById( - @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId + @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId ); @@ -255,7 +255,7 @@ CompletableFuture> getPetById( ) CompletableFuture> updatePet( - @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet pet ); @@ -287,9 +287,9 @@ CompletableFuture> updatePet( ) CompletableFuture> updatePetWithForm( - @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, - @Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, - @Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status + @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, + @Parameter(name = "name", description = "Updated name of the pet") @RequestParam(value = "name", required = false) String name, + @Parameter(name = "status", description = "Updated status of the pet") @RequestParam(value = "status", required = false) String status ); @@ -324,8 +324,8 @@ CompletableFuture> updatePetWithForm( ) CompletableFuture> uploadFile( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, - @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, + @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, + @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ); diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java index 015007a5e4d7..eb3291e496eb 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java @@ -63,7 +63,7 @@ public interface StoreApi { ) CompletableFuture> deleteOrder( - @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId + @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") @NotNull String orderId ); @@ -128,7 +128,7 @@ CompletableFuture>> getInventory( ) CompletableFuture> getOrderById( - @Min(1L) @Max(5L) @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("orderId") Long orderId + @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("orderId") @NotNull @Min(1L) @Max(5L) Long orderId ); @@ -161,7 +161,7 @@ CompletableFuture> getOrderById( ) CompletableFuture> placeOrder( - @Parameter(name = "Order", description = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order + @Parameter(name = "Order", description = "order placed for purchasing the pet", required = true) @RequestBody @NotNull @Valid Order order ); } diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java index 9778560881b8..1be40dfe8842 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java @@ -65,7 +65,7 @@ public interface UserApi { ) CompletableFuture> createUser( - @Parameter(name = "User", description = "Created user object", required = true) @Valid @RequestBody User user + @Parameter(name = "User", description = "Created user object", required = true) @RequestBody @NotNull @Valid User user ); @@ -95,7 +95,7 @@ CompletableFuture> createUser( ) CompletableFuture> createUsersWithArrayInput( - @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + @Parameter(name = "User", description = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> user ); @@ -125,7 +125,7 @@ CompletableFuture> createUsersWithArrayInput( ) CompletableFuture> createUsersWithListInput( - @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + @Parameter(name = "User", description = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> user ); @@ -156,7 +156,7 @@ CompletableFuture> createUsersWithListInput( ) CompletableFuture> deleteUser( - @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") @NotNull String username ); @@ -190,7 +190,7 @@ CompletableFuture> deleteUser( ) CompletableFuture> getUserByName( - @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") @NotNull String username ); @@ -223,8 +223,8 @@ CompletableFuture> getUserByName( ) CompletableFuture> loginUser( - @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username, - @NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) String password + @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @RequestParam(value = "username") @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String username, + @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @RequestParam(value = "password") @NotNull String password ); @@ -285,8 +285,8 @@ CompletableFuture> logoutUser( ) CompletableFuture> updateUser( - @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, - @Parameter(name = "User", description = "Updated user object", required = true) @Valid @RequestBody User user + @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") @NotNull String username, + @Parameter(name = "User", description = "Updated user object", required = true) @RequestBody @NotNull @Valid User user ); } diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Category.java index 404ff8514e68..c0ab61ef2083 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Category.java @@ -24,7 +24,7 @@ public class Category { private Long id; - private String name; + private @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String name; public Category id(Long id) { this.id = id; @@ -35,7 +35,6 @@ public Category id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -55,10 +54,9 @@ public Category name(String name) { * Get name * @return name */ - @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") - public String getName() { + public @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String getName() { return name; } @@ -105,4 +103,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/ModelApiResponse.java index 0446e2562ee0..46704d751615 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -39,7 +39,6 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @Schema(name = "code", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("code") public Integer getCode() { @@ -59,7 +58,6 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @Schema(name = "type", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("type") public String getType() { @@ -79,7 +77,6 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @Schema(name = "message", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("message") public String getMessage() { @@ -131,4 +128,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Order.java index 42861e6943e0..416b488c0d45 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Order.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Order.java @@ -71,7 +71,7 @@ public static StatusEnum fromValue(String value) { } } - private StatusEnum status; + private String status; private Boolean complete = false; @@ -84,7 +84,6 @@ public Order id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -104,7 +103,6 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @Schema(name = "petId", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("petId") public Long getPetId() { @@ -124,7 +122,6 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @Schema(name = "quantity", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("quantity") public Integer getQuantity() { @@ -144,7 +141,6 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Valid @Schema(name = "shipDate", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("shipDate") public OffsetDateTime getShipDate() { @@ -164,10 +160,9 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @Schema(name = "status", description = "Order Status", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("status") - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -184,7 +179,6 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @Schema(name = "complete", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("complete") public Boolean getComplete() { @@ -242,4 +236,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java index a14eaa01737f..c60fee0780d9 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java @@ -30,14 +30,12 @@ public class Pet { private Long id; - private Category category; + private @Valid Category category; - private String name; + private @NotNull String name; - @Valid - private List photoUrls = new ArrayList<>(); + private @NotNull List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** @@ -78,7 +76,7 @@ public static StatusEnum fromValue(String value) { } @Deprecated - private StatusEnum status; + private String status; public Pet() { super(); @@ -101,7 +99,6 @@ public Pet id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -121,10 +118,9 @@ public Pet category(Category category) { * Get category * @return category */ - @Valid @Schema(name = "category", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("category") - public Category getCategory() { + public @Valid Category getCategory() { return category; } @@ -141,10 +137,9 @@ public Pet name(String name) { * Get name * @return name */ - @NotNull @Schema(name = "name", example = "doggie", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -169,10 +164,9 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @NotNull @Schema(name = "photoUrls", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("photoUrls") - public List getPhotoUrls() { + public @NotNull List getPhotoUrls() { return photoUrls; } @@ -180,7 +174,7 @@ public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List<@Valid Tag> tags) { + public Pet tags(List tags) { this.tags = tags; return this; } @@ -197,14 +191,13 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Valid @Schema(name = "tags", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("tags") public List<@Valid Tag> getTags() { return tags; } - public void setTags(List<@Valid Tag> tags) { + public void setTags(List tags) { this.tags = tags; } @@ -218,11 +211,10 @@ public Pet status(StatusEnum status) { * @return status * @deprecated */ - @Schema(name = "status", description = "pet status in the store", deprecated = true, requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("status") @Deprecated - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -281,4 +273,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Tag.java index f1a466ed802e..7e2360011252 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Tag.java @@ -35,7 +35,6 @@ public Tag id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -55,7 +54,6 @@ public Tag name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -105,4 +103,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/User.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/User.java index 916cc3d937f9..84014db8ad34 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/User.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/User.java @@ -47,7 +47,6 @@ public User id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -67,7 +66,6 @@ public User username(String username) { * Get username * @return username */ - @Schema(name = "username", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("username") public String getUsername() { @@ -87,7 +85,6 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @Schema(name = "firstName", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("firstName") public String getFirstName() { @@ -107,7 +104,6 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @Schema(name = "lastName", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("lastName") public String getLastName() { @@ -127,7 +123,6 @@ public User email(String email) { * Get email * @return email */ - @Schema(name = "email", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("email") public String getEmail() { @@ -147,7 +142,6 @@ public User password(String password) { * Get password * @return password */ - @Schema(name = "password", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("password") public String getPassword() { @@ -167,7 +161,6 @@ public User phone(String phone) { * Get phone * @return phone */ - @Schema(name = "phone", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("phone") public String getPhone() { @@ -187,7 +180,6 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @Schema(name = "userStatus", description = "User Status", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("userStatus") public Integer getUserStatus() { @@ -249,4 +241,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java b/samples/openapi3/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java index 2dfde5192f4d..06326af219eb 100644 --- a/samples/openapi3/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java @@ -60,8 +60,8 @@ public interface DefaultApi { ) ResponseEntity get( - @Parameter(name = "date", description = "A date path parameter", required = true, in = ParameterIn.PATH) @PathVariable("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, - @NotNull @Parameter(name = "dateTime", description = "A date-time query parameter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "dateTime", required = true, defaultValue = "1973-12-19T03:39:57-08:00") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @Parameter(name = "date", description = "A date path parameter", required = true, in = ParameterIn.PATH) @PathVariable("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) @NotNull LocalDate date, + @Parameter(name = "dateTime", description = "A date-time query parameter", required = true, in = ParameterIn.QUERY) @RequestParam(value = "dateTime", defaultValue = "1973-12-19T03:39:57-08:00") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) @NotNull OffsetDateTime dateTime, @NotNull @Parameter(name = "X-Order-Date", description = "A date header parameter", required = true, in = ParameterIn.HEADER) @RequestHeader(value = "X-Order-Date", required = true, defaultValue = "1974-01-01") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate xOrderDate, @Parameter(name = "loginDate", description = "A date cookie parameter", in = ParameterIn.COOKIE) @CookieValue(name = "loginDate", required = false, defaultValue = "1975-01-01") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate loginDate ); @@ -89,8 +89,8 @@ ResponseEntity get( ) ResponseEntity updatePetWithForm( - @Parameter(name = "date", description = "A date path parameter", required = true, in = ParameterIn.PATH) @PathVariable("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, - @Parameter(name = "visitDate", description = "Updated last visit timestamp") @Valid @RequestParam(value = "visitDate", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime visitDate + @Parameter(name = "date", description = "A date path parameter", required = true, in = ParameterIn.PATH) @PathVariable("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) @NotNull LocalDate date, + @Parameter(name = "visitDate", description = "Updated last visit timestamp") @RequestParam(value = "visitDate", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime visitDate ); } diff --git a/samples/openapi3/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/model/Pet.java index cba0dd6f5db6..e47d73e7674f 100644 --- a/samples/openapi3/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/model/Pet.java @@ -25,7 +25,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class Pet { - private String atType = "Pet"; + private @NotNull String atType = "Pet"; private Integer age = 4; @@ -59,10 +59,9 @@ public Pet atType(String atType) { * Get atType * @return atType */ - @NotNull @Schema(name = "@type", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("@type") - public String getAtType() { + public @NotNull String getAtType() { return atType; } @@ -79,7 +78,6 @@ public Pet age(Integer age) { * Get age * @return age */ - @Schema(name = "age", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("age") public Integer getAge() { @@ -99,7 +97,6 @@ public Pet happy(Boolean happy) { * Get happy * @return happy */ - @Schema(name = "happy", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("happy") public Boolean getHappy() { @@ -119,7 +116,6 @@ public Pet price(BigDecimal price) { * Get price * @return price */ - @Valid @Schema(name = "price", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("price") public BigDecimal getPrice() { @@ -139,7 +135,6 @@ public Pet lastFeed(OffsetDateTime lastFeed) { * Get lastFeed * @return lastFeed */ - @Valid @Schema(name = "lastFeed", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("lastFeed") public OffsetDateTime getLastFeed() { @@ -159,7 +154,6 @@ public Pet dateOfBirth(LocalDate dateOfBirth) { * Get dateOfBirth * @return dateOfBirth */ - @Valid @Schema(name = "dateOfBirth", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dateOfBirth") public LocalDate getDateOfBirth() { @@ -217,4 +211,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-http-basic/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud-http-basic/src/main/java/org/openapitools/api/PetApi.java index c300bd991cfb..ea97c8bee0d7 100644 --- a/samples/openapi3/client/petstore/spring-cloud-http-basic/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-http-basic/src/main/java/org/openapitools/api/PetApi.java @@ -69,7 +69,7 @@ public interface PetApi { ) ResponseEntity addPet( - @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet pet ); } diff --git a/samples/openapi3/client/petstore/spring-cloud-http-basic/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/client/petstore/spring-cloud-http-basic/src/main/java/org/openapitools/model/Category.java index 404ff8514e68..c0ab61ef2083 100644 --- a/samples/openapi3/client/petstore/spring-cloud-http-basic/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/client/petstore/spring-cloud-http-basic/src/main/java/org/openapitools/model/Category.java @@ -24,7 +24,7 @@ public class Category { private Long id; - private String name; + private @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String name; public Category id(Long id) { this.id = id; @@ -35,7 +35,6 @@ public Category id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -55,10 +54,9 @@ public Category name(String name) { * Get name * @return name */ - @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") - public String getName() { + public @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String getName() { return name; } @@ -105,4 +103,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-http-basic/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud-http-basic/src/main/java/org/openapitools/model/Pet.java index a14eaa01737f..c60fee0780d9 100644 --- a/samples/openapi3/client/petstore/spring-cloud-http-basic/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud-http-basic/src/main/java/org/openapitools/model/Pet.java @@ -30,14 +30,12 @@ public class Pet { private Long id; - private Category category; + private @Valid Category category; - private String name; + private @NotNull String name; - @Valid - private List photoUrls = new ArrayList<>(); + private @NotNull List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** @@ -78,7 +76,7 @@ public static StatusEnum fromValue(String value) { } @Deprecated - private StatusEnum status; + private String status; public Pet() { super(); @@ -101,7 +99,6 @@ public Pet id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -121,10 +118,9 @@ public Pet category(Category category) { * Get category * @return category */ - @Valid @Schema(name = "category", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("category") - public Category getCategory() { + public @Valid Category getCategory() { return category; } @@ -141,10 +137,9 @@ public Pet name(String name) { * Get name * @return name */ - @NotNull @Schema(name = "name", example = "doggie", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -169,10 +164,9 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @NotNull @Schema(name = "photoUrls", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("photoUrls") - public List getPhotoUrls() { + public @NotNull List getPhotoUrls() { return photoUrls; } @@ -180,7 +174,7 @@ public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List<@Valid Tag> tags) { + public Pet tags(List tags) { this.tags = tags; return this; } @@ -197,14 +191,13 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Valid @Schema(name = "tags", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("tags") public List<@Valid Tag> getTags() { return tags; } - public void setTags(List<@Valid Tag> tags) { + public void setTags(List tags) { this.tags = tags; } @@ -218,11 +211,10 @@ public Pet status(StatusEnum status) { * @return status * @deprecated */ - @Schema(name = "status", description = "pet status in the store", deprecated = true, requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("status") @Deprecated - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -281,4 +273,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-http-basic/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/client/petstore/spring-cloud-http-basic/src/main/java/org/openapitools/model/Tag.java index f1a466ed802e..7e2360011252 100644 --- a/samples/openapi3/client/petstore/spring-cloud-http-basic/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/client/petstore/spring-cloud-http-basic/src/main/java/org/openapitools/model/Tag.java @@ -35,7 +35,6 @@ public Tag id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -55,7 +54,6 @@ public Tag name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -105,4 +103,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/AnotherFakeApi.java index 75b9d4ba9171..e17fc6a836a3 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -63,7 +63,7 @@ public interface AnotherFakeApi { ) ResponseEntity call123testSpecialTags( - @Parameter(name = "Client", description = "client model", required = true) @Valid @RequestBody Client client + @Parameter(name = "Client", description = "client model", required = true) @RequestBody @NotNull @Valid Client client ); } diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java index 9667e2cf6ae9..6fa6574e5b50 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java @@ -70,7 +70,7 @@ public interface FakeApi { ) ResponseEntity createXmlItem( - @Parameter(name = "XmlItem", description = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem + @Parameter(name = "XmlItem", description = "XmlItem Body", required = true) @RequestBody @NotNull @Valid XmlItem xmlItem ); @@ -99,7 +99,7 @@ ResponseEntity createXmlItem( ) ResponseEntity fakeOuterBooleanSerialize( - @Parameter(name = "body", description = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body + @Parameter(name = "body", description = "Input boolean as post body") @RequestBody(required = false) Boolean body ); @@ -128,7 +128,7 @@ ResponseEntity fakeOuterBooleanSerialize( ) ResponseEntity fakeOuterCompositeSerialize( - @Parameter(name = "OuterComposite", description = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite outerComposite + @Parameter(name = "OuterComposite", description = "Input composite as post body") @RequestBody(required = false) @Valid OuterComposite outerComposite ); @@ -157,7 +157,7 @@ ResponseEntity fakeOuterCompositeSerialize( ) ResponseEntity fakeOuterNumberSerialize( - @Parameter(name = "body", description = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body + @Parameter(name = "body", description = "Input number as post body") @RequestBody(required = false) BigDecimal body ); @@ -186,7 +186,7 @@ ResponseEntity fakeOuterNumberSerialize( ) ResponseEntity fakeOuterStringSerialize( - @Parameter(name = "body", description = "Input string as post body") @Valid @RequestBody(required = false) String body + @Parameter(name = "body", description = "Input string as post body") @RequestBody(required = false) String body ); @@ -212,7 +212,7 @@ ResponseEntity fakeOuterStringSerialize( ) ResponseEntity testBodyWithFileSchema( - @Parameter(name = "FileSchemaTestClass", description = "", required = true) @Valid @RequestBody FileSchemaTestClass fileSchemaTestClass + @Parameter(name = "FileSchemaTestClass", description = "", required = true) @RequestBody @NotNull @Valid FileSchemaTestClass fileSchemaTestClass ); @@ -237,8 +237,8 @@ ResponseEntity testBodyWithFileSchema( ) ResponseEntity testBodyWithQueryParams( - @NotNull @Parameter(name = "query", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "query", required = true) String query, - @Parameter(name = "User", description = "", required = true) @Valid @RequestBody User user + @Parameter(name = "query", description = "", required = true, in = ParameterIn.QUERY) @RequestParam(value = "query") @NotNull String query, + @Parameter(name = "User", description = "", required = true) @RequestBody @NotNull @Valid User user ); @@ -268,7 +268,7 @@ ResponseEntity testBodyWithQueryParams( ) ResponseEntity testClientModel( - @Parameter(name = "Client", description = "client model", required = true) @Valid @RequestBody Client client + @Parameter(name = "Client", description = "client model", required = true) @RequestBody @NotNull @Valid Client client ); @@ -313,20 +313,20 @@ ResponseEntity testClientModel( ) ResponseEntity testEndpointParameters( - @Parameter(name = "number", description = "None", required = true) @Valid @RequestParam(value = "number", required = true) BigDecimal number, - @Parameter(name = "double", description = "None", required = true) @Valid @RequestParam(value = "double", required = true) Double _double, - @Parameter(name = "pattern_without_delimiter", description = "None", required = true) @Valid @RequestParam(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, - @Parameter(name = "byte", description = "None", required = true) @Valid @RequestParam(value = "byte", required = true) byte[] _byte, - @Parameter(name = "integer", description = "None") @Valid @RequestParam(value = "integer", required = false) Integer integer, - @Parameter(name = "int32", description = "None") @Valid @RequestParam(value = "int32", required = false) Integer int32, - @Parameter(name = "int64", description = "None") @Valid @RequestParam(value = "int64", required = false) Long int64, - @Parameter(name = "float", description = "None") @Valid @RequestParam(value = "float", required = false) Float _float, - @Parameter(name = "string", description = "None") @Valid @RequestParam(value = "string", required = false) String string, + @Parameter(name = "number", description = "None", required = true) @RequestParam(value = "number") @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal number, + @Parameter(name = "double", description = "None", required = true) @RequestParam(value = "double") @NotNull @DecimalMin("67.8") @DecimalMax("123.4") Double _double, + @Parameter(name = "pattern_without_delimiter", description = "None", required = true) @RequestParam(value = "pattern_without_delimiter") @NotNull @Pattern(regexp = "^[A-Z].*") String patternWithoutDelimiter, + @Parameter(name = "byte", description = "None", required = true) @RequestParam(value = "byte") @NotNull byte[] _byte, + @Parameter(name = "integer", description = "None") @RequestParam(value = "integer", required = false) @Min(10) @Max(100) Integer integer, + @Parameter(name = "int32", description = "None") @RequestParam(value = "int32", required = false) @Min(20) @Max(200) Integer int32, + @Parameter(name = "int64", description = "None") @RequestParam(value = "int64", required = false) Long int64, + @Parameter(name = "float", description = "None") @RequestParam(value = "float", required = false) @DecimalMax("987.6") Float _float, + @Parameter(name = "string", description = "None") @RequestParam(value = "string", required = false) @Pattern(regexp = "/[a-z]/i") String string, @Parameter(name = "binary", description = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @Parameter(name = "date", description = "None") @Valid @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, - @Parameter(name = "dateTime", description = "None") @Valid @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, - @Parameter(name = "password", description = "None") @Valid @RequestParam(value = "password", required = false) String password, - @Parameter(name = "callback", description = "None") @Valid @RequestParam(value = "callback", required = false) String paramCallback + @Parameter(name = "date", description = "None") @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @Parameter(name = "dateTime", description = "None") @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @Parameter(name = "password", description = "None") @RequestParam(value = "password", required = false) @Size(min = 10, max = 64) String password, + @Parameter(name = "callback", description = "None") @RequestParam(value = "callback", required = false) String paramCallback ); @@ -362,14 +362,14 @@ ResponseEntity testEndpointParameters( ) ResponseEntity testEnumParameters( - @Parameter(name = "enum_header_string_array", description = "Header parameter enum test (string array)", in = ParameterIn.HEADER) @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @Parameter(name = "enum_header_string_array", description = "Header parameter enum test (string array)", in = ParameterIn.HEADER) @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, @Parameter(name = "enum_header_string", description = "Header parameter enum test (string)", in = ParameterIn.HEADER) @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, - @Parameter(name = "enum_query_string_array", description = "Query parameter enum test (string array)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, - @Parameter(name = "enum_query_string", description = "Query parameter enum test (string)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, - @Parameter(name = "enum_query_double", description = "Query parameter enum test (double)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, - @Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, - @Parameter(name = "enum_form_string", description = "Form parameter enum test (string)") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString + @Parameter(name = "enum_query_string_array", description = "Query parameter enum test (string array)", in = ParameterIn.QUERY) @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @Parameter(name = "enum_query_string", description = "Query parameter enum test (string)", in = ParameterIn.QUERY) @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, + @Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)", in = ParameterIn.QUERY) @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @Parameter(name = "enum_query_double", description = "Query parameter enum test (double)", in = ParameterIn.QUERY) @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)") @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @Parameter(name = "enum_form_string", description = "Form parameter enum test (string)") @RequestParam(value = "enum_form_string", required = false) String enumFormString ); @@ -400,12 +400,12 @@ ResponseEntity testEnumParameters( ) ResponseEntity testGroupParameters( - @NotNull @Parameter(name = "required_string_group", description = "Required String in group parameters", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @Parameter(name = "required_string_group", description = "Required String in group parameters", required = true, in = ParameterIn.QUERY) @RequestParam(value = "required_string_group") @NotNull Integer requiredStringGroup, @NotNull @Parameter(name = "required_boolean_group", description = "Required Boolean in group parameters", required = true, in = ParameterIn.HEADER) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, - @NotNull @Parameter(name = "required_int64_group", description = "Required Integer in group parameters", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, - @Parameter(name = "string_group", description = "String in group parameters", in = ParameterIn.QUERY) @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup, + @Parameter(name = "required_int64_group", description = "Required Integer in group parameters", required = true, in = ParameterIn.QUERY) @RequestParam(value = "required_int64_group") @NotNull Long requiredInt64Group, + @Parameter(name = "string_group", description = "String in group parameters", in = ParameterIn.QUERY) @RequestParam(value = "string_group", required = false) Integer stringGroup, @Parameter(name = "boolean_group", description = "Boolean in group parameters", in = ParameterIn.HEADER) @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup, - @Parameter(name = "int64_group", description = "Integer in group parameters", in = ParameterIn.QUERY) @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + @Parameter(name = "int64_group", description = "Integer in group parameters", in = ParameterIn.QUERY) @RequestParam(value = "int64_group", required = false) Long int64Group ); @@ -432,7 +432,7 @@ ResponseEntity testGroupParameters( ) ResponseEntity testInlineAdditionalProperties( - @Parameter(name = "request_body", description = "request body", required = true) @Valid @RequestBody Map requestBody + @Parameter(name = "request_body", description = "request body", required = true) @RequestBody @NotNull Map requestBody ); @@ -460,8 +460,8 @@ ResponseEntity testInlineAdditionalProperties( ) ResponseEntity testJsonFormData( - @Parameter(name = "param", description = "field1", required = true) @Valid @RequestParam(value = "param", required = true) String param, - @Parameter(name = "param2", description = "field2", required = true) @Valid @RequestParam(value = "param2", required = true) String param2 + @Parameter(name = "param", description = "field1", required = true) @RequestParam(value = "param") @NotNull String param, + @Parameter(name = "param2", description = "field2", required = true) @RequestParam(value = "param2") @NotNull String param2 ); @@ -488,7 +488,7 @@ ResponseEntity testJsonFormData( ) ResponseEntity testNullable( - @Parameter(name = "ChildWithNullable", description = "request body", required = true) @Valid @RequestBody ChildWithNullable childWithNullable + @Parameter(name = "ChildWithNullable", description = "request body", required = true) @RequestBody @NotNull @Valid ChildWithNullable childWithNullable ); @@ -516,10 +516,10 @@ ResponseEntity testNullable( ) ResponseEntity testQueryParameterCollectionFormat( - @NotNull @Parameter(name = "pipe", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "pipe", required = true) List pipe, - @NotNull @Parameter(name = "http", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "http", required = true) List http, - @NotNull @Parameter(name = "url", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "url", required = true) List url, - @NotNull @Parameter(name = "context", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "context", required = true) List context + @Parameter(name = "pipe", description = "", required = true, in = ParameterIn.QUERY) @RequestParam(value = "pipe") @NotNull List pipe, + @Parameter(name = "http", description = "", required = true, in = ParameterIn.QUERY) @RequestParam(value = "http") @NotNull List http, + @Parameter(name = "url", description = "", required = true, in = ParameterIn.QUERY) @RequestParam(value = "url") @NotNull List url, + @Parameter(name = "context", description = "", required = true, in = ParameterIn.QUERY) @RequestParam(value = "context") @NotNull List context ); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java index 1da780ba9d00..cb870ee64bd0 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java @@ -66,7 +66,7 @@ public interface FakeClassnameTags123Api { ) ResponseEntity testClassname( - @Parameter(name = "Client", description = "client model", required = true) @Valid @RequestBody Client client + @Parameter(name = "Client", description = "client model", required = true) @RequestBody @NotNull @Valid Client client ); } diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/PetApi.java index c1c7a49b2f38..885d31d39947 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/PetApi.java @@ -68,7 +68,7 @@ public interface PetApi { ) ResponseEntity addPet( - @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet pet ); @@ -100,7 +100,7 @@ ResponseEntity addPet( ) ResponseEntity deletePet( - @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, @Parameter(name = "api_key", description = "", in = ParameterIn.HEADER) @RequestHeader(value = "api_key", required = false) String apiKey ); @@ -136,7 +136,7 @@ ResponseEntity deletePet( ) ResponseEntity> findPetsByStatus( - @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) List status + @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @RequestParam(value = "status") @NotNull List status ); @@ -174,7 +174,7 @@ ResponseEntity> findPetsByStatus( ) ResponseEntity> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) Set tags + @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @RequestParam(value = "tags") @NotNull Set tags ); @@ -211,7 +211,7 @@ ResponseEntity> findPetsByTags( ) ResponseEntity getPetById( - @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId + @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId ); @@ -237,7 +237,7 @@ ResponseEntity getPetById( ) ResponseEntity responseObjectDifferentNames( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId + @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId ); @@ -273,7 +273,7 @@ ResponseEntity responseObjectDifferentNam ) ResponseEntity updatePet( - @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet pet ); @@ -305,9 +305,9 @@ ResponseEntity updatePet( ) ResponseEntity updatePetWithForm( - @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, - @Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, - @Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status + @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, + @Parameter(name = "name", description = "Updated name of the pet") @RequestParam(value = "name", required = false) String name, + @Parameter(name = "status", description = "Updated status of the pet") @RequestParam(value = "status", required = false) String status ); @@ -342,8 +342,8 @@ ResponseEntity updatePetWithForm( ) ResponseEntity uploadFile( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, - @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, + @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, + @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ); @@ -379,9 +379,9 @@ ResponseEntity uploadFile( ) ResponseEntity uploadFileWithRequiredFile( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, - @Parameter(name = "requiredFile", description = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, - @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata + @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, + @Parameter(name = "requiredFile", description = "file to upload", required = true) @RequestPart(value = "requiredFile") MultipartFile requiredFile, + @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata ); } diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/StoreApi.java index e77e0932a795..04bc718b77b5 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/StoreApi.java @@ -62,7 +62,7 @@ public interface StoreApi { ) ResponseEntity deleteOrder( - @Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("order_id") String orderId + @Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("order_id") @NotNull String orderId ); @@ -127,7 +127,7 @@ ResponseEntity> getInventory( ) ResponseEntity getOrderById( - @Min(1L) @Max(5L) @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("order_id") Long orderId + @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("order_id") @NotNull @Min(1L) @Max(5L) Long orderId ); @@ -160,7 +160,7 @@ ResponseEntity getOrderById( ) ResponseEntity placeOrder( - @Parameter(name = "Order", description = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order + @Parameter(name = "Order", description = "order placed for purchasing the pet", required = true) @RequestBody @NotNull @Valid Order order ); } diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/UserApi.java index ef1abb089c4f..21e05a798b7b 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/UserApi.java @@ -61,7 +61,7 @@ public interface UserApi { ) ResponseEntity createUser( - @Parameter(name = "User", description = "Created user object", required = true) @Valid @RequestBody User user + @Parameter(name = "User", description = "Created user object", required = true) @RequestBody @NotNull @Valid User user ); @@ -88,7 +88,7 @@ ResponseEntity createUser( ) ResponseEntity createUsersWithArrayInput( - @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + @Parameter(name = "User", description = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> user ); @@ -115,7 +115,7 @@ ResponseEntity createUsersWithArrayInput( ) ResponseEntity createUsersWithListInput( - @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + @Parameter(name = "User", description = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> user ); @@ -143,7 +143,7 @@ ResponseEntity createUsersWithListInput( ) ResponseEntity deleteUser( - @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") @NotNull String username ); @@ -177,7 +177,7 @@ ResponseEntity deleteUser( ) ResponseEntity getUserByName( - @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") @NotNull String username ); @@ -210,8 +210,8 @@ ResponseEntity getUserByName( ) ResponseEntity loginUser( - @NotNull @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username, - @NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) String password + @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @RequestParam(value = "username") @NotNull String username, + @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @RequestParam(value = "password") @NotNull String password ); @@ -266,8 +266,8 @@ ResponseEntity logoutUser( ) ResponseEntity updateUser( - @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, - @Parameter(name = "User", description = "Updated user object", required = true) @Valid @RequestBody User user + @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") @NotNull String username, + @Parameter(name = "User", description = "Updated user object", required = true) @RequestBody @NotNull @Valid User user ); } diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index e14dd983f0f1..0fbe28ea4096 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -36,7 +36,6 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -124,4 +123,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 44db4e0c3810..a7327b15638f 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -37,7 +37,6 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 845d05d68bff..2275717952e3 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -36,7 +36,6 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -124,4 +123,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index cea8ea12066a..3b988af689b4 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -28,33 +28,25 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class AdditionalPropertiesClass { - @Valid private Map mapString = new HashMap<>(); - @Valid private Map mapNumber = new HashMap<>(); - @Valid private Map mapInteger = new HashMap<>(); - @Valid private Map mapBoolean = new HashMap<>(); - @Valid private Map> mapArrayInteger = new HashMap<>(); - @Valid private Map> mapArrayAnytype = new HashMap<>(); - @Valid private Map> mapMapString = new HashMap<>(); - @Valid private Map> mapMapAnytype = new HashMap<>(); private Object anytype1; - private JsonNullable anytype2 = JsonNullable.undefined(); + private JsonNullable anytype2 = JsonNullable.of(null); private Object anytype3; @@ -75,7 +67,6 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ - @Schema(name = "map_string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("map_string") public Map getMapString() { @@ -103,7 +94,6 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ - @Valid @Schema(name = "map_number", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("map_number") public Map getMapNumber() { @@ -131,7 +121,6 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ - @Schema(name = "map_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("map_integer") public Map getMapInteger() { @@ -159,7 +148,6 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ - @Schema(name = "map_boolean", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("map_boolean") public Map getMapBoolean() { @@ -187,7 +175,6 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { @@ -215,7 +202,6 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ - @Valid @Schema(name = "map_array_anytype", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("map_array_anytype") public Map> getMapArrayAnytype() { @@ -243,7 +229,6 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { @@ -271,7 +256,6 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { @@ -291,7 +275,6 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ - @Schema(name = "anytype_1", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("anytype_1") public Object getAnytype1() { @@ -302,8 +285,8 @@ public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; } - public AdditionalPropertiesClass anytype2(Object anytype2) { - this.anytype2 = JsonNullable.of(anytype2); + public AdditionalPropertiesClass anytype2(JsonNullable anytype2) { + this.anytype2 = anytype2; return this; } @@ -311,7 +294,6 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ - @Schema(name = "anytype_2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("anytype_2") public JsonNullable getAnytype2() { @@ -331,7 +313,6 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ - @Schema(name = "anytype_3", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("anytype_3") public Object getAnytype3() { @@ -410,4 +391,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 24c0a0bc4ce6..2f481c341c91 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -36,7 +36,6 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -124,4 +123,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index f881d9449131..2696f58c8203 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -37,7 +37,6 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index fc778107fdd6..ba3e02a567e7 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -37,7 +37,6 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index e7947a2a3e12..d2ddc6c57e1b 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -36,7 +36,6 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -124,4 +123,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Animal.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Animal.java index 68c7042bd0c7..1c2dbfd121f1 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Animal.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Animal.java @@ -35,7 +35,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class Animal { - private String className; + private @NotNull String className; private String color = "red"; @@ -52,10 +52,9 @@ public Animal className(String className) { * Get className * @return className */ - @NotNull @Schema(name = "className", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("className") - public String getClassName() { + public @NotNull String getClassName() { return className; } @@ -72,7 +71,6 @@ public Animal color(String color) { * Get color * @return color */ - @Schema(name = "color", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("color") public String getColor() { @@ -122,4 +120,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index bb399aa9082e..aae59ed763b2 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnly { - @Valid private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { @@ -45,7 +44,6 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ - @Valid @Schema(name = "ArrayArrayNumber", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("ArrayArrayNumber") public List> getArrayArrayNumber() { @@ -93,4 +91,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 4f171f476c4d..8cec84658578 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayOfNumberOnly { - @Valid private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnly arrayNumber(List arrayNumber) { @@ -45,7 +44,6 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ - @Valid @Schema(name = "ArrayNumber", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("ArrayNumber") public List getArrayNumber() { @@ -93,4 +91,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayTest.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayTest.java index a3f194d7775f..2bf0c2999487 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayTest.java @@ -25,13 +25,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayTest { - @Valid private List arrayOfString = new ArrayList<>(); - @Valid private List> arrayArrayOfInteger = new ArrayList<>(); - @Valid private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTest arrayOfString(List arrayOfString) { @@ -51,7 +48,6 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ - @Schema(name = "array_of_string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("array_of_string") public List getArrayOfString() { @@ -79,7 +75,6 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ - @Valid @Schema(name = "array_array_of_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("array_array_of_integer") public List> getArrayArrayOfInteger() { @@ -90,12 +85,12 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } - public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) { + public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { if (this.arrayArrayOfModel == null) { this.arrayArrayOfModel = new ArrayList<>(); } @@ -107,14 +102,13 @@ public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayO * Get arrayArrayOfModel * @return arrayArrayOfModel */ - @Valid @Schema(name = "array_array_of_model", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("array_array_of_model") public List> getArrayArrayOfModel() { return arrayArrayOfModel; } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { + public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } @@ -159,4 +153,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/BigCat.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/BigCat.java index 9dcc38bb5eb4..5dbb9b355451 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/BigCat.java @@ -66,7 +66,7 @@ public static KindEnum fromValue(String value) { } } - private KindEnum kind; + private String kind; public BigCat() { super(); @@ -81,10 +81,9 @@ public BigCat kind(KindEnum kind) { * Get kind * @return kind */ - @Schema(name = "kind", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("kind") - public KindEnum getKind() { + public String getKind() { return kind; } @@ -146,4 +145,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Capitalization.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Capitalization.java index 1305dc32a58a..16393de364a6 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Capitalization.java @@ -42,7 +42,6 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ - @Schema(name = "smallCamel", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("smallCamel") public String getSmallCamel() { @@ -62,7 +61,6 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ - @Schema(name = "CapitalCamel", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("CapitalCamel") public String getCapitalCamel() { @@ -82,7 +80,6 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ - @Schema(name = "small_Snake", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("small_Snake") public String getSmallSnake() { @@ -102,7 +99,6 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ - @Schema(name = "Capital_Snake", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("Capital_Snake") public String getCapitalSnake() { @@ -122,7 +118,6 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ - @Schema(name = "SCA_ETH_Flow_Points", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("SCA_ETH_Flow_Points") public String getScAETHFlowPoints() { @@ -142,7 +137,6 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ - @Schema(name = "ATT_NAME", description = "Name of the pet ", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("ATT_NAME") public String getATTNAME() { @@ -200,4 +194,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Cat.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Cat.java index a5c09c4c21f4..6d73f52620e3 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Cat.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Cat.java @@ -49,7 +49,6 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ - @Schema(name = "declawed", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("declawed") public Boolean getDeclawed() { @@ -109,4 +108,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Category.java index 580a5288adce..57f01dc3fe83 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Category.java @@ -23,7 +23,7 @@ public class Category { private Long id; - private String name = "default-name"; + private @NotNull String name = "default-name"; public Category() { super(); @@ -38,7 +38,6 @@ public Category id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -58,10 +57,9 @@ public Category name(String name) { * Get name * @return name */ - @NotNull @Schema(name = "name", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -108,4 +106,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ChildWithNullable.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ChildWithNullable.java index d87259a91c84..acadde522370 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ChildWithNullable.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ChildWithNullable.java @@ -40,7 +40,6 @@ public ChildWithNullable otherProperty(String otherProperty) { * Get otherProperty * @return otherProperty */ - @Schema(name = "otherProperty", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("otherProperty") public String getOtherProperty() { @@ -57,7 +56,7 @@ public ChildWithNullable type(TypeEnum type) { return this; } - public ChildWithNullable nullableProperty(String nullableProperty) { + public ChildWithNullable nullableProperty(JsonNullable nullableProperty) { super.nullableProperty(nullableProperty); return this; } @@ -111,4 +110,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ClassModel.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ClassModel.java index 2e1c3589bf30..ded911ffab13 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ClassModel.java @@ -33,7 +33,6 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @Schema(name = "_class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("_class") public String getPropertyClass() { @@ -81,4 +80,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Client.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Client.java index 2b0dabb274cf..2d0abb6d4339 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Client.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Client.java @@ -32,7 +32,6 @@ public Client client(String client) { * Get client * @return client */ - @Schema(name = "client", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("client") public String getClient() { @@ -80,4 +79,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ContainerDefaultValue.java index b66296e34b38..a4aaf14927a4 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ContainerDefaultValue.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -26,24 +26,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ContainerDefaultValue { - @Valid - private JsonNullable> nullableArray = JsonNullable.>undefined(); + private JsonNullable> nullableArray = JsonNullable.undefined(); - @Valid - private JsonNullable> nullableRequiredArray = JsonNullable.>undefined(); + private JsonNullable> nullableRequiredArray = JsonNullable.undefined(); - @Valid - private List requiredArray = new ArrayList<>(); + private @NotNull List requiredArray = new ArrayList<>(); - @Valid - private JsonNullable> nullableArrayWithDefault = JsonNullable.>undefined(); + private JsonNullable> nullableArrayWithDefault = JsonNullable.of(new ArrayList<>(Arrays.asList("foo", "bar"))); public ContainerDefaultValue() { super(); } - public ContainerDefaultValue nullableArray(List nullableArray) { - this.nullableArray = JsonNullable.of(nullableArray); + public ContainerDefaultValue nullableArray(JsonNullable> nullableArray) { + this.nullableArray = nullableArray; return this; } @@ -59,7 +55,6 @@ public ContainerDefaultValue addNullableArrayItem(String nullableArrayItem) { * Get nullableArray * @return nullableArray */ - @Schema(name = "nullable_array", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("nullable_array") public JsonNullable> getNullableArray() { @@ -70,8 +65,8 @@ public void setNullableArray(JsonNullable> nullableArray) { this.nullableArray = nullableArray; } - public ContainerDefaultValue nullableRequiredArray(List nullableRequiredArray) { - this.nullableRequiredArray = JsonNullable.of(nullableRequiredArray); + public ContainerDefaultValue nullableRequiredArray(JsonNullable> nullableRequiredArray) { + this.nullableRequiredArray = nullableRequiredArray; return this; } @@ -87,7 +82,6 @@ public ContainerDefaultValue addNullableRequiredArrayItem(String nullableRequire * Get nullableRequiredArray * @return nullableRequiredArray */ - @NotNull @Schema(name = "nullable_required_array", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("nullable_required_array") public JsonNullable> getNullableRequiredArray() { @@ -115,10 +109,9 @@ public ContainerDefaultValue addRequiredArrayItem(String requiredArrayItem) { * Get requiredArray * @return requiredArray */ - @NotNull @Schema(name = "required_array", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("required_array") - public List getRequiredArray() { + public @NotNull List getRequiredArray() { return requiredArray; } @@ -126,8 +119,8 @@ public void setRequiredArray(List requiredArray) { this.requiredArray = requiredArray; } - public ContainerDefaultValue nullableArrayWithDefault(List nullableArrayWithDefault) { - this.nullableArrayWithDefault = JsonNullable.of(nullableArrayWithDefault); + public ContainerDefaultValue nullableArrayWithDefault(JsonNullable> nullableArrayWithDefault) { + this.nullableArrayWithDefault = nullableArrayWithDefault; return this; } @@ -143,7 +136,6 @@ public ContainerDefaultValue addNullableArrayWithDefaultItem(String nullableArra * Get nullableArrayWithDefault * @return nullableArrayWithDefault */ - @Schema(name = "nullable_array_with_default", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("nullable_array_with_default") public JsonNullable> getNullableArrayWithDefault() { @@ -208,4 +200,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Dog.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Dog.java index 9a4844788f06..7641f054e834 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Dog.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Dog.java @@ -41,7 +41,6 @@ public Dog breed(String breed) { * Get breed * @return breed */ - @Schema(name = "breed", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("breed") public String getBreed() { @@ -101,4 +100,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumArrays.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumArrays.java index b4a9a35507f9..0c6797f19e07 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumArrays.java @@ -60,7 +60,7 @@ public static JustSymbolEnum fromValue(String value) { } } - private JustSymbolEnum justSymbol; + private String justSymbol; /** * Gets or Sets arrayEnum @@ -97,8 +97,7 @@ public static ArrayEnumEnum fromValue(String value) { } } - @Valid - private List arrayEnum = new ArrayList<>(); + private List arrayEnum = new ArrayList<>(); public EnumArrays justSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; @@ -109,10 +108,9 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ - @Schema(name = "just_symbol", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("just_symbol") - public JustSymbolEnum getJustSymbol() { + public String getJustSymbol() { return justSymbol; } @@ -137,10 +135,9 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ - @Schema(name = "array_enum", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("array_enum") - public List getArrayEnum() { + public List getArrayEnum() { return arrayEnum; } @@ -187,4 +184,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumTest.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumTest.java index f41d3a95ddf2..b28fcef5c778 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumTest.java @@ -62,7 +62,7 @@ public static EnumStringEnum fromValue(String value) { } } - private EnumStringEnum enumString; + private String enumString; /** * Gets or Sets enumStringRequired @@ -101,7 +101,7 @@ public static EnumStringRequiredEnum fromValue(String value) { } } - private EnumStringRequiredEnum enumStringRequired; + private @NotNull String enumStringRequired; /** * Gets or Sets enumInteger @@ -138,7 +138,7 @@ public static EnumIntegerEnum fromValue(Integer value) { } } - private EnumIntegerEnum enumInteger; + private Integer enumInteger; /** * Gets or Sets enumNumber @@ -175,7 +175,7 @@ public static EnumNumberEnum fromValue(Double value) { } } - private EnumNumberEnum enumNumber; + private Double enumNumber; private OuterEnum outerEnum; @@ -192,10 +192,9 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ - @Schema(name = "enum_string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("enum_string") - public EnumStringEnum getEnumString() { + public String getEnumString() { return enumString; } @@ -212,10 +211,9 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ - @NotNull @Schema(name = "enum_string_required", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("enum_string_required") - public EnumStringRequiredEnum getEnumStringRequired() { + public @NotNull String getEnumStringRequired() { return enumStringRequired; } @@ -232,10 +230,9 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ - @Schema(name = "enum_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("enum_integer") - public EnumIntegerEnum getEnumInteger() { + public Integer getEnumInteger() { return enumInteger; } @@ -252,10 +249,9 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ - @Schema(name = "enum_number", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("enum_number") - public EnumNumberEnum getEnumNumber() { + public Double getEnumNumber() { return enumNumber; } @@ -272,7 +268,6 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ - @Valid @Schema(name = "outerEnum", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("outerEnum") public OuterEnum getOuterEnum() { @@ -328,4 +323,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/File.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/File.java index e3238ec243e4..d48dd7ebefa4 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/File.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/File.java @@ -33,7 +33,6 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ - @Schema(name = "sourceURI", description = "Test capitalization", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("sourceURI") public String getSourceURI() { @@ -81,4 +80,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 1ec66d518194..df8406531213 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -25,9 +25,8 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class FileSchemaTestClass { - private File file; + private @Valid File file; - @Valid private List<@Valid File> files = new ArrayList<>(); public FileSchemaTestClass file(File file) { @@ -39,10 +38,9 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ - @Valid @Schema(name = "file", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("file") - public File getFile() { + public @Valid File getFile() { return file; } @@ -50,7 +48,7 @@ public void setFile(File file) { this.file = file; } - public FileSchemaTestClass files(List<@Valid File> files) { + public FileSchemaTestClass files(List files) { this.files = files; return this; } @@ -67,14 +65,13 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ - @Valid @Schema(name = "files", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("files") public List<@Valid File> getFiles() { return files; } - public void setFiles(List<@Valid File> files) { + public void setFiles(List files) { this.files = files; } @@ -117,4 +114,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FormatTest.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FormatTest.java index b02fdf427d90..b384a47ebaf2 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FormatTest.java @@ -29,33 +29,33 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class FormatTest { - private Integer integer; + private @Min(10) @Max(100) Integer integer; - private Integer int32; + private @Min(20) @Max(200) Integer int32; private Long int64; - private BigDecimal number; + private @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal number; - private Float _float; + private @DecimalMin("54.3") @DecimalMax("987.6") Float _float; - private Double _double; + private @DecimalMin("67.8") @DecimalMax("123.4") Double _double; - private String string; + private @Pattern(regexp = "/[a-z]/i") String string; - private byte[] _byte; + private @NotNull byte[] _byte; private org.springframework.core.io.Resource binary; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) - private LocalDate date; + private @NotNull LocalDate date; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; private UUID uuid; - private String password; + private @NotNull @Size(min = 10, max = 64) String password; private BigDecimal bigDecimal; @@ -74,10 +74,9 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ - @Min(10) @Max(100) @Schema(name = "integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("integer") - public Integer getInteger() { + public @Min(10) @Max(100) Integer getInteger() { return integer; } @@ -96,10 +95,9 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ - @Min(20) @Max(200) @Schema(name = "int32", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("int32") - public Integer getInt32() { + public @Min(20) @Max(200) Integer getInt32() { return int32; } @@ -116,7 +114,6 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ - @Schema(name = "int64", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("int64") public Long getInt64() { @@ -138,10 +135,9 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ - @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @Schema(name = "number", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("number") - public BigDecimal getNumber() { + public @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal getNumber() { return number; } @@ -160,10 +156,9 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ - @DecimalMin("54.3") @DecimalMax("987.6") @Schema(name = "float", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("float") - public Float getFloat() { + public @DecimalMin("54.3") @DecimalMax("987.6") Float getFloat() { return _float; } @@ -182,10 +177,9 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ - @DecimalMin("67.8") @DecimalMax("123.4") @Schema(name = "double", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("double") - public Double getDouble() { + public @DecimalMin("67.8") @DecimalMax("123.4") Double getDouble() { return _double; } @@ -202,10 +196,9 @@ public FormatTest string(String string) { * Get string * @return string */ - @Pattern(regexp = "/[a-z]/i") @Schema(name = "string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("string") - public String getString() { + public @Pattern(regexp = "/[a-z]/i") String getString() { return string; } @@ -222,10 +215,9 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ - @NotNull @Schema(name = "byte", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("byte") - public byte[] getByte() { + public @NotNull byte[] getByte() { return _byte; } @@ -242,7 +234,6 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ - @Valid @Schema(name = "binary", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("binary") public org.springframework.core.io.Resource getBinary() { @@ -262,10 +253,9 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ - @NotNull @Valid @Schema(name = "date", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("date") - public LocalDate getDate() { + public @NotNull LocalDate getDate() { return date; } @@ -282,7 +272,6 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ - @Valid @Schema(name = "dateTime", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dateTime") public OffsetDateTime getDateTime() { @@ -302,7 +291,6 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ - @Valid @Schema(name = "uuid", example = "72f98069-206d-4f12-9f12-3d1e525a8e84", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("uuid") public UUID getUuid() { @@ -322,10 +310,9 @@ public FormatTest password(String password) { * Get password * @return password */ - @NotNull @Size(min = 10, max = 64) @Schema(name = "password", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("password") - public String getPassword() { + public @NotNull @Size(min = 10, max = 64) String getPassword() { return password; } @@ -342,7 +329,6 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ - @Valid @Schema(name = "BigDecimal", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("BigDecimal") public BigDecimal getBigDecimal() { @@ -416,4 +402,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 7670645ce831..34599cb0ba57 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -36,7 +36,6 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ - @Schema(name = "bar", accessMode = Schema.AccessMode.READ_ONLY, requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("bar") public String getBar() { @@ -56,7 +55,6 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ - @Schema(name = "foo", accessMode = Schema.AccessMode.READ_ONLY, requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("foo") public String getFoo() { @@ -106,4 +104,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/MapTest.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/MapTest.java index a449469c6aff..17d9a1719a7a 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/MapTest.java @@ -24,7 +24,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class MapTest { - @Valid private Map> mapMapOfString = new HashMap<>(); /** @@ -62,13 +61,10 @@ public static InnerEnum fromValue(String value) { } } - @Valid - private Map mapOfEnumString = new HashMap<>(); + private Map mapOfEnumString = new HashMap<>(); - @Valid private Map directMap = new HashMap<>(); - @Valid private Map indirectMap = new HashMap<>(); public MapTest mapMapOfString(Map> mapMapOfString) { @@ -88,7 +84,6 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ - @Valid @Schema(name = "map_map_of_string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("map_map_of_string") public Map> getMapMapOfString() { @@ -116,10 +111,9 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ - @Schema(name = "map_of_enum_string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("map_of_enum_string") - public Map getMapOfEnumString() { + public Map getMapOfEnumString() { return mapOfEnumString; } @@ -144,7 +138,6 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ - @Schema(name = "direct_map", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("direct_map") public Map getDirectMap() { @@ -172,7 +165,6 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ - @Schema(name = "indirect_map", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("indirect_map") public Map getIndirectMap() { @@ -226,4 +218,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index c02231565c15..9529c5b6ed55 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -32,8 +32,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; - @Valid - private Map map = new HashMap<>(); + private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { this.uuid = uuid; @@ -44,7 +43,6 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ - @Valid @Schema(name = "uuid", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("uuid") public UUID getUuid() { @@ -64,7 +62,6 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ - @Valid @Schema(name = "dateTime", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dateTime") public OffsetDateTime getDateTime() { @@ -92,10 +89,9 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ - @Valid @Schema(name = "map", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("map") - public Map getMap() { + public Map getMap() { return map; } @@ -144,4 +140,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Model200Response.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Model200Response.java index 47ea4a6e7f93..b70662fd9c2d 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Model200Response.java @@ -37,7 +37,6 @@ public Model200Response name(Integer name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public Integer getName() { @@ -57,7 +56,6 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @Schema(name = "class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("class") public String getPropertyClass() { @@ -107,4 +105,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelApiResponse.java index b3ff5612d992..fd7668cb99ed 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -38,7 +38,6 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @Schema(name = "code", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("code") public Integer getCode() { @@ -58,7 +57,6 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @Schema(name = "type", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("type") public String getType() { @@ -78,7 +76,6 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @Schema(name = "message", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("message") public String getMessage() { @@ -130,4 +127,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelList.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelList.java index 70456df44cc8..5084211cf5b6 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelList.java @@ -34,7 +34,6 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ - @Schema(name = "123-list", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("123-list") public String get123list() { @@ -82,4 +81,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelReturn.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelReturn.java index 9e66eec3d6df..a1d5d5179f43 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelReturn.java @@ -35,7 +35,6 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ - @Schema(name = "return", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("return") public Integer getReturn() { @@ -83,4 +82,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Name.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Name.java index 54ab64d5ffdf..73fdb68bf555 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Name.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Name.java @@ -22,7 +22,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class Name { - private Integer name; + private @NotNull Integer name; private Integer snakeCase; @@ -43,10 +43,9 @@ public Name name(Integer name) { * Get name * @return name */ - @NotNull @Schema(name = "name", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("name") - public Integer getName() { + public @NotNull Integer getName() { return name; } @@ -63,7 +62,6 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ - @Schema(name = "snake_case", accessMode = Schema.AccessMode.READ_ONLY, requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("snake_case") public Integer getSnakeCase() { @@ -83,7 +81,6 @@ public Name property(String property) { * Get property * @return property */ - @Schema(name = "property", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("property") public String getProperty() { @@ -103,7 +100,6 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ - @Schema(name = "123Number", accessMode = Schema.AccessMode.READ_ONLY, requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("123Number") public Integer get123number() { @@ -157,4 +153,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/NullableMapProperty.java index 1d2cc4aac787..f5df0da7713a 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/NullableMapProperty.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -26,11 +26,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class NullableMapProperty { - @Valid - private JsonNullable> languageValues = JsonNullable.>undefined(); + private JsonNullable> languageValues = JsonNullable.undefined(); - public NullableMapProperty languageValues(Map languageValues) { - this.languageValues = JsonNullable.of(languageValues); + public NullableMapProperty languageValues(JsonNullable> languageValues) { + this.languageValues = languageValues; return this; } @@ -46,7 +45,6 @@ public NullableMapProperty putLanguageValuesItem(String key, String languageValu * Get languageValues * @return languageValues */ - @Schema(name = "languageValues", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("languageValues") public JsonNullable> getLanguageValues() { @@ -105,4 +103,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/NumberOnly.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/NumberOnly.java index e3eded935ac3..42dd6710923f 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/NumberOnly.java @@ -33,7 +33,6 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ - @Valid @Schema(name = "JustNumber", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("JustNumber") public BigDecimal getJustNumber() { @@ -81,4 +80,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Order.java index 52470395ae42..9ab26c93ad9e 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Order.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Order.java @@ -70,7 +70,7 @@ public static StatusEnum fromValue(String value) { } } - private StatusEnum status; + private String status; private Boolean complete = false; @@ -83,7 +83,6 @@ public Order id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -103,7 +102,6 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @Schema(name = "petId", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("petId") public Long getPetId() { @@ -123,7 +121,6 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @Schema(name = "quantity", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("quantity") public Integer getQuantity() { @@ -143,7 +140,6 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Valid @Schema(name = "shipDate", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("shipDate") public OffsetDateTime getShipDate() { @@ -163,10 +159,9 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @Schema(name = "status", description = "Order Status", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("status") - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -183,7 +178,6 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @Schema(name = "complete", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("complete") public Boolean getComplete() { @@ -241,4 +235,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/OuterComposite.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/OuterComposite.java index 3946d3ec3499..c351c962a713 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/OuterComposite.java @@ -37,7 +37,6 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ - @Valid @Schema(name = "my_number", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("my_number") public BigDecimal getMyNumber() { @@ -57,7 +56,6 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ - @Schema(name = "my_string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("my_string") public String getMyString() { @@ -77,7 +75,6 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ - @Schema(name = "my_boolean", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("my_boolean") public Boolean getMyBoolean() { @@ -129,4 +126,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ParentWithNullable.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ParentWithNullable.java index 0bca1c134462..f1aa3e27ec23 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ParentWithNullable.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ParentWithNullable.java @@ -70,9 +70,9 @@ public static TypeEnum fromValue(String value) { } } - private TypeEnum type; + private String type; - private JsonNullable nullableProperty = JsonNullable.undefined(); + private JsonNullable nullableProperty = JsonNullable.undefined(); public ParentWithNullable type(TypeEnum type) { this.type = type; @@ -83,10 +83,9 @@ public ParentWithNullable type(TypeEnum type) { * Get type * @return type */ - @Schema(name = "type", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("type") - public TypeEnum getType() { + public String getType() { return type; } @@ -94,8 +93,8 @@ public void setType(TypeEnum type) { this.type = type; } - public ParentWithNullable nullableProperty(String nullableProperty) { - this.nullableProperty = JsonNullable.of(nullableProperty); + public ParentWithNullable nullableProperty(JsonNullable nullableProperty) { + this.nullableProperty = nullableProperty; return this; } @@ -103,7 +102,6 @@ public ParentWithNullable nullableProperty(String nullableProperty) { * Get nullableProperty * @return nullableProperty */ - @Schema(name = "nullableProperty", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("nullableProperty") public JsonNullable getNullableProperty() { @@ -164,4 +162,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Pet.java index 3ef1b2654a19..b5dcaedde32e 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Pet.java @@ -32,14 +32,12 @@ public class Pet { private Long id; - private Category category; + private @Valid Category category; - private String name; + private @NotNull String name; - @Valid - private Set photoUrls = new LinkedHashSet<>(); + private @NotNull Set photoUrls = new LinkedHashSet<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** @@ -80,7 +78,7 @@ public static StatusEnum fromValue(String value) { } @Deprecated - private StatusEnum status; + private String status; public Pet() { super(); @@ -95,7 +93,6 @@ public Pet id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -115,10 +112,9 @@ public Pet category(Category category) { * Get category * @return category */ - @Valid @Schema(name = "category", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("category") - public Category getCategory() { + public @Valid Category getCategory() { return category; } @@ -135,10 +131,9 @@ public Pet name(String name) { * Get name * @return name */ - @NotNull @Schema(name = "name", example = "doggie", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -163,10 +158,9 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @NotNull @Schema(name = "photoUrls", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("photoUrls") - public Set getPhotoUrls() { + public @NotNull Set getPhotoUrls() { return photoUrls; } @@ -175,7 +169,7 @@ public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List<@Valid Tag> tags) { + public Pet tags(List tags) { this.tags = tags; return this; } @@ -192,14 +186,13 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Valid @Schema(name = "tags", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("tags") public List<@Valid Tag> getTags() { return tags; } - public void setTags(List<@Valid Tag> tags) { + public void setTags(List tags) { this.tags = tags; } @@ -213,11 +206,10 @@ public Pet status(StatusEnum status) { * @return status * @deprecated */ - @Schema(name = "status", description = "pet status in the store", deprecated = true, requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("status") @Deprecated - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -276,4 +268,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ReadOnlyFirst.java index e2040366bf62..d9110ce888fa 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -34,7 +34,6 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ - @Schema(name = "bar", accessMode = Schema.AccessMode.READ_ONLY, requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("bar") public String getBar() { @@ -54,7 +53,6 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ - @Schema(name = "baz", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("baz") public String getBaz() { @@ -104,4 +102,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java index e739bd1d5ab5..f1ea0fb752ee 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java @@ -38,7 +38,6 @@ public ResponseObjectWithDifferentFieldNames normalPropertyName(String normalPro * Get normalPropertyName * @return normalPropertyName */ - @Schema(name = "normalPropertyName", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("normalPropertyName") public String getNormalPropertyName() { @@ -58,7 +57,6 @@ public ResponseObjectWithDifferentFieldNames UPPER_CASE_PROPERTY_SNAKE(String UP * Get UPPER_CASE_PROPERTY_SNAKE * @return UPPER_CASE_PROPERTY_SNAKE */ - @Schema(name = "UPPER_CASE_PROPERTY_SNAKE", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("UPPER_CASE_PROPERTY_SNAKE") public String getUPPERCASEPROPERTYSNAKE() { @@ -78,7 +76,6 @@ public ResponseObjectWithDifferentFieldNames lowerCasePropertyDashes(String lowe * Get lowerCasePropertyDashes * @return lowerCasePropertyDashes */ - @Schema(name = "lower-case-property-dashes", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("lower-case-property-dashes") public String getLowerCasePropertyDashes() { @@ -98,7 +95,6 @@ public ResponseObjectWithDifferentFieldNames propertyNameWithSpaces(String prope * Get propertyNameWithSpaces * @return propertyNameWithSpaces */ - @Schema(name = "property name with spaces", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("property name with spaces") public String getPropertyNameWithSpaces() { @@ -152,4 +148,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/SpecialModelName.java index 8173a14a8d8e..1f8ea115b01f 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/SpecialModelName.java @@ -34,7 +34,6 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ - @Schema(name = "$special[property.name]", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("$special[property.name]") public Long get$SpecialPropertyName() { @@ -82,4 +81,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Tag.java index 9e7ac9ebf805..583cbc48e7a6 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Tag.java @@ -34,7 +34,6 @@ public Tag id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -54,7 +53,6 @@ public Tag name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -104,4 +102,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderDefault.java index e1176eb0255f..ebd88f95ad83 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -25,16 +25,15 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class TypeHolderDefault { - private String stringItem = "what"; + private @NotNull String stringItem = "what"; - private BigDecimal numberItem = new BigDecimal("1.234"); + private @NotNull BigDecimal numberItem = new BigDecimal("1.234"); - private Integer integerItem = -2; + private @NotNull Integer integerItem = -2; - private Boolean boolItem = true; + private @NotNull Boolean boolItem = true; - @Valid - private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); + private @NotNull List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); public TypeHolderDefault() { super(); @@ -49,10 +48,9 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @NotNull @Schema(name = "string_item", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("string_item") - public String getStringItem() { + public @NotNull String getStringItem() { return stringItem; } @@ -69,10 +67,9 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @NotNull @Valid @Schema(name = "number_item", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("number_item") - public BigDecimal getNumberItem() { + public @NotNull BigDecimal getNumberItem() { return numberItem; } @@ -89,10 +86,9 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @NotNull @Schema(name = "integer_item", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("integer_item") - public Integer getIntegerItem() { + public @NotNull Integer getIntegerItem() { return integerItem; } @@ -109,10 +105,9 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @NotNull @Schema(name = "bool_item", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("bool_item") - public Boolean getBoolItem() { + public @NotNull Boolean getBoolItem() { return boolItem; } @@ -137,10 +132,9 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @NotNull @Schema(name = "array_item", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("array_item") - public List getArrayItem() { + public @NotNull List getArrayItem() { return arrayItem; } @@ -193,4 +187,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderExample.java index 3dc9cdea82b2..8bffbfa257e9 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -25,18 +25,17 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class TypeHolderExample { - private String stringItem; + private @NotNull String stringItem; - private BigDecimal numberItem; + private @NotNull BigDecimal numberItem; - private Float floatItem; + private @NotNull Float floatItem; - private Integer integerItem; + private @NotNull Integer integerItem; - private Boolean boolItem; + private @NotNull Boolean boolItem; - @Valid - private List arrayItem = new ArrayList<>(); + private @NotNull List arrayItem = new ArrayList<>(); public TypeHolderExample() { super(); @@ -51,10 +50,9 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @NotNull @Schema(name = "string_item", example = "what", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("string_item") - public String getStringItem() { + public @NotNull String getStringItem() { return stringItem; } @@ -71,10 +69,9 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @NotNull @Valid @Schema(name = "number_item", example = "1.234", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("number_item") - public BigDecimal getNumberItem() { + public @NotNull BigDecimal getNumberItem() { return numberItem; } @@ -91,10 +88,9 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ - @NotNull @Schema(name = "float_item", example = "1.234", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("float_item") - public Float getFloatItem() { + public @NotNull Float getFloatItem() { return floatItem; } @@ -111,10 +107,9 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @NotNull @Schema(name = "integer_item", example = "-2", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("integer_item") - public Integer getIntegerItem() { + public @NotNull Integer getIntegerItem() { return integerItem; } @@ -131,10 +126,9 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @NotNull @Schema(name = "bool_item", example = "true", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("bool_item") - public Boolean getBoolItem() { + public @NotNull Boolean getBoolItem() { return boolItem; } @@ -159,10 +153,9 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @NotNull @Schema(name = "array_item", example = "[0,1,2,3]", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("array_item") - public List getArrayItem() { + public @NotNull List getArrayItem() { return arrayItem; } @@ -217,4 +210,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/User.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/User.java index ec465261f6a6..035f3adc34ea 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/User.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/User.java @@ -46,7 +46,6 @@ public User id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -66,7 +65,6 @@ public User username(String username) { * Get username * @return username */ - @Schema(name = "username", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("username") public String getUsername() { @@ -86,7 +84,6 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @Schema(name = "firstName", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("firstName") public String getFirstName() { @@ -106,7 +103,6 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @Schema(name = "lastName", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("lastName") public String getLastName() { @@ -126,7 +122,6 @@ public User email(String email) { * Get email * @return email */ - @Schema(name = "email", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("email") public String getEmail() { @@ -146,7 +141,6 @@ public User password(String password) { * Get password * @return password */ - @Schema(name = "password", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("password") public String getPassword() { @@ -166,7 +160,6 @@ public User phone(String phone) { * Get phone * @return phone */ - @Schema(name = "phone", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("phone") public String getPhone() { @@ -186,7 +179,6 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @Schema(name = "userStatus", description = "User Status", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("userStatus") public Integer getUserStatus() { @@ -248,4 +240,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/XmlItem.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/XmlItem.java index ec738c3d64d6..ee4dfbc877a1 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/XmlItem.java @@ -33,7 +33,6 @@ public class XmlItem { private Boolean attributeBoolean; - @Valid private List wrappedArray = new ArrayList<>(); private String nameString; @@ -44,10 +43,8 @@ public class XmlItem { private Boolean nameBoolean; - @Valid private List nameArray = new ArrayList<>(); - @Valid private List nameWrappedArray = new ArrayList<>(); private String prefixString; @@ -58,10 +55,8 @@ public class XmlItem { private Boolean prefixBoolean; - @Valid private List prefixArray = new ArrayList<>(); - @Valid private List prefixWrappedArray = new ArrayList<>(); private String namespaceString; @@ -72,10 +67,8 @@ public class XmlItem { private Boolean namespaceBoolean; - @Valid private List namespaceArray = new ArrayList<>(); - @Valid private List namespaceWrappedArray = new ArrayList<>(); private String prefixNsString; @@ -86,10 +79,8 @@ public class XmlItem { private Boolean prefixNsBoolean; - @Valid private List prefixNsArray = new ArrayList<>(); - @Valid private List prefixNsWrappedArray = new ArrayList<>(); public XmlItem attributeString(String attributeString) { @@ -101,7 +92,6 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ - @Schema(name = "attribute_string", example = "string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("attribute_string") public String getAttributeString() { @@ -121,7 +111,6 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ - @Valid @Schema(name = "attribute_number", example = "1.234", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("attribute_number") public BigDecimal getAttributeNumber() { @@ -141,7 +130,6 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ - @Schema(name = "attribute_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("attribute_integer") public Integer getAttributeInteger() { @@ -161,7 +149,6 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ - @Schema(name = "attribute_boolean", example = "true", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("attribute_boolean") public Boolean getAttributeBoolean() { @@ -189,7 +176,6 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ - @Schema(name = "wrapped_array", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("wrapped_array") public List getWrappedArray() { @@ -209,7 +195,6 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ - @Schema(name = "name_string", example = "string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name_string") public String getNameString() { @@ -229,7 +214,6 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ - @Valid @Schema(name = "name_number", example = "1.234", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name_number") public BigDecimal getNameNumber() { @@ -249,7 +233,6 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ - @Schema(name = "name_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name_integer") public Integer getNameInteger() { @@ -269,7 +252,6 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ - @Schema(name = "name_boolean", example = "true", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name_boolean") public Boolean getNameBoolean() { @@ -297,7 +279,6 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ - @Schema(name = "name_array", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name_array") public List getNameArray() { @@ -325,7 +306,6 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ - @Schema(name = "name_wrapped_array", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name_wrapped_array") public List getNameWrappedArray() { @@ -345,7 +325,6 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ - @Schema(name = "prefix_string", example = "string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_string") public String getPrefixString() { @@ -365,7 +344,6 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ - @Valid @Schema(name = "prefix_number", example = "1.234", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_number") public BigDecimal getPrefixNumber() { @@ -385,7 +363,6 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ - @Schema(name = "prefix_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_integer") public Integer getPrefixInteger() { @@ -405,7 +382,6 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ - @Schema(name = "prefix_boolean", example = "true", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_boolean") public Boolean getPrefixBoolean() { @@ -433,7 +409,6 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ - @Schema(name = "prefix_array", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_array") public List getPrefixArray() { @@ -461,7 +436,6 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ - @Schema(name = "prefix_wrapped_array", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_wrapped_array") public List getPrefixWrappedArray() { @@ -481,7 +455,6 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ - @Schema(name = "namespace_string", example = "string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespace_string") public String getNamespaceString() { @@ -501,7 +474,6 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ - @Valid @Schema(name = "namespace_number", example = "1.234", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespace_number") public BigDecimal getNamespaceNumber() { @@ -521,7 +493,6 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ - @Schema(name = "namespace_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { @@ -541,7 +512,6 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ - @Schema(name = "namespace_boolean", example = "true", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespace_boolean") public Boolean getNamespaceBoolean() { @@ -569,7 +539,6 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ - @Schema(name = "namespace_array", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespace_array") public List getNamespaceArray() { @@ -597,7 +566,6 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ - @Schema(name = "namespace_wrapped_array", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespace_wrapped_array") public List getNamespaceWrappedArray() { @@ -617,7 +585,6 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ - @Schema(name = "prefix_ns_string", example = "string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_ns_string") public String getPrefixNsString() { @@ -637,7 +604,6 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ - @Valid @Schema(name = "prefix_ns_number", example = "1.234", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_ns_number") public BigDecimal getPrefixNsNumber() { @@ -657,7 +623,6 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ - @Schema(name = "prefix_ns_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { @@ -677,7 +642,6 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ - @Schema(name = "prefix_ns_boolean", example = "true", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_ns_boolean") public Boolean getPrefixNsBoolean() { @@ -705,7 +669,6 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ - @Schema(name = "prefix_ns_array", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_ns_array") public List getPrefixNsArray() { @@ -733,7 +696,6 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ - @Schema(name = "prefix_ns_wrapped_array", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_ns_wrapped_array") public List getPrefixNsWrappedArray() { @@ -837,4 +799,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java index e0811fc3e31c..69ae80b191c5 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java @@ -64,7 +64,7 @@ public interface PetApi { ) ResponseEntity addPet( - @Parameter(name = "body", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + @Parameter(name = "body", description = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet body ); @@ -92,7 +92,7 @@ ResponseEntity addPet( ) ResponseEntity deletePet( - @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, @Parameter(name = "api_key", description = "", in = ParameterIn.HEADER) @RequestHeader(value = "api_key", required = false) String apiKey ); @@ -128,7 +128,7 @@ ResponseEntity deletePet( ) ResponseEntity> findPetsByStatus( - @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) List status, + @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @RequestParam(value = "status") @NotNull List status, @ParameterObject final Pageable pageable ); @@ -167,7 +167,7 @@ ResponseEntity> findPetsByStatus( ) ResponseEntity> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) List tags, + @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @RequestParam(value = "tags") @NotNull List tags, @ParameterObject final Pageable pageable ); @@ -205,7 +205,7 @@ ResponseEntity> findPetsByTags( ) ResponseEntity getPetById( - @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId + @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId ); @@ -237,7 +237,7 @@ ResponseEntity getPetById( ) ResponseEntity updatePet( - @Parameter(name = "body", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + @Parameter(name = "body", description = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet body ); @@ -267,9 +267,9 @@ ResponseEntity updatePet( ) ResponseEntity updatePetWithForm( - @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, - @Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, - @Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status + @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, + @Parameter(name = "name", description = "Updated name of the pet") @RequestParam(value = "name", required = false) String name, + @Parameter(name = "status", description = "Updated status of the pet") @RequestParam(value = "status", required = false) String status ); @@ -302,8 +302,8 @@ ResponseEntity updatePetWithForm( ) ResponseEntity uploadFile( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, - @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, + @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, + @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ); diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java index e0acd03e645f..377173c71d1d 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java @@ -62,7 +62,7 @@ public interface StoreApi { ) ResponseEntity deleteOrder( - @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId + @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") @NotNull String orderId ); @@ -127,7 +127,7 @@ ResponseEntity> getInventory( ) ResponseEntity getOrderById( - @Min(1L) @Max(5L) @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("orderId") Long orderId + @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("orderId") @NotNull @Min(1L) @Max(5L) Long orderId ); @@ -157,7 +157,7 @@ ResponseEntity getOrderById( ) ResponseEntity placeOrder( - @Parameter(name = "body", description = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body + @Parameter(name = "body", description = "order placed for purchasing the pet", required = true) @RequestBody @NotNull @Valid Order body ); } diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java index e9a6a9cc23e0..606105be3b6f 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java @@ -60,7 +60,7 @@ public interface UserApi { ) ResponseEntity createUser( - @Parameter(name = "body", description = "Created user object", required = true) @Valid @RequestBody User body + @Parameter(name = "body", description = "Created user object", required = true) @RequestBody @NotNull @Valid User body ); @@ -84,7 +84,7 @@ ResponseEntity createUser( ) ResponseEntity createUsersWithArrayInput( - @Parameter(name = "body", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> body + @Parameter(name = "body", description = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> body ); @@ -108,7 +108,7 @@ ResponseEntity createUsersWithArrayInput( ) ResponseEntity createUsersWithListInput( - @Parameter(name = "body", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> body + @Parameter(name = "body", description = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> body ); @@ -136,7 +136,7 @@ ResponseEntity createUsersWithListInput( ) ResponseEntity deleteUser( - @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") @NotNull String username ); @@ -168,7 +168,7 @@ ResponseEntity deleteUser( ) ResponseEntity getUserByName( - @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") @NotNull String username ); @@ -199,8 +199,8 @@ ResponseEntity getUserByName( ) ResponseEntity loginUser( - @NotNull @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username, - @NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) String password + @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @RequestParam(value = "username") @NotNull String username, + @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @RequestParam(value = "password") @NotNull String password ); @@ -275,8 +275,8 @@ ResponseEntity logoutUserOptions( ) ResponseEntity updateUser( - @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, - @Parameter(name = "body", description = "Updated user object", required = true) @Valid @RequestBody User body + @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") @NotNull String username, + @Parameter(name = "body", description = "Updated user object", required = true) @RequestBody @NotNull @Valid User body ); } diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Category.java index a7dca5774930..05b0abe94d2c 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Category.java @@ -35,7 +35,6 @@ public Category id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -55,7 +54,6 @@ public Category name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -105,4 +103,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java index 0446e2562ee0..46704d751615 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -39,7 +39,6 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @Schema(name = "code", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("code") public Integer getCode() { @@ -59,7 +58,6 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @Schema(name = "type", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("type") public String getType() { @@ -79,7 +77,6 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @Schema(name = "message", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("message") public String getMessage() { @@ -131,4 +128,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Order.java index 42861e6943e0..416b488c0d45 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Order.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Order.java @@ -71,7 +71,7 @@ public static StatusEnum fromValue(String value) { } } - private StatusEnum status; + private String status; private Boolean complete = false; @@ -84,7 +84,6 @@ public Order id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -104,7 +103,6 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @Schema(name = "petId", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("petId") public Long getPetId() { @@ -124,7 +122,6 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @Schema(name = "quantity", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("quantity") public Integer getQuantity() { @@ -144,7 +141,6 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Valid @Schema(name = "shipDate", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("shipDate") public OffsetDateTime getShipDate() { @@ -164,10 +160,9 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @Schema(name = "status", description = "Order Status", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("status") - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -184,7 +179,6 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @Schema(name = "complete", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("complete") public Boolean getComplete() { @@ -242,4 +236,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Pet.java index 3a09292128c6..3fe87d056c46 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Pet.java @@ -30,14 +30,12 @@ public class Pet { private Long id; - private Category category; + private @Valid Category category; - private String name; + private @NotNull String name; - @Valid - private List photoUrls = new ArrayList<>(); + private @NotNull List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** @@ -77,7 +75,7 @@ public static StatusEnum fromValue(String value) { } } - private StatusEnum status; + private String status; public Pet() { super(); @@ -100,7 +98,6 @@ public Pet id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -120,10 +117,9 @@ public Pet category(Category category) { * Get category * @return category */ - @Valid @Schema(name = "category", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("category") - public Category getCategory() { + public @Valid Category getCategory() { return category; } @@ -140,10 +136,9 @@ public Pet name(String name) { * Get name * @return name */ - @NotNull @Schema(name = "name", example = "doggie", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -168,10 +163,9 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @NotNull @Schema(name = "photoUrls", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("photoUrls") - public List getPhotoUrls() { + public @NotNull List getPhotoUrls() { return photoUrls; } @@ -179,7 +173,7 @@ public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List<@Valid Tag> tags) { + public Pet tags(List tags) { this.tags = tags; return this; } @@ -196,14 +190,13 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Valid @Schema(name = "tags", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("tags") public List<@Valid Tag> getTags() { return tags; } - public void setTags(List<@Valid Tag> tags) { + public void setTags(List tags) { this.tags = tags; } @@ -216,10 +209,9 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ - @Schema(name = "status", description = "pet status in the store", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("status") - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -274,4 +266,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Tag.java index f1a466ed802e..7e2360011252 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Tag.java @@ -35,7 +35,6 @@ public Tag id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -55,7 +54,6 @@ public Tag name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -105,4 +103,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/User.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/User.java index 916cc3d937f9..84014db8ad34 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/User.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/User.java @@ -47,7 +47,6 @@ public User id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -67,7 +66,6 @@ public User username(String username) { * Get username * @return username */ - @Schema(name = "username", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("username") public String getUsername() { @@ -87,7 +85,6 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @Schema(name = "firstName", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("firstName") public String getFirstName() { @@ -107,7 +104,6 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @Schema(name = "lastName", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("lastName") public String getLastName() { @@ -127,7 +123,6 @@ public User email(String email) { * Get email * @return email */ - @Schema(name = "email", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("email") public String getEmail() { @@ -147,7 +142,6 @@ public User password(String password) { * Get password * @return password */ - @Schema(name = "password", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("password") public String getPassword() { @@ -167,7 +161,6 @@ public User phone(String phone) { * Get phone * @return phone */ - @Schema(name = "phone", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("phone") public String getPhone() { @@ -187,7 +180,6 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @Schema(name = "userStatus", description = "User Status", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("userStatus") public Integer getUserStatus() { @@ -249,4 +241,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java index 1cfa9ab0dded..8f5781c34a7a 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java @@ -70,7 +70,7 @@ public interface PetApi { ) ResponseEntity addPet( - @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet pet ); @@ -100,7 +100,7 @@ ResponseEntity addPet( ) ResponseEntity deletePet( - @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, @Parameter(name = "api_key", description = "", in = ParameterIn.HEADER) @RequestHeader(value = "api_key", required = false) String apiKey ); @@ -136,7 +136,7 @@ ResponseEntity deletePet( ) ResponseEntity> findPetsByStatus( - @NotNull @Parameter(name = "status", deprecated = true, description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) @Deprecated List status + @Parameter(name = "status", deprecated = true, description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @RequestParam(value = "status") @Deprecated @NotNull List status ); @@ -174,7 +174,7 @@ ResponseEntity> findPetsByStatus( ) ResponseEntity> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) List tags + @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @RequestParam(value = "tags") @NotNull List tags ); @@ -211,7 +211,7 @@ ResponseEntity> findPetsByTags( ) ResponseEntity getPetById( - @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId + @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId ); @@ -254,7 +254,7 @@ ResponseEntity getPetById( ) ResponseEntity updatePet( - @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet pet ); @@ -286,9 +286,9 @@ ResponseEntity updatePet( ) ResponseEntity updatePetWithForm( - @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, - @Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, - @Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status + @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, + @Parameter(name = "name", description = "Updated name of the pet") @RequestParam(value = "name", required = false) String name, + @Parameter(name = "status", description = "Updated status of the pet") @RequestParam(value = "status", required = false) String status ); @@ -323,8 +323,8 @@ ResponseEntity updatePetWithForm( ) ResponseEntity uploadFile( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, - @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, + @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, + @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ); diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java index da7467f0f0b4..2f75eb7ca2bf 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java @@ -62,7 +62,7 @@ public interface StoreApi { ) ResponseEntity deleteOrder( - @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId + @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") @NotNull String orderId ); @@ -127,7 +127,7 @@ ResponseEntity> getInventory( ) ResponseEntity getOrderById( - @Min(1L) @Max(5L) @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("orderId") Long orderId + @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("orderId") @NotNull @Min(1L) @Max(5L) Long orderId ); @@ -160,7 +160,7 @@ ResponseEntity getOrderById( ) ResponseEntity placeOrder( - @Parameter(name = "Order", description = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order + @Parameter(name = "Order", description = "order placed for purchasing the pet", required = true) @RequestBody @NotNull @Valid Order order ); } diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java index 37a620556d02..2c0273db86fd 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java @@ -64,7 +64,7 @@ public interface UserApi { ) ResponseEntity createUser( - @Parameter(name = "User", description = "Created user object", required = true) @Valid @RequestBody User user + @Parameter(name = "User", description = "Created user object", required = true) @RequestBody @NotNull @Valid User user ); @@ -94,7 +94,7 @@ ResponseEntity createUser( ) ResponseEntity createUsersWithArrayInput( - @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + @Parameter(name = "User", description = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> user ); @@ -124,7 +124,7 @@ ResponseEntity createUsersWithArrayInput( ) ResponseEntity createUsersWithListInput( - @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + @Parameter(name = "User", description = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> user ); @@ -155,7 +155,7 @@ ResponseEntity createUsersWithListInput( ) ResponseEntity deleteUser( - @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") @NotNull String username ); @@ -189,7 +189,7 @@ ResponseEntity deleteUser( ) ResponseEntity getUserByName( - @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") @NotNull String username ); @@ -222,8 +222,8 @@ ResponseEntity getUserByName( ) ResponseEntity loginUser( - @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username, - @NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) String password + @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @RequestParam(value = "username") @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String username, + @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @RequestParam(value = "password") @NotNull String password ); @@ -284,8 +284,8 @@ ResponseEntity logoutUser( ) ResponseEntity updateUser( - @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, - @Parameter(name = "User", description = "Updated user object", required = true) @Valid @RequestBody User user + @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") @NotNull String username, + @Parameter(name = "User", description = "Updated user object", required = true) @RequestBody @NotNull @Valid User user ); } diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Category.java index 404ff8514e68..c0ab61ef2083 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Category.java @@ -24,7 +24,7 @@ public class Category { private Long id; - private String name; + private @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String name; public Category id(Long id) { this.id = id; @@ -35,7 +35,6 @@ public Category id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -55,10 +54,9 @@ public Category name(String name) { * Get name * @return name */ - @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") - public String getName() { + public @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String getName() { return name; } @@ -105,4 +103,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/ModelApiResponse.java index 0446e2562ee0..46704d751615 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -39,7 +39,6 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @Schema(name = "code", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("code") public Integer getCode() { @@ -59,7 +58,6 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @Schema(name = "type", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("type") public String getType() { @@ -79,7 +77,6 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @Schema(name = "message", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("message") public String getMessage() { @@ -131,4 +128,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java index 42861e6943e0..416b488c0d45 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java @@ -71,7 +71,7 @@ public static StatusEnum fromValue(String value) { } } - private StatusEnum status; + private String status; private Boolean complete = false; @@ -84,7 +84,6 @@ public Order id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -104,7 +103,6 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @Schema(name = "petId", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("petId") public Long getPetId() { @@ -124,7 +122,6 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @Schema(name = "quantity", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("quantity") public Integer getQuantity() { @@ -144,7 +141,6 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Valid @Schema(name = "shipDate", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("shipDate") public OffsetDateTime getShipDate() { @@ -164,10 +160,9 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @Schema(name = "status", description = "Order Status", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("status") - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -184,7 +179,6 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @Schema(name = "complete", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("complete") public Boolean getComplete() { @@ -242,4 +236,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java index a14eaa01737f..c60fee0780d9 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java @@ -30,14 +30,12 @@ public class Pet { private Long id; - private Category category; + private @Valid Category category; - private String name; + private @NotNull String name; - @Valid - private List photoUrls = new ArrayList<>(); + private @NotNull List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** @@ -78,7 +76,7 @@ public static StatusEnum fromValue(String value) { } @Deprecated - private StatusEnum status; + private String status; public Pet() { super(); @@ -101,7 +99,6 @@ public Pet id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -121,10 +118,9 @@ public Pet category(Category category) { * Get category * @return category */ - @Valid @Schema(name = "category", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("category") - public Category getCategory() { + public @Valid Category getCategory() { return category; } @@ -141,10 +137,9 @@ public Pet name(String name) { * Get name * @return name */ - @NotNull @Schema(name = "name", example = "doggie", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -169,10 +164,9 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @NotNull @Schema(name = "photoUrls", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("photoUrls") - public List getPhotoUrls() { + public @NotNull List getPhotoUrls() { return photoUrls; } @@ -180,7 +174,7 @@ public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List<@Valid Tag> tags) { + public Pet tags(List tags) { this.tags = tags; return this; } @@ -197,14 +191,13 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Valid @Schema(name = "tags", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("tags") public List<@Valid Tag> getTags() { return tags; } - public void setTags(List<@Valid Tag> tags) { + public void setTags(List tags) { this.tags = tags; } @@ -218,11 +211,10 @@ public Pet status(StatusEnum status) { * @return status * @deprecated */ - @Schema(name = "status", description = "pet status in the store", deprecated = true, requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("status") @Deprecated - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -281,4 +273,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Tag.java index f1a466ed802e..7e2360011252 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Tag.java @@ -35,7 +35,6 @@ public Tag id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -55,7 +54,6 @@ public Tag name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -105,4 +103,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/User.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/User.java index 916cc3d937f9..84014db8ad34 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/User.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/User.java @@ -47,7 +47,6 @@ public User id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -67,7 +66,6 @@ public User username(String username) { * Get username * @return username */ - @Schema(name = "username", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("username") public String getUsername() { @@ -87,7 +85,6 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @Schema(name = "firstName", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("firstName") public String getFirstName() { @@ -107,7 +104,6 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @Schema(name = "lastName", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("lastName") public String getLastName() { @@ -127,7 +123,6 @@ public User email(String email) { * Get email * @return email */ - @Schema(name = "email", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("email") public String getEmail() { @@ -147,7 +142,6 @@ public User password(String password) { * Get password * @return password */ - @Schema(name = "password", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("password") public String getPassword() { @@ -167,7 +161,6 @@ public User phone(String phone) { * Get phone * @return phone */ - @Schema(name = "phone", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("phone") public String getPhone() { @@ -187,7 +180,6 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @Schema(name = "userStatus", description = "User Status", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("userStatus") public Integer getUserStatus() { @@ -249,4 +241,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/PetApi.java index 5baeb5184db4..93619d354095 100644 --- a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/PetApi.java @@ -70,7 +70,7 @@ public interface PetApi { ) ResponseEntity addPet( - @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet pet ) throws Exception; @@ -100,7 +100,7 @@ ResponseEntity addPet( ) ResponseEntity deletePet( - @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, @Parameter(name = "api_key", description = "", in = ParameterIn.HEADER) @RequestHeader(value = "api_key", required = false) String apiKey ) throws Exception; @@ -136,7 +136,7 @@ ResponseEntity deletePet( ) ResponseEntity> findPetsByStatus( - @NotNull @Parameter(name = "status", deprecated = true, description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) @Deprecated List status + @Parameter(name = "status", deprecated = true, description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @RequestParam(value = "status") @Deprecated @NotNull List status ) throws Exception; @@ -174,7 +174,7 @@ ResponseEntity> findPetsByStatus( ) ResponseEntity> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) List tags + @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @RequestParam(value = "tags") @NotNull List tags ) throws Exception; @@ -211,7 +211,7 @@ ResponseEntity> findPetsByTags( ) ResponseEntity getPetById( - @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId + @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId ) throws Exception; @@ -254,7 +254,7 @@ ResponseEntity getPetById( ) ResponseEntity updatePet( - @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet pet ) throws Exception; @@ -286,9 +286,9 @@ ResponseEntity updatePet( ) ResponseEntity updatePetWithForm( - @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, - @Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, - @Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status + @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, + @Parameter(name = "name", description = "Updated name of the pet") @RequestParam(value = "name", required = false) String name, + @Parameter(name = "status", description = "Updated status of the pet") @RequestParam(value = "status", required = false) String status ) throws Exception; @@ -323,8 +323,8 @@ ResponseEntity updatePetWithForm( ) ResponseEntity uploadFile( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, - @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, + @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, + @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) throws Exception; diff --git a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/StoreApi.java index d3e5bef5b917..17c24fc1c62f 100644 --- a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/StoreApi.java @@ -62,7 +62,7 @@ public interface StoreApi { ) ResponseEntity deleteOrder( - @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId + @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") @NotNull String orderId ) throws Exception; @@ -127,7 +127,7 @@ ResponseEntity> getInventory( ) ResponseEntity getOrderById( - @Min(1L) @Max(5L) @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("orderId") Long orderId + @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("orderId") @NotNull @Min(1L) @Max(5L) Long orderId ) throws Exception; @@ -160,7 +160,7 @@ ResponseEntity getOrderById( ) ResponseEntity placeOrder( - @Parameter(name = "Order", description = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order + @Parameter(name = "Order", description = "order placed for purchasing the pet", required = true) @RequestBody @NotNull @Valid Order order ) throws Exception; } diff --git a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/UserApi.java index 727f490329b9..a30c300cfa28 100644 --- a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/UserApi.java @@ -64,7 +64,7 @@ public interface UserApi { ) ResponseEntity createUser( - @Parameter(name = "User", description = "Created user object", required = true) @Valid @RequestBody User user + @Parameter(name = "User", description = "Created user object", required = true) @RequestBody @NotNull @Valid User user ) throws Exception; @@ -94,7 +94,7 @@ ResponseEntity createUser( ) ResponseEntity createUsersWithArrayInput( - @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + @Parameter(name = "User", description = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> user ) throws Exception; @@ -124,7 +124,7 @@ ResponseEntity createUsersWithArrayInput( ) ResponseEntity createUsersWithListInput( - @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + @Parameter(name = "User", description = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> user ) throws Exception; @@ -155,7 +155,7 @@ ResponseEntity createUsersWithListInput( ) ResponseEntity deleteUser( - @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") @NotNull String username ) throws Exception; @@ -189,7 +189,7 @@ ResponseEntity deleteUser( ) ResponseEntity getUserByName( - @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") @NotNull String username ) throws Exception; @@ -222,8 +222,8 @@ ResponseEntity getUserByName( ) ResponseEntity loginUser( - @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username, - @NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) String password + @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @RequestParam(value = "username") @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String username, + @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @RequestParam(value = "password") @NotNull String password ) throws Exception; @@ -284,8 +284,8 @@ ResponseEntity logoutUser( ) ResponseEntity updateUser( - @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, - @Parameter(name = "User", description = "Updated user object", required = true) @Valid @RequestBody User user + @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") @NotNull String username, + @Parameter(name = "User", description = "Updated user object", required = true) @RequestBody @NotNull @Valid User user ) throws Exception; } diff --git a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Category.java index 404ff8514e68..c0ab61ef2083 100644 --- a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Category.java @@ -24,7 +24,7 @@ public class Category { private Long id; - private String name; + private @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String name; public Category id(Long id) { this.id = id; @@ -35,7 +35,6 @@ public Category id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -55,10 +54,9 @@ public Category name(String name) { * Get name * @return name */ - @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") - public String getName() { + public @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String getName() { return name; } @@ -105,4 +103,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/ModelApiResponse.java index 0446e2562ee0..46704d751615 100644 --- a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -39,7 +39,6 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @Schema(name = "code", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("code") public Integer getCode() { @@ -59,7 +58,6 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @Schema(name = "type", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("type") public String getType() { @@ -79,7 +77,6 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @Schema(name = "message", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("message") public String getMessage() { @@ -131,4 +128,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Order.java index 42861e6943e0..416b488c0d45 100644 --- a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Order.java +++ b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Order.java @@ -71,7 +71,7 @@ public static StatusEnum fromValue(String value) { } } - private StatusEnum status; + private String status; private Boolean complete = false; @@ -84,7 +84,6 @@ public Order id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -104,7 +103,6 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @Schema(name = "petId", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("petId") public Long getPetId() { @@ -124,7 +122,6 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @Schema(name = "quantity", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("quantity") public Integer getQuantity() { @@ -144,7 +141,6 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Valid @Schema(name = "shipDate", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("shipDate") public OffsetDateTime getShipDate() { @@ -164,10 +160,9 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @Schema(name = "status", description = "Order Status", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("status") - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -184,7 +179,6 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @Schema(name = "complete", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("complete") public Boolean getComplete() { @@ -242,4 +236,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Pet.java index a14eaa01737f..c60fee0780d9 100644 --- a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Pet.java @@ -30,14 +30,12 @@ public class Pet { private Long id; - private Category category; + private @Valid Category category; - private String name; + private @NotNull String name; - @Valid - private List photoUrls = new ArrayList<>(); + private @NotNull List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** @@ -78,7 +76,7 @@ public static StatusEnum fromValue(String value) { } @Deprecated - private StatusEnum status; + private String status; public Pet() { super(); @@ -101,7 +99,6 @@ public Pet id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -121,10 +118,9 @@ public Pet category(Category category) { * Get category * @return category */ - @Valid @Schema(name = "category", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("category") - public Category getCategory() { + public @Valid Category getCategory() { return category; } @@ -141,10 +137,9 @@ public Pet name(String name) { * Get name * @return name */ - @NotNull @Schema(name = "name", example = "doggie", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -169,10 +164,9 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @NotNull @Schema(name = "photoUrls", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("photoUrls") - public List getPhotoUrls() { + public @NotNull List getPhotoUrls() { return photoUrls; } @@ -180,7 +174,7 @@ public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List<@Valid Tag> tags) { + public Pet tags(List tags) { this.tags = tags; return this; } @@ -197,14 +191,13 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Valid @Schema(name = "tags", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("tags") public List<@Valid Tag> getTags() { return tags; } - public void setTags(List<@Valid Tag> tags) { + public void setTags(List tags) { this.tags = tags; } @@ -218,11 +211,10 @@ public Pet status(StatusEnum status) { * @return status * @deprecated */ - @Schema(name = "status", description = "pet status in the store", deprecated = true, requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("status") @Deprecated - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -281,4 +273,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Tag.java index f1a466ed802e..7e2360011252 100644 --- a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Tag.java @@ -35,7 +35,6 @@ public Tag id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -55,7 +54,6 @@ public Tag name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -105,4 +103,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/User.java b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/User.java index 916cc3d937f9..84014db8ad34 100644 --- a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/User.java +++ b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/User.java @@ -47,7 +47,6 @@ public User id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -67,7 +66,6 @@ public User username(String username) { * Get username * @return username */ - @Schema(name = "username", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("username") public String getUsername() { @@ -87,7 +85,6 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @Schema(name = "firstName", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("firstName") public String getFirstName() { @@ -107,7 +104,6 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @Schema(name = "lastName", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("lastName") public String getLastName() { @@ -127,7 +123,6 @@ public User email(String email) { * Get email * @return email */ - @Schema(name = "email", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("email") public String getEmail() { @@ -147,7 +142,6 @@ public User password(String password) { * Get password * @return password */ - @Schema(name = "password", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("password") public String getPassword() { @@ -167,7 +161,6 @@ public User phone(String phone) { * Get phone * @return phone */ - @Schema(name = "phone", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("phone") public String getPhone() { @@ -187,7 +180,6 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @Schema(name = "userStatus", description = "User Status", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("userStatus") public Integer getUserStatus() { @@ -249,4 +241,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java index 0377dbb5d7dc..5bf211e622af 100644 --- a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java @@ -74,7 +74,7 @@ default Optional getRequest() { ) default ResponseEntity addPet( - @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet pet ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -121,7 +121,7 @@ default ResponseEntity addPet( ) default ResponseEntity deletePet( - @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, @Parameter(name = "api_key", description = "", in = ParameterIn.HEADER) @RequestHeader(value = "api_key", required = false) String apiKey ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -160,7 +160,7 @@ default ResponseEntity deletePet( ) default ResponseEntity> findPetsByStatus( - @NotNull @Parameter(name = "status", deprecated = true, description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) @Deprecated List status + @Parameter(name = "status", deprecated = true, description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @RequestParam(value = "status") @Deprecated @NotNull List status ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -215,7 +215,7 @@ default ResponseEntity> findPetsByStatus( ) default ResponseEntity> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) List tags + @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @RequestParam(value = "tags") @NotNull List tags ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -269,7 +269,7 @@ default ResponseEntity> findPetsByTags( ) default ResponseEntity getPetById( - @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId + @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -329,7 +329,7 @@ default ResponseEntity getPetById( ) default ResponseEntity updatePet( - @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet pet ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -378,9 +378,9 @@ default ResponseEntity updatePet( ) default ResponseEntity updatePetWithForm( - @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, - @Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, - @Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status + @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, + @Parameter(name = "name", description = "Updated name of the pet") @RequestParam(value = "name", required = false) String name, + @Parameter(name = "status", description = "Updated status of the pet") @RequestParam(value = "status", required = false) String status ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -418,8 +418,8 @@ default ResponseEntity updatePetWithForm( ) default ResponseEntity uploadFile( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, - @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, + @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, + @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) { getRequest().ifPresent(request -> { diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java index 74d8bcac0efc..a2694bcee125 100644 --- a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java @@ -66,7 +66,7 @@ default Optional getRequest() { ) default ResponseEntity deleteOrder( - @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId + @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") @NotNull String orderId ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -137,7 +137,7 @@ default ResponseEntity> getInventory( ) default ResponseEntity getOrderById( - @Min(1L) @Max(5L) @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("orderId") Long orderId + @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("orderId") @NotNull @Min(1L) @Max(5L) Long orderId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -187,7 +187,7 @@ default ResponseEntity getOrderById( ) default ResponseEntity placeOrder( - @Parameter(name = "Order", description = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order + @Parameter(name = "Order", description = "order placed for purchasing the pet", required = true) @RequestBody @NotNull @Valid Order order ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java index 3b3aeca35485..f01a08513f2b 100644 --- a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java @@ -68,7 +68,7 @@ default Optional getRequest() { ) default ResponseEntity createUser( - @Parameter(name = "User", description = "Created user object", required = true) @Valid @RequestBody User user + @Parameter(name = "User", description = "Created user object", required = true) @RequestBody @NotNull @Valid User user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -101,7 +101,7 @@ default ResponseEntity createUser( ) default ResponseEntity createUsersWithArrayInput( - @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + @Parameter(name = "User", description = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -134,7 +134,7 @@ default ResponseEntity createUsersWithArrayInput( ) default ResponseEntity createUsersWithListInput( - @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + @Parameter(name = "User", description = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -168,7 +168,7 @@ default ResponseEntity createUsersWithListInput( ) default ResponseEntity deleteUser( - @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") @NotNull String username ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -205,7 +205,7 @@ default ResponseEntity deleteUser( ) default ResponseEntity getUserByName( - @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") @NotNull String username ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -255,8 +255,8 @@ default ResponseEntity getUserByName( ) default ResponseEntity loginUser( - @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username, - @NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) String password + @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @RequestParam(value = "username") @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String username, + @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @RequestParam(value = "password") @NotNull String password ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -323,8 +323,8 @@ default ResponseEntity logoutUser( ) default ResponseEntity updateUser( - @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, - @Parameter(name = "User", description = "Updated user object", required = true) @Valid @RequestBody User user + @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") @NotNull String username, + @Parameter(name = "User", description = "Updated user object", required = true) @RequestBody @NotNull @Valid User user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Category.java index 404ff8514e68..c0ab61ef2083 100644 --- a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Category.java @@ -24,7 +24,7 @@ public class Category { private Long id; - private String name; + private @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String name; public Category id(Long id) { this.id = id; @@ -35,7 +35,6 @@ public Category id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -55,10 +54,9 @@ public Category name(String name) { * Get name * @return name */ - @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") - public String getName() { + public @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String getName() { return name; } @@ -105,4 +103,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/ModelApiResponse.java index 0446e2562ee0..46704d751615 100644 --- a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -39,7 +39,6 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @Schema(name = "code", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("code") public Integer getCode() { @@ -59,7 +58,6 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @Schema(name = "type", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("type") public String getType() { @@ -79,7 +77,6 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @Schema(name = "message", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("message") public String getMessage() { @@ -131,4 +128,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Order.java index 42861e6943e0..416b488c0d45 100644 --- a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Order.java +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Order.java @@ -71,7 +71,7 @@ public static StatusEnum fromValue(String value) { } } - private StatusEnum status; + private String status; private Boolean complete = false; @@ -84,7 +84,6 @@ public Order id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -104,7 +103,6 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @Schema(name = "petId", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("petId") public Long getPetId() { @@ -124,7 +122,6 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @Schema(name = "quantity", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("quantity") public Integer getQuantity() { @@ -144,7 +141,6 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Valid @Schema(name = "shipDate", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("shipDate") public OffsetDateTime getShipDate() { @@ -164,10 +160,9 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @Schema(name = "status", description = "Order Status", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("status") - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -184,7 +179,6 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @Schema(name = "complete", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("complete") public Boolean getComplete() { @@ -242,4 +236,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java index a14eaa01737f..c60fee0780d9 100644 --- a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java @@ -30,14 +30,12 @@ public class Pet { private Long id; - private Category category; + private @Valid Category category; - private String name; + private @NotNull String name; - @Valid - private List photoUrls = new ArrayList<>(); + private @NotNull List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** @@ -78,7 +76,7 @@ public static StatusEnum fromValue(String value) { } @Deprecated - private StatusEnum status; + private String status; public Pet() { super(); @@ -101,7 +99,6 @@ public Pet id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -121,10 +118,9 @@ public Pet category(Category category) { * Get category * @return category */ - @Valid @Schema(name = "category", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("category") - public Category getCategory() { + public @Valid Category getCategory() { return category; } @@ -141,10 +137,9 @@ public Pet name(String name) { * Get name * @return name */ - @NotNull @Schema(name = "name", example = "doggie", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -169,10 +164,9 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @NotNull @Schema(name = "photoUrls", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("photoUrls") - public List getPhotoUrls() { + public @NotNull List getPhotoUrls() { return photoUrls; } @@ -180,7 +174,7 @@ public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List<@Valid Tag> tags) { + public Pet tags(List tags) { this.tags = tags; return this; } @@ -197,14 +191,13 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Valid @Schema(name = "tags", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("tags") public List<@Valid Tag> getTags() { return tags; } - public void setTags(List<@Valid Tag> tags) { + public void setTags(List tags) { this.tags = tags; } @@ -218,11 +211,10 @@ public Pet status(StatusEnum status) { * @return status * @deprecated */ - @Schema(name = "status", description = "pet status in the store", deprecated = true, requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("status") @Deprecated - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -281,4 +273,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Tag.java index f1a466ed802e..7e2360011252 100644 --- a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Tag.java @@ -35,7 +35,6 @@ public Tag id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -55,7 +54,6 @@ public Tag name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -105,4 +103,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/User.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/User.java index 916cc3d937f9..84014db8ad34 100644 --- a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/User.java +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/User.java @@ -47,7 +47,6 @@ public User id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -67,7 +66,6 @@ public User username(String username) { * Get username * @return username */ - @Schema(name = "username", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("username") public String getUsername() { @@ -87,7 +85,6 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @Schema(name = "firstName", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("firstName") public String getFirstName() { @@ -107,7 +104,6 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @Schema(name = "lastName", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("lastName") public String getLastName() { @@ -127,7 +123,6 @@ public User email(String email) { * Get email * @return email */ - @Schema(name = "email", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("email") public String getEmail() { @@ -147,7 +142,6 @@ public User password(String password) { * Get password * @return password */ - @Schema(name = "password", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("password") public String getPassword() { @@ -167,7 +161,6 @@ public User phone(String phone) { * Get phone * @return phone */ - @Schema(name = "phone", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("phone") public String getPhone() { @@ -187,7 +180,6 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @Schema(name = "userStatus", description = "User Status", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("userStatus") public Integer getUserStatus() { @@ -249,4 +241,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/BarApi.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/BarApi.java index 69a298955f34..6434538e8ae9 100644 --- a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/BarApi.java +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/BarApi.java @@ -66,7 +66,7 @@ default Optional getRequest() { ) default ResponseEntity createBar( - @Parameter(name = "BarCreate", description = "", required = true) @Valid @RequestBody BarCreate barCreate + @Parameter(name = "BarCreate", description = "", required = true) @RequestBody @NotNull @Valid BarCreate barCreate ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/FooApi.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/FooApi.java index e31ab3dbb597..ec7ffd8142cd 100644 --- a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/FooApi.java +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/FooApi.java @@ -66,7 +66,7 @@ default Optional getRequest() { ) default ResponseEntity createFoo( - @Parameter(name = "Foo", description = "The Foo to be created") @Valid @RequestBody(required = false) Foo foo + @Parameter(name = "Foo", description = "The Foo to be created") @RequestBody(required = false) @Valid Foo foo ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Addressable.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Addressable.java index 58cbe13228eb..4c8cdcf9d5f3 100644 --- a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Addressable.java +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Addressable.java @@ -35,7 +35,6 @@ public Addressable href(String href) { * Hyperlink reference * @return href */ - @Schema(name = "href", description = "Hyperlink reference", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("href") public String getHref() { @@ -55,7 +54,6 @@ public Addressable id(String id) { * unique identifier * @return id */ - @Schema(name = "id", description = "unique identifier", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public String getId() { @@ -127,12 +125,10 @@ public Addressable.Builder href(String href) { this.instance.href(href); return this; } - public Addressable.Builder id(String id) { this.instance.id(id); return this; } - /** * returns a built Addressable instance. * @@ -169,4 +165,3 @@ public Addressable.Builder toBuilder() { } } - diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Apple.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Apple.java index 4b3585687155..ce2355640db3 100644 --- a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Apple.java +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Apple.java @@ -25,9 +25,9 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class Apple implements Fruit { - private Integer seeds; + private @NotNull Integer seeds; - private FruitType fruitType; + private @NotNull FruitType fruitType; public Apple() { super(); @@ -50,10 +50,9 @@ public Apple seeds(Integer seeds) { * Get seeds * @return seeds */ - @NotNull @Schema(name = "seeds", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("seeds") - public Integer getSeeds() { + public @NotNull Integer getSeeds() { return seeds; } @@ -70,10 +69,9 @@ public Apple fruitType(FruitType fruitType) { * Get fruitType * @return fruitType */ - @NotNull @Valid @Schema(name = "fruitType", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("fruitType") - public FruitType getFruitType() { + public @NotNull FruitType getFruitType() { return fruitType; } @@ -142,12 +140,10 @@ public Apple.Builder seeds(Integer seeds) { this.instance.seeds(seeds); return this; } - public Apple.Builder fruitType(FruitType fruitType) { this.instance.fruitType(fruitType); return this; } - /** * returns a built Apple instance. * @@ -184,4 +180,3 @@ public Apple.Builder toBuilder() { } } - diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Banana.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Banana.java index 105f02cf0998..06eb67dcea80 100644 --- a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Banana.java +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Banana.java @@ -25,9 +25,9 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class Banana implements Fruit { - private Integer length; + private @NotNull Integer length; - private FruitType fruitType; + private @NotNull FruitType fruitType; public Banana() { super(); @@ -50,10 +50,9 @@ public Banana length(Integer length) { * Get length * @return length */ - @NotNull @Schema(name = "length", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("length") - public Integer getLength() { + public @NotNull Integer getLength() { return length; } @@ -70,10 +69,9 @@ public Banana fruitType(FruitType fruitType) { * Get fruitType * @return fruitType */ - @NotNull @Valid @Schema(name = "fruitType", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("fruitType") - public FruitType getFruitType() { + public @NotNull FruitType getFruitType() { return fruitType; } @@ -142,12 +140,10 @@ public Banana.Builder length(Integer length) { this.instance.length(length); return this; } - public Banana.Builder fruitType(FruitType fruitType) { this.instance.fruitType(fruitType); return this; } - /** * returns a built Banana instance. * @@ -184,4 +180,3 @@ public Banana.Builder toBuilder() { } } - diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Bar.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Bar.java index 60011e35ca30..86ab421fa301 100644 --- a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Bar.java +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Bar.java @@ -27,13 +27,13 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class Bar extends Entity implements BarRefOrValue { - private String id; + private @NotNull String id; private String barPropA; private String fooPropB; - private FooRefOrValue foo; + private @Valid FooRefOrValue foo; public Bar() { super(); @@ -56,10 +56,9 @@ public Bar id(String id) { * Get id * @return id */ - @NotNull @Schema(name = "id", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("id") - public String getId() { + public @NotNull String getId() { return id; } @@ -76,7 +75,6 @@ public Bar barPropA(String barPropA) { * Get barPropA * @return barPropA */ - @Schema(name = "barPropA", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("barPropA") public String getBarPropA() { @@ -96,7 +94,6 @@ public Bar fooPropB(String fooPropB) { * Get fooPropB * @return fooPropB */ - @Schema(name = "fooPropB", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("fooPropB") public String getFooPropB() { @@ -116,10 +113,9 @@ public Bar foo(FooRefOrValue foo) { * Get foo * @return foo */ - @Valid @Schema(name = "foo", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("foo") - public FooRefOrValue getFoo() { + public @Valid FooRefOrValue getFoo() { return foo; } @@ -218,46 +214,38 @@ public Bar.Builder id(String id) { this.instance.id(id); return this; } - public Bar.Builder barPropA(String barPropA) { this.instance.barPropA(barPropA); return this; } - public Bar.Builder fooPropB(String fooPropB) { this.instance.fooPropB(fooPropB); return this; } - public Bar.Builder foo(FooRefOrValue foo) { this.instance.foo(foo); return this; } - @Override public Bar.Builder href(String href) { this.instance.href(href); return this; } - @Override public Bar.Builder atSchemaLocation(String atSchemaLocation) { this.instance.atSchemaLocation(atSchemaLocation); return this; } - @Override public Bar.Builder atBaseType(String atBaseType) { this.instance.atBaseType(atBaseType); return this; } - @Override public Bar.Builder atType(String atType) { this.instance.atType(atType); return this; } - /** * returns a built Bar instance. * @@ -295,4 +283,3 @@ public Bar.Builder toBuilder() { } } - diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/BarCreate.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/BarCreate.java index 1ef9be2e8e67..ad8a78cb4070 100644 --- a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/BarCreate.java +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/BarCreate.java @@ -33,7 +33,7 @@ public class BarCreate extends Entity { private String fooPropB; - private FooRefOrValue foo; + private @Valid FooRefOrValue foo; public BarCreate() { super(); @@ -55,7 +55,6 @@ public BarCreate barPropA(String barPropA) { * Get barPropA * @return barPropA */ - @Schema(name = "barPropA", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("barPropA") public String getBarPropA() { @@ -75,7 +74,6 @@ public BarCreate fooPropB(String fooPropB) { * Get fooPropB * @return fooPropB */ - @Schema(name = "fooPropB", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("fooPropB") public String getFooPropB() { @@ -95,10 +93,9 @@ public BarCreate foo(FooRefOrValue foo) { * Get foo * @return foo */ - @Valid @Schema(name = "foo", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("foo") - public FooRefOrValue getFoo() { + public @Valid FooRefOrValue getFoo() { return foo; } @@ -199,47 +196,39 @@ public BarCreate.Builder barPropA(String barPropA) { this.instance.barPropA(barPropA); return this; } - public BarCreate.Builder fooPropB(String fooPropB) { this.instance.fooPropB(fooPropB); return this; } - public BarCreate.Builder foo(FooRefOrValue foo) { this.instance.foo(foo); return this; } - @Override public BarCreate.Builder href(String href) { this.instance.href(href); return this; } - @Override public BarCreate.Builder id(String id) { this.instance.id(id); return this; } - @Override public BarCreate.Builder atSchemaLocation(String atSchemaLocation) { this.instance.atSchemaLocation(atSchemaLocation); return this; } - @Override public BarCreate.Builder atBaseType(String atBaseType) { this.instance.atBaseType(atBaseType); return this; } - @Override public BarCreate.Builder atType(String atType) { this.instance.atType(atType); return this; } - /** * returns a built BarCreate instance. * @@ -277,4 +266,3 @@ public BarCreate.Builder toBuilder() { } } - diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/BarRef.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/BarRef.java index 68989a8be6f3..91a0196d83f3 100644 --- a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/BarRef.java +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/BarRef.java @@ -131,43 +131,36 @@ public BarRef.Builder name(String name) { this.instance.name(name); return this; } - @Override public BarRef.Builder atReferredType(String atReferredType) { this.instance.atReferredType(atReferredType); return this; } - @Override public BarRef.Builder href(String href) { this.instance.href(href); return this; } - @Override public BarRef.Builder id(String id) { this.instance.id(id); return this; } - @Override public BarRef.Builder atSchemaLocation(String atSchemaLocation) { this.instance.atSchemaLocation(atSchemaLocation); return this; } - @Override public BarRef.Builder atBaseType(String atBaseType) { this.instance.atBaseType(atBaseType); return this; } - @Override public BarRef.Builder atType(String atType) { this.instance.atType(atType); return this; } - /** * returns a built BarRef instance. * @@ -205,4 +198,3 @@ public BarRef.Builder toBuilder() { } } - diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Entity.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Entity.java index 48cd3dc8a984..d71c5c0bab0a 100644 --- a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Entity.java +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Entity.java @@ -46,7 +46,7 @@ public class Entity { private String atBaseType; - private String atType; + private @NotNull String atType; public Entity() { super(); @@ -68,7 +68,6 @@ public Entity href(String href) { * Hyperlink reference * @return href */ - @Schema(name = "href", description = "Hyperlink reference", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("href") public String getHref() { @@ -88,7 +87,6 @@ public Entity id(String id) { * unique identifier * @return id */ - @Schema(name = "id", description = "unique identifier", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public String getId() { @@ -108,7 +106,6 @@ public Entity atSchemaLocation(String atSchemaLocation) { * A URI to a JSON-Schema file that defines additional attributes and relationships * @return atSchemaLocation */ - @Schema(name = "@schemaLocation", description = "A URI to a JSON-Schema file that defines additional attributes and relationships", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("@schemaLocation") public String getAtSchemaLocation() { @@ -128,7 +125,6 @@ public Entity atBaseType(String atBaseType) { * When sub-classing, this defines the super-class * @return atBaseType */ - @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("@baseType") public String getAtBaseType() { @@ -148,10 +144,9 @@ public Entity atType(String atType) { * When sub-classing, this defines the sub-class Extensible name * @return atType */ - @NotNull @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("@type") - public String getAtType() { + public @NotNull String getAtType() { return atType; } @@ -229,27 +224,22 @@ public Entity.Builder href(String href) { this.instance.href(href); return this; } - public Entity.Builder id(String id) { this.instance.id(id); return this; } - public Entity.Builder atSchemaLocation(String atSchemaLocation) { this.instance.atSchemaLocation(atSchemaLocation); return this; } - public Entity.Builder atBaseType(String atBaseType) { this.instance.atBaseType(atBaseType); return this; } - public Entity.Builder atType(String atType) { this.instance.atType(atType); return this; } - /** * returns a built Entity instance. * @@ -286,4 +276,3 @@ public Entity.Builder toBuilder() { } } - diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/EntityRef.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/EntityRef.java index f36ed0cdd684..ba58cefa9f1b 100644 --- a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/EntityRef.java +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/EntityRef.java @@ -47,7 +47,7 @@ public class EntityRef { private String atBaseType; - private String atType; + private @NotNull String atType; public EntityRef() { super(); @@ -69,7 +69,6 @@ public EntityRef name(String name) { * Name of the related entity. * @return name */ - @Schema(name = "name", description = "Name of the related entity.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -89,7 +88,6 @@ public EntityRef atReferredType(String atReferredType) { * The actual type of the target instance when needed for disambiguation. * @return atReferredType */ - @Schema(name = "@referredType", description = "The actual type of the target instance when needed for disambiguation.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("@referredType") public String getAtReferredType() { @@ -109,7 +107,6 @@ public EntityRef href(String href) { * Hyperlink reference * @return href */ - @Schema(name = "href", description = "Hyperlink reference", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("href") public String getHref() { @@ -129,7 +126,6 @@ public EntityRef id(String id) { * unique identifier * @return id */ - @Schema(name = "id", description = "unique identifier", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public String getId() { @@ -149,7 +145,6 @@ public EntityRef atSchemaLocation(String atSchemaLocation) { * A URI to a JSON-Schema file that defines additional attributes and relationships * @return atSchemaLocation */ - @Schema(name = "@schemaLocation", description = "A URI to a JSON-Schema file that defines additional attributes and relationships", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("@schemaLocation") public String getAtSchemaLocation() { @@ -169,7 +164,6 @@ public EntityRef atBaseType(String atBaseType) { * When sub-classing, this defines the super-class * @return atBaseType */ - @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("@baseType") public String getAtBaseType() { @@ -189,10 +183,9 @@ public EntityRef atType(String atType) { * When sub-classing, this defines the sub-class Extensible name * @return atType */ - @NotNull @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("@type") - public String getAtType() { + public @NotNull String getAtType() { return atType; } @@ -276,37 +269,30 @@ public EntityRef.Builder name(String name) { this.instance.name(name); return this; } - public EntityRef.Builder atReferredType(String atReferredType) { this.instance.atReferredType(atReferredType); return this; } - public EntityRef.Builder href(String href) { this.instance.href(href); return this; } - public EntityRef.Builder id(String id) { this.instance.id(id); return this; } - public EntityRef.Builder atSchemaLocation(String atSchemaLocation) { this.instance.atSchemaLocation(atSchemaLocation); return this; } - public EntityRef.Builder atBaseType(String atBaseType) { this.instance.atBaseType(atBaseType); return this; } - public EntityRef.Builder atType(String atType) { this.instance.atType(atType); return this; } - /** * returns a built EntityRef instance. * @@ -343,4 +329,3 @@ public EntityRef.Builder toBuilder() { } } - diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Extensible.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Extensible.java index a798fc6d2b89..4605c8355b23 100644 --- a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Extensible.java +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Extensible.java @@ -25,7 +25,7 @@ public class Extensible { private String atBaseType; - private String atType; + private @NotNull String atType; public Extensible() { super(); @@ -47,7 +47,6 @@ public Extensible atSchemaLocation(String atSchemaLocation) { * A URI to a JSON-Schema file that defines additional attributes and relationships * @return atSchemaLocation */ - @Schema(name = "@schemaLocation", description = "A URI to a JSON-Schema file that defines additional attributes and relationships", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("@schemaLocation") public String getAtSchemaLocation() { @@ -67,7 +66,6 @@ public Extensible atBaseType(String atBaseType) { * When sub-classing, this defines the super-class * @return atBaseType */ - @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("@baseType") public String getAtBaseType() { @@ -87,10 +85,9 @@ public Extensible atType(String atType) { * When sub-classing, this defines the sub-class Extensible name * @return atType */ - @NotNull @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("@type") - public String getAtType() { + public @NotNull String getAtType() { return atType; } @@ -162,17 +159,14 @@ public Extensible.Builder atSchemaLocation(String atSchemaLocation) { this.instance.atSchemaLocation(atSchemaLocation); return this; } - public Extensible.Builder atBaseType(String atBaseType) { this.instance.atBaseType(atBaseType); return this; } - public Extensible.Builder atType(String atType) { this.instance.atType(atType); return this; } - /** * returns a built Extensible instance. * @@ -209,4 +203,3 @@ public Extensible.Builder toBuilder() { } } - diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Foo.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Foo.java index 621dbb53e697..990379cf398c 100644 --- a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Foo.java +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Foo.java @@ -50,7 +50,6 @@ public Foo fooPropA(String fooPropA) { * Get fooPropA * @return fooPropA */ - @Schema(name = "fooPropA", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("fooPropA") public String getFooPropA() { @@ -70,7 +69,6 @@ public Foo fooPropB(String fooPropB) { * Get fooPropB * @return fooPropB */ - @Schema(name = "fooPropB", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("fooPropB") public String getFooPropB() { @@ -171,42 +169,35 @@ public Foo.Builder fooPropA(String fooPropA) { this.instance.fooPropA(fooPropA); return this; } - public Foo.Builder fooPropB(String fooPropB) { this.instance.fooPropB(fooPropB); return this; } - @Override public Foo.Builder href(String href) { this.instance.href(href); return this; } - @Override public Foo.Builder id(String id) { this.instance.id(id); return this; } - @Override public Foo.Builder atSchemaLocation(String atSchemaLocation) { this.instance.atSchemaLocation(atSchemaLocation); return this; } - @Override public Foo.Builder atBaseType(String atBaseType) { this.instance.atBaseType(atBaseType); return this; } - @Override public Foo.Builder atType(String atType) { this.instance.atType(atType); return this; } - /** * returns a built Foo instance. * @@ -244,4 +235,3 @@ public Foo.Builder toBuilder() { } } - diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/FooRef.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/FooRef.java index a6e725016e8b..dfe3c2c2a9fb 100644 --- a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/FooRef.java +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/FooRef.java @@ -48,7 +48,6 @@ public FooRef foorefPropA(String foorefPropA) { * Get foorefPropA * @return foorefPropA */ - @Schema(name = "foorefPropA", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("foorefPropA") public String getFoorefPropA() { @@ -156,49 +155,41 @@ public FooRef.Builder foorefPropA(String foorefPropA) { this.instance.foorefPropA(foorefPropA); return this; } - @Override public FooRef.Builder name(String name) { this.instance.name(name); return this; } - @Override public FooRef.Builder atReferredType(String atReferredType) { this.instance.atReferredType(atReferredType); return this; } - @Override public FooRef.Builder href(String href) { this.instance.href(href); return this; } - @Override public FooRef.Builder id(String id) { this.instance.id(id); return this; } - @Override public FooRef.Builder atSchemaLocation(String atSchemaLocation) { this.instance.atSchemaLocation(atSchemaLocation); return this; } - @Override public FooRef.Builder atBaseType(String atBaseType) { this.instance.atBaseType(atBaseType); return this; } - @Override public FooRef.Builder atType(String atType) { this.instance.atType(atType); return this; } - /** * returns a built FooRef instance. * @@ -236,4 +227,3 @@ public FooRef.Builder toBuilder() { } } - diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Pasta.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Pasta.java index 3d323780ac1c..e3e351735ff1 100644 --- a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Pasta.java +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Pasta.java @@ -48,7 +48,6 @@ public Pasta vendor(String vendor) { * Get vendor * @return vendor */ - @Schema(name = "vendor", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("vendor") public String getVendor() { @@ -146,37 +145,31 @@ public Pasta.Builder vendor(String vendor) { this.instance.vendor(vendor); return this; } - @Override public Pasta.Builder href(String href) { this.instance.href(href); return this; } - @Override public Pasta.Builder id(String id) { this.instance.id(id); return this; } - @Override public Pasta.Builder atSchemaLocation(String atSchemaLocation) { this.instance.atSchemaLocation(atSchemaLocation); return this; } - @Override public Pasta.Builder atBaseType(String atBaseType) { this.instance.atBaseType(atBaseType); return this; } - @Override public Pasta.Builder atType(String atType) { this.instance.atType(atType); return this; } - /** * returns a built Pasta instance. * @@ -214,4 +207,3 @@ public Pasta.Builder toBuilder() { } } - diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Pizza.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Pizza.java index 44bd8c8d48fc..0663b8673300 100644 --- a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Pizza.java +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Pizza.java @@ -57,7 +57,6 @@ public Pizza pizzaSize(BigDecimal pizzaSize) { * Get pizzaSize * @return pizzaSize */ - @Valid @Schema(name = "pizzaSize", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("pizzaSize") public BigDecimal getPizzaSize() { @@ -155,37 +154,31 @@ public Pizza.Builder pizzaSize(BigDecimal pizzaSize) { this.instance.pizzaSize(pizzaSize); return this; } - @Override public Pizza.Builder href(String href) { this.instance.href(href); return this; } - @Override public Pizza.Builder id(String id) { this.instance.id(id); return this; } - @Override public Pizza.Builder atSchemaLocation(String atSchemaLocation) { this.instance.atSchemaLocation(atSchemaLocation); return this; } - @Override public Pizza.Builder atBaseType(String atBaseType) { this.instance.atBaseType(atBaseType); return this; } - @Override public Pizza.Builder atType(String atType) { this.instance.atType(atType); return this; } - /** * returns a built Pizza instance. * @@ -223,4 +216,3 @@ public Pizza.Builder toBuilder() { } } - diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/PizzaSpeziale.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/PizzaSpeziale.java index 3cb1f7fc0c2f..0e8e94d333bb 100644 --- a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/PizzaSpeziale.java +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/PizzaSpeziale.java @@ -49,7 +49,6 @@ public PizzaSpeziale toppings(String toppings) { * Get toppings * @return toppings */ - @Schema(name = "toppings", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("toppings") public String getToppings() { @@ -152,43 +151,36 @@ public PizzaSpeziale.Builder toppings(String toppings) { this.instance.toppings(toppings); return this; } - @Override public PizzaSpeziale.Builder pizzaSize(BigDecimal pizzaSize) { this.instance.pizzaSize(pizzaSize); return this; } - @Override public PizzaSpeziale.Builder href(String href) { this.instance.href(href); return this; } - @Override public PizzaSpeziale.Builder id(String id) { this.instance.id(id); return this; } - @Override public PizzaSpeziale.Builder atSchemaLocation(String atSchemaLocation) { this.instance.atSchemaLocation(atSchemaLocation); return this; } - @Override public PizzaSpeziale.Builder atBaseType(String atBaseType) { this.instance.atBaseType(atBaseType); return this; } - @Override public PizzaSpeziale.Builder atType(String atType) { this.instance.atType(atType); return this; } - /** * returns a built PizzaSpeziale instance. * @@ -226,4 +218,3 @@ public PizzaSpeziale.Builder toBuilder() { } } - diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/PetApi.java index 678910b80111..e49c1095cd78 100644 --- a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/PetApi.java @@ -74,7 +74,7 @@ default Optional getRequest() { ) default ResponseEntity addPet( - @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet pet ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -121,7 +121,7 @@ default ResponseEntity addPet( ) default ResponseEntity deletePet( - @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, @Parameter(name = "api_key", description = "", in = ParameterIn.HEADER) @RequestHeader(value = "api_key", required = false) String apiKey ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -160,7 +160,7 @@ default ResponseEntity deletePet( ) default ResponseEntity> findPetsByStatus( - @NotNull @Parameter(name = "status", deprecated = true, description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) @Deprecated List status + @Parameter(name = "status", deprecated = true, description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @RequestParam(value = "status") @Deprecated @NotNull List status ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -215,7 +215,7 @@ default ResponseEntity> findPetsByStatus( ) default ResponseEntity> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) List tags + @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @RequestParam(value = "tags") @NotNull List tags ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -269,7 +269,7 @@ default ResponseEntity> findPetsByTags( ) default ResponseEntity getPetById( - @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId + @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -329,7 +329,7 @@ default ResponseEntity getPetById( ) default ResponseEntity updatePet( - @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet pet ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -378,9 +378,9 @@ default ResponseEntity updatePet( ) default ResponseEntity updatePetWithForm( - @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, - @Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, - @Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status + @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, + @Parameter(name = "name", description = "Updated name of the pet") @RequestParam(value = "name", required = false) String name, + @Parameter(name = "status", description = "Updated status of the pet") @RequestParam(value = "status", required = false) String status ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -418,8 +418,8 @@ default ResponseEntity updatePetWithForm( ) default ResponseEntity uploadFile( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, - @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, + @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, + @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) { getRequest().ifPresent(request -> { diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/StoreApi.java index 1869a4e34d13..5c679c9b1b7a 100644 --- a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/StoreApi.java @@ -66,7 +66,7 @@ default Optional getRequest() { ) default ResponseEntity deleteOrder( - @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId + @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") @NotNull String orderId ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -137,7 +137,7 @@ default ResponseEntity> getInventory( ) default ResponseEntity getOrderById( - @Min(1L) @Max(5L) @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("orderId") Long orderId + @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("orderId") @NotNull @Min(1L) @Max(5L) Long orderId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -187,7 +187,7 @@ default ResponseEntity getOrderById( ) default ResponseEntity placeOrder( - @Parameter(name = "Order", description = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order + @Parameter(name = "Order", description = "order placed for purchasing the pet", required = true) @RequestBody @NotNull @Valid Order order ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/UserApi.java index 89d2e27ae6a3..502495b6d828 100644 --- a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/UserApi.java @@ -68,7 +68,7 @@ default Optional getRequest() { ) default ResponseEntity createUser( - @Parameter(name = "User", description = "Created user object", required = true) @Valid @RequestBody User user + @Parameter(name = "User", description = "Created user object", required = true) @RequestBody @NotNull @Valid User user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -101,7 +101,7 @@ default ResponseEntity createUser( ) default ResponseEntity createUsersWithArrayInput( - @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + @Parameter(name = "User", description = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -134,7 +134,7 @@ default ResponseEntity createUsersWithArrayInput( ) default ResponseEntity createUsersWithListInput( - @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + @Parameter(name = "User", description = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -168,7 +168,7 @@ default ResponseEntity createUsersWithListInput( ) default ResponseEntity deleteUser( - @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") @NotNull String username ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -205,7 +205,7 @@ default ResponseEntity deleteUser( ) default ResponseEntity getUserByName( - @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") @NotNull String username ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -255,8 +255,8 @@ default ResponseEntity getUserByName( ) default ResponseEntity loginUser( - @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username, - @NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) String password + @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @RequestParam(value = "username") @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String username, + @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @RequestParam(value = "password") @NotNull String password ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -323,8 +323,8 @@ default ResponseEntity logoutUser( ) default ResponseEntity updateUser( - @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, - @Parameter(name = "User", description = "Updated user object", required = true) @Valid @RequestBody User user + @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") @NotNull String username, + @Parameter(name = "User", description = "Updated user object", required = true) @RequestBody @NotNull @Valid User user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Category.java index 404ff8514e68..c0ab61ef2083 100644 --- a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Category.java @@ -24,7 +24,7 @@ public class Category { private Long id; - private String name; + private @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String name; public Category id(Long id) { this.id = id; @@ -35,7 +35,6 @@ public Category id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -55,10 +54,9 @@ public Category name(String name) { * Get name * @return name */ - @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") - public String getName() { + public @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String getName() { return name; } @@ -105,4 +103,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/ModelApiResponse.java index 0446e2562ee0..46704d751615 100644 --- a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -39,7 +39,6 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @Schema(name = "code", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("code") public Integer getCode() { @@ -59,7 +58,6 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @Schema(name = "type", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("type") public String getType() { @@ -79,7 +77,6 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @Schema(name = "message", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("message") public String getMessage() { @@ -131,4 +128,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Order.java index 42861e6943e0..416b488c0d45 100644 --- a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Order.java +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Order.java @@ -71,7 +71,7 @@ public static StatusEnum fromValue(String value) { } } - private StatusEnum status; + private String status; private Boolean complete = false; @@ -84,7 +84,6 @@ public Order id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -104,7 +103,6 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @Schema(name = "petId", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("petId") public Long getPetId() { @@ -124,7 +122,6 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @Schema(name = "quantity", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("quantity") public Integer getQuantity() { @@ -144,7 +141,6 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Valid @Schema(name = "shipDate", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("shipDate") public OffsetDateTime getShipDate() { @@ -164,10 +160,9 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @Schema(name = "status", description = "Order Status", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("status") - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -184,7 +179,6 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @Schema(name = "complete", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("complete") public Boolean getComplete() { @@ -242,4 +236,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Pet.java index a14eaa01737f..c60fee0780d9 100644 --- a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Pet.java @@ -30,14 +30,12 @@ public class Pet { private Long id; - private Category category; + private @Valid Category category; - private String name; + private @NotNull String name; - @Valid - private List photoUrls = new ArrayList<>(); + private @NotNull List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** @@ -78,7 +76,7 @@ public static StatusEnum fromValue(String value) { } @Deprecated - private StatusEnum status; + private String status; public Pet() { super(); @@ -101,7 +99,6 @@ public Pet id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -121,10 +118,9 @@ public Pet category(Category category) { * Get category * @return category */ - @Valid @Schema(name = "category", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("category") - public Category getCategory() { + public @Valid Category getCategory() { return category; } @@ -141,10 +137,9 @@ public Pet name(String name) { * Get name * @return name */ - @NotNull @Schema(name = "name", example = "doggie", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -169,10 +164,9 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @NotNull @Schema(name = "photoUrls", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("photoUrls") - public List getPhotoUrls() { + public @NotNull List getPhotoUrls() { return photoUrls; } @@ -180,7 +174,7 @@ public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List<@Valid Tag> tags) { + public Pet tags(List tags) { this.tags = tags; return this; } @@ -197,14 +191,13 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Valid @Schema(name = "tags", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("tags") public List<@Valid Tag> getTags() { return tags; } - public void setTags(List<@Valid Tag> tags) { + public void setTags(List tags) { this.tags = tags; } @@ -218,11 +211,10 @@ public Pet status(StatusEnum status) { * @return status * @deprecated */ - @Schema(name = "status", description = "pet status in the store", deprecated = true, requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("status") @Deprecated - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -281,4 +273,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Tag.java index f1a466ed802e..7e2360011252 100644 --- a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Tag.java @@ -35,7 +35,6 @@ public Tag id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -55,7 +54,6 @@ public Tag name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -105,4 +103,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/User.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/User.java index 916cc3d937f9..84014db8ad34 100644 --- a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/User.java +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/User.java @@ -47,7 +47,6 @@ public User id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -67,7 +66,6 @@ public User username(String username) { * Get username * @return username */ - @Schema(name = "username", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("username") public String getUsername() { @@ -87,7 +85,6 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @Schema(name = "firstName", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("firstName") public String getFirstName() { @@ -107,7 +104,6 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @Schema(name = "lastName", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("lastName") public String getLastName() { @@ -127,7 +123,6 @@ public User email(String email) { * Get email * @return email */ - @Schema(name = "email", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("email") public String getEmail() { @@ -147,7 +142,6 @@ public User password(String password) { * Get password * @return password */ - @Schema(name = "password", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("password") public String getPassword() { @@ -167,7 +161,6 @@ public User phone(String phone) { * Get phone * @return phone */ - @Schema(name = "phone", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("phone") public String getPhone() { @@ -187,7 +180,6 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @Schema(name = "userStatus", description = "User Status", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("userStatus") public Integer getUserStatus() { @@ -249,4 +241,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/PetApi.java index 89fb77fc3278..7e6219f66985 100644 --- a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/PetApi.java @@ -74,7 +74,7 @@ default Optional getRequest() { ) default ResponseEntity addPet( - @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet pet ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -121,7 +121,7 @@ default ResponseEntity addPet( ) default ResponseEntity deletePet( - @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, @Parameter(name = "api_key", description = "", in = ParameterIn.HEADER) @RequestHeader(value = "api_key", required = false) String apiKey ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -160,7 +160,7 @@ default ResponseEntity deletePet( ) default ResponseEntity> findPetsByStatus( - @NotNull @Parameter(name = "status", deprecated = true, description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) @Deprecated List status + @Parameter(name = "status", deprecated = true, description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @RequestParam(value = "status") @Deprecated @NotNull List status ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -215,7 +215,7 @@ default ResponseEntity> findPetsByStatus( ) default ResponseEntity> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) List tags + @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @RequestParam(value = "tags") @NotNull List tags ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -269,7 +269,7 @@ default ResponseEntity> findPetsByTags( ) default ResponseEntity getPetById( - @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId + @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -329,7 +329,7 @@ default ResponseEntity getPetById( ) default ResponseEntity updatePet( - @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet pet ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -378,9 +378,9 @@ default ResponseEntity updatePet( ) default ResponseEntity updatePetWithForm( - @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, - @Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, - @Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status + @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, + @Parameter(name = "name", description = "Updated name of the pet") @RequestParam(value = "name", required = false) String name, + @Parameter(name = "status", description = "Updated status of the pet") @RequestParam(value = "status", required = false) String status ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -418,8 +418,8 @@ default ResponseEntity updatePetWithForm( ) default ResponseEntity uploadFile( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, - @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, + @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, + @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) { getRequest().ifPresent(request -> { diff --git a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/StoreApi.java index 0b89427cfb79..a3a1a9fccbec 100644 --- a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/StoreApi.java @@ -66,7 +66,7 @@ default Optional getRequest() { ) default ResponseEntity deleteOrder( - @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId + @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") @NotNull String orderId ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -137,7 +137,7 @@ default ResponseEntity> getInventory( ) default ResponseEntity getOrderById( - @Min(1L) @Max(5L) @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("orderId") Long orderId + @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("orderId") @NotNull @Min(1L) @Max(5L) Long orderId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -187,7 +187,7 @@ default ResponseEntity getOrderById( ) default ResponseEntity placeOrder( - @Parameter(name = "Order", description = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order + @Parameter(name = "Order", description = "order placed for purchasing the pet", required = true) @RequestBody @NotNull @Valid Order order ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/UserApi.java index f0203aa45499..fd7bca78729a 100644 --- a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/UserApi.java @@ -68,7 +68,7 @@ default Optional getRequest() { ) default ResponseEntity createUser( - @Parameter(name = "User", description = "Created user object", required = true) @Valid @RequestBody User user + @Parameter(name = "User", description = "Created user object", required = true) @RequestBody @NotNull @Valid User user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -101,7 +101,7 @@ default ResponseEntity createUser( ) default ResponseEntity createUsersWithArrayInput( - @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + @Parameter(name = "User", description = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -134,7 +134,7 @@ default ResponseEntity createUsersWithArrayInput( ) default ResponseEntity createUsersWithListInput( - @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + @Parameter(name = "User", description = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -168,7 +168,7 @@ default ResponseEntity createUsersWithListInput( ) default ResponseEntity deleteUser( - @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") @NotNull String username ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -205,7 +205,7 @@ default ResponseEntity deleteUser( ) default ResponseEntity getUserByName( - @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") @NotNull String username ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -255,8 +255,8 @@ default ResponseEntity getUserByName( ) default ResponseEntity loginUser( - @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username, - @NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) String password + @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @RequestParam(value = "username") @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String username, + @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @RequestParam(value = "password") @NotNull String password ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -323,8 +323,8 @@ default ResponseEntity logoutUser( ) default ResponseEntity updateUser( - @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, - @Parameter(name = "User", description = "Updated user object", required = true) @Valid @RequestBody User user + @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") @NotNull String username, + @Parameter(name = "User", description = "Updated user object", required = true) @RequestBody @NotNull @Valid User user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/Category.java index 1aa172ad4a14..69f49f27eeb3 100644 --- a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/Category.java @@ -31,7 +31,7 @@ public class Category { private Long id; - private String name; + private @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String name; public Category() { super(); @@ -41,8 +41,8 @@ public Category() { * Constructor with all args parameters */ public Category(Long id, String name) { - this.id = id; - this.name = name; + this.id = id; + this.name = name; } public Category id(Long id) { @@ -54,7 +54,6 @@ public Category id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") @JacksonXmlProperty(localName = "id") @@ -76,12 +75,11 @@ public Category name(String name) { * Get name * @return name */ - @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") @JacksonXmlProperty(localName = "name") @XmlElement(name = "name") - public String getName() { + public @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String getName() { return name; } @@ -150,12 +148,10 @@ public Category.Builder id(Long id) { this.instance.id(id); return this; } - public Category.Builder name(String name) { this.instance.name(name); return this; } - /** * returns a built Category instance. * @@ -192,4 +188,3 @@ public Category.Builder toBuilder() { } } - diff --git a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/ModelApiResponse.java index 78171567ff38..9b7ae7c5ea3c 100644 --- a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -45,9 +45,9 @@ public ModelApiResponse() { * Constructor with all args parameters */ public ModelApiResponse(Integer code, String type, String message) { - this.code = code; - this.type = type; - this.message = message; + this.code = code; + this.type = type; + this.message = message; } public ModelApiResponse code(Integer code) { @@ -59,7 +59,6 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @Schema(name = "code", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("code") @JacksonXmlProperty(localName = "code") @@ -81,7 +80,6 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @Schema(name = "type", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("type") @JacksonXmlProperty(localName = "type") @@ -103,7 +101,6 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @Schema(name = "message", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("message") @JacksonXmlProperty(localName = "message") @@ -180,17 +177,14 @@ public ModelApiResponse.Builder code(Integer code) { this.instance.code(code); return this; } - public ModelApiResponse.Builder type(String type) { this.instance.type(type); return this; } - public ModelApiResponse.Builder message(String message) { this.instance.message(message); return this; } - /** * returns a built ModelApiResponse instance. * @@ -227,4 +221,3 @@ public ModelApiResponse.Builder toBuilder() { } } - diff --git a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/Order.java index 6bb40baa6f64..ba7a0c07ef68 100644 --- a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/Order.java +++ b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/Order.java @@ -78,7 +78,7 @@ public static StatusEnum fromValue(String value) { } } - private StatusEnum status; + private String status; private Boolean complete = false; @@ -90,12 +90,12 @@ public Order() { * Constructor with all args parameters */ public Order(Long id, Long petId, Integer quantity, OffsetDateTime shipDate, StatusEnum status, Boolean complete) { - this.id = id; - this.petId = petId; - this.quantity = quantity; - this.shipDate = shipDate; - this.status = status; - this.complete = complete; + this.id = id; + this.petId = petId; + this.quantity = quantity; + this.shipDate = shipDate; + this.status = status; + this.complete = complete; } public Order id(Long id) { @@ -107,7 +107,6 @@ public Order id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") @JacksonXmlProperty(localName = "id") @@ -129,7 +128,6 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @Schema(name = "petId", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("petId") @JacksonXmlProperty(localName = "petId") @@ -151,7 +149,6 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @Schema(name = "quantity", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("quantity") @JacksonXmlProperty(localName = "quantity") @@ -173,7 +170,6 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Valid @Schema(name = "shipDate", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("shipDate") @JacksonXmlProperty(localName = "shipDate") @@ -195,12 +191,11 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @Schema(name = "status", description = "Order Status", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("status") @JacksonXmlProperty(localName = "status") @XmlElement(name = "status") - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -217,7 +212,6 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @Schema(name = "complete", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("complete") @JacksonXmlProperty(localName = "complete") @@ -303,32 +297,26 @@ public Order.Builder id(Long id) { this.instance.id(id); return this; } - public Order.Builder petId(Long petId) { this.instance.petId(petId); return this; } - public Order.Builder quantity(Integer quantity) { this.instance.quantity(quantity); return this; } - public Order.Builder shipDate(OffsetDateTime shipDate) { this.instance.shipDate(shipDate); return this; } - public Order.Builder status(StatusEnum status) { this.instance.status(status); return this; } - public Order.Builder complete(Boolean complete) { this.instance.complete(complete); return this; } - /** * returns a built Order instance. * @@ -365,4 +353,3 @@ public Order.Builder toBuilder() { } } - diff --git a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/Pet.java index d07f4326cd92..040584f0ab5b 100644 --- a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/Pet.java @@ -37,14 +37,12 @@ public class Pet { private Long id; - private Category category; + private @Valid Category category; - private String name; + private @NotNull String name; - @Valid - private List photoUrls = new ArrayList<>(); + private @NotNull List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** @@ -85,7 +83,7 @@ public static StatusEnum fromValue(String value) { } @Deprecated - private StatusEnum status; + private String status; public Pet() { super(); @@ -102,13 +100,13 @@ public Pet(String name, List photoUrls) { /** * Constructor with all args parameters */ - public Pet(Long id, Category category, String name, List photoUrls, List<@Valid Tag> tags, StatusEnum status) { - this.id = id; - this.category = category; - this.name = name; - this.photoUrls = photoUrls; - this.tags = tags; - this.status = status; + public Pet(Long id, Category category, String name, List photoUrls, List tags, StatusEnum status) { + this.id = id; + this.category = category; + this.name = name; + this.photoUrls = photoUrls; + this.tags = tags; + this.status = status; } public Pet id(Long id) { @@ -120,7 +118,6 @@ public Pet id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") @JacksonXmlProperty(localName = "id") @@ -142,12 +139,11 @@ public Pet category(Category category) { * Get category * @return category */ - @Valid @Schema(name = "category", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("category") @JacksonXmlProperty(localName = "Category") @XmlElement(name = "Category") - public Category getCategory() { + public @Valid Category getCategory() { return category; } @@ -164,12 +160,11 @@ public Pet name(String name) { * Get name * @return name */ - @NotNull @Schema(name = "name", example = "doggie", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("name") @JacksonXmlProperty(localName = "name") @XmlElement(name = "name") - public String getName() { + public @NotNull String getName() { return name; } @@ -194,14 +189,13 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @NotNull @Schema(name = "photoUrls", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("photoUrls") @JacksonXmlProperty(localName = "photoUrl") @JacksonXmlElementWrapper(localName = "photoUrl", useWrapping = true) @XmlElement(name = "photoUrl") @XmlElementWrapper(name = "photoUrl") - public List getPhotoUrls() { + public @NotNull List getPhotoUrls() { return photoUrls; } @@ -209,7 +203,7 @@ public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List<@Valid Tag> tags) { + public Pet tags(List tags) { this.tags = tags; return this; } @@ -226,7 +220,6 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Valid @Schema(name = "tags", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("tags") @JacksonXmlProperty(localName = "Tag") @@ -237,7 +230,7 @@ public Pet addTagsItem(Tag tagsItem) { return tags; } - public void setTags(List<@Valid Tag> tags) { + public void setTags(List tags) { this.tags = tags; } @@ -251,13 +244,12 @@ public Pet status(StatusEnum status) { * @return status * @deprecated */ - @Schema(name = "status", description = "pet status in the store", deprecated = true, requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("status") @JacksonXmlProperty(localName = "status") @XmlElement(name = "status") @Deprecated - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -342,33 +334,27 @@ public Pet.Builder id(Long id) { this.instance.id(id); return this; } - public Pet.Builder category(Category category) { this.instance.category(category); return this; } - public Pet.Builder name(String name) { this.instance.name(name); return this; } - public Pet.Builder photoUrls(List photoUrls) { this.instance.photoUrls(photoUrls); return this; } - - public Pet.Builder tags(List<@Valid Tag> tags) { + public Pet.Builder tags(List tags) { this.instance.tags(tags); return this; } - @Deprecated public Pet.Builder status(StatusEnum status) { this.instance.status(status); return this; } - /** * returns a built Pet instance. * @@ -405,4 +391,3 @@ public Pet.Builder toBuilder() { } } - diff --git a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/Tag.java index b76363177378..da3499cbcc86 100644 --- a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/Tag.java @@ -41,8 +41,8 @@ public Tag() { * Constructor with all args parameters */ public Tag(Long id, String name) { - this.id = id; - this.name = name; + this.id = id; + this.name = name; } public Tag id(Long id) { @@ -54,7 +54,6 @@ public Tag id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") @JacksonXmlProperty(localName = "id") @@ -76,7 +75,6 @@ public Tag name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") @JacksonXmlProperty(localName = "name") @@ -150,12 +148,10 @@ public Tag.Builder id(Long id) { this.instance.id(id); return this; } - public Tag.Builder name(String name) { this.instance.name(name); return this; } - /** * returns a built Tag instance. * @@ -192,4 +188,3 @@ public Tag.Builder toBuilder() { } } - diff --git a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/User.java b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/User.java index cf6f11b057c9..7cf2aadd6947 100644 --- a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/User.java +++ b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/User.java @@ -53,14 +53,14 @@ public User() { * Constructor with all args parameters */ public User(Long id, String username, String firstName, String lastName, String email, String password, String phone, Integer userStatus) { - this.id = id; - this.username = username; - this.firstName = firstName; - this.lastName = lastName; - this.email = email; - this.password = password; - this.phone = phone; - this.userStatus = userStatus; + this.id = id; + this.username = username; + this.firstName = firstName; + this.lastName = lastName; + this.email = email; + this.password = password; + this.phone = phone; + this.userStatus = userStatus; } public User id(Long id) { @@ -72,7 +72,6 @@ public User id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") @JacksonXmlProperty(localName = "id") @@ -94,7 +93,6 @@ public User username(String username) { * Get username * @return username */ - @Schema(name = "username", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("username") @JacksonXmlProperty(localName = "username") @@ -116,7 +114,6 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @Schema(name = "firstName", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("firstName") @JacksonXmlProperty(localName = "firstName") @@ -138,7 +135,6 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @Schema(name = "lastName", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("lastName") @JacksonXmlProperty(localName = "lastName") @@ -160,7 +156,6 @@ public User email(String email) { * Get email * @return email */ - @Schema(name = "email", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("email") @JacksonXmlProperty(localName = "email") @@ -182,7 +177,6 @@ public User password(String password) { * Get password * @return password */ - @Schema(name = "password", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("password") @JacksonXmlProperty(localName = "password") @@ -204,7 +198,6 @@ public User phone(String phone) { * Get phone * @return phone */ - @Schema(name = "phone", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("phone") @JacksonXmlProperty(localName = "phone") @@ -226,7 +219,6 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @Schema(name = "userStatus", description = "User Status", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("userStatus") @JacksonXmlProperty(localName = "userStatus") @@ -318,42 +310,34 @@ public User.Builder id(Long id) { this.instance.id(id); return this; } - public User.Builder username(String username) { this.instance.username(username); return this; } - public User.Builder firstName(String firstName) { this.instance.firstName(firstName); return this; } - public User.Builder lastName(String lastName) { this.instance.lastName(lastName); return this; } - public User.Builder email(String email) { this.instance.email(email); return this; } - public User.Builder password(String password) { this.instance.password(password); return this; } - public User.Builder phone(String phone) { this.instance.phone(phone); return this; } - public User.Builder userStatus(Integer userStatus) { this.instance.userStatus(userStatus); return this; } - /** * returns a built User instance. * @@ -390,4 +374,3 @@ public User.Builder toBuilder() { } } - diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java index e810258d0237..c64431b55563 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -63,7 +63,7 @@ default AnotherFakeApiDelegate getDelegate() { ) default ResponseEntity call123testSpecialTags( - @Parameter(name = "Client", description = "client model", required = true) @Valid @RequestBody Client client + @Parameter(name = "Client", description = "client model", required = true) @RequestBody @NotNull @Valid Client client ) { return getDelegate().call123testSpecialTags(client); } diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java index 6082f3135337..5e409ca56a96 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java @@ -72,7 +72,7 @@ default FakeApiDelegate getDelegate() { ) default ResponseEntity createXmlItem( - @Parameter(name = "XmlItem", description = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem + @Parameter(name = "XmlItem", description = "XmlItem Body", required = true) @RequestBody @NotNull @Valid XmlItem xmlItem ) { return getDelegate().createXmlItem(xmlItem); } @@ -103,7 +103,7 @@ default ResponseEntity createXmlItem( ) default ResponseEntity fakeOuterBooleanSerialize( - @Parameter(name = "body", description = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body + @Parameter(name = "body", description = "Input boolean as post body") @RequestBody(required = false) Boolean body ) { return getDelegate().fakeOuterBooleanSerialize(body); } @@ -134,7 +134,7 @@ default ResponseEntity fakeOuterBooleanSerialize( ) default ResponseEntity fakeOuterCompositeSerialize( - @Parameter(name = "OuterComposite", description = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite outerComposite + @Parameter(name = "OuterComposite", description = "Input composite as post body") @RequestBody(required = false) @Valid OuterComposite outerComposite ) { return getDelegate().fakeOuterCompositeSerialize(outerComposite); } @@ -165,7 +165,7 @@ default ResponseEntity fakeOuterCompositeSerialize( ) default ResponseEntity fakeOuterNumberSerialize( - @Parameter(name = "body", description = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body + @Parameter(name = "body", description = "Input number as post body") @RequestBody(required = false) BigDecimal body ) { return getDelegate().fakeOuterNumberSerialize(body); } @@ -196,7 +196,7 @@ default ResponseEntity fakeOuterNumberSerialize( ) default ResponseEntity fakeOuterStringSerialize( - @Parameter(name = "body", description = "Input string as post body") @Valid @RequestBody(required = false) String body + @Parameter(name = "body", description = "Input string as post body") @RequestBody(required = false) String body ) { return getDelegate().fakeOuterStringSerialize(body); } @@ -224,7 +224,7 @@ default ResponseEntity fakeOuterStringSerialize( ) default ResponseEntity responseObjectDifferentNames( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId + @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId ) { return getDelegate().responseObjectDifferentNames(petId); } @@ -252,7 +252,7 @@ default ResponseEntity responseObjectDiff ) default ResponseEntity testBodyWithFileSchema( - @Parameter(name = "FileSchemaTestClass", description = "", required = true) @Valid @RequestBody FileSchemaTestClass fileSchemaTestClass + @Parameter(name = "FileSchemaTestClass", description = "", required = true) @RequestBody @NotNull @Valid FileSchemaTestClass fileSchemaTestClass ) { return getDelegate().testBodyWithFileSchema(fileSchemaTestClass); } @@ -279,8 +279,8 @@ default ResponseEntity testBodyWithFileSchema( ) default ResponseEntity testBodyWithQueryParams( - @NotNull @Parameter(name = "query", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "query", required = true) String query, - @Parameter(name = "User", description = "", required = true) @Valid @RequestBody User user + @Parameter(name = "query", description = "", required = true, in = ParameterIn.QUERY) @RequestParam(value = "query") @NotNull String query, + @Parameter(name = "User", description = "", required = true) @RequestBody @NotNull @Valid User user ) { return getDelegate().testBodyWithQueryParams(query, user); } @@ -312,7 +312,7 @@ default ResponseEntity testBodyWithQueryParams( ) default ResponseEntity testClientModel( - @Parameter(name = "Client", description = "client model", required = true) @Valid @RequestBody Client client + @Parameter(name = "Client", description = "client model", required = true) @RequestBody @NotNull @Valid Client client ) { return getDelegate().testClientModel(client); } @@ -359,20 +359,20 @@ default ResponseEntity testClientModel( ) default ResponseEntity testEndpointParameters( - @Parameter(name = "number", description = "None", required = true) @Valid @RequestParam(value = "number", required = true) BigDecimal number, - @Parameter(name = "double", description = "None", required = true) @Valid @RequestParam(value = "double", required = true) Double _double, - @Parameter(name = "pattern_without_delimiter", description = "None", required = true) @Valid @RequestParam(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, - @Parameter(name = "byte", description = "None", required = true) @Valid @RequestParam(value = "byte", required = true) byte[] _byte, - @Parameter(name = "integer", description = "None") @Valid @RequestParam(value = "integer", required = false) Integer integer, - @Parameter(name = "int32", description = "None") @Valid @RequestParam(value = "int32", required = false) Integer int32, - @Parameter(name = "int64", description = "None") @Valid @RequestParam(value = "int64", required = false) Long int64, - @Parameter(name = "float", description = "None") @Valid @RequestParam(value = "float", required = false) Float _float, - @Parameter(name = "string", description = "None") @Valid @RequestParam(value = "string", required = false) String string, + @Parameter(name = "number", description = "None", required = true) @RequestParam(value = "number") @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal number, + @Parameter(name = "double", description = "None", required = true) @RequestParam(value = "double") @NotNull @DecimalMin("67.8") @DecimalMax("123.4") Double _double, + @Parameter(name = "pattern_without_delimiter", description = "None", required = true) @RequestParam(value = "pattern_without_delimiter") @NotNull @Pattern(regexp = "^[A-Z].*") String patternWithoutDelimiter, + @Parameter(name = "byte", description = "None", required = true) @RequestParam(value = "byte") @NotNull byte[] _byte, + @Parameter(name = "integer", description = "None") @RequestParam(value = "integer", required = false) @Min(10) @Max(100) Integer integer, + @Parameter(name = "int32", description = "None") @RequestParam(value = "int32", required = false) @Min(20) @Max(200) Integer int32, + @Parameter(name = "int64", description = "None") @RequestParam(value = "int64", required = false) Long int64, + @Parameter(name = "float", description = "None") @RequestParam(value = "float", required = false) @DecimalMax("987.6") Float _float, + @Parameter(name = "string", description = "None") @RequestParam(value = "string", required = false) @Pattern(regexp = "/[a-z]/i") String string, @Parameter(name = "binary", description = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @Parameter(name = "date", description = "None") @Valid @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, - @Parameter(name = "dateTime", description = "None") @Valid @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, - @Parameter(name = "password", description = "None") @Valid @RequestParam(value = "password", required = false) String password, - @Parameter(name = "callback", description = "None") @Valid @RequestParam(value = "callback", required = false) String paramCallback + @Parameter(name = "date", description = "None") @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @Parameter(name = "dateTime", description = "None") @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @Parameter(name = "password", description = "None") @RequestParam(value = "password", required = false) @Size(min = 10, max = 64) String password, + @Parameter(name = "callback", description = "None") @RequestParam(value = "callback", required = false) String paramCallback ) { return getDelegate().testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); } @@ -410,14 +410,14 @@ default ResponseEntity testEndpointParameters( ) default ResponseEntity testEnumParameters( - @Parameter(name = "enum_header_string_array", description = "Header parameter enum test (string array)", in = ParameterIn.HEADER) @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @Parameter(name = "enum_header_string_array", description = "Header parameter enum test (string array)", in = ParameterIn.HEADER) @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, @Parameter(name = "enum_header_string", description = "Header parameter enum test (string)", in = ParameterIn.HEADER) @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, - @Parameter(name = "enum_query_string_array", description = "Query parameter enum test (string array)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, - @Parameter(name = "enum_query_string", description = "Query parameter enum test (string)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, - @Parameter(name = "enum_query_double", description = "Query parameter enum test (double)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, - @Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, - @Parameter(name = "enum_form_string", description = "Form parameter enum test (string)") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString + @Parameter(name = "enum_query_string_array", description = "Query parameter enum test (string array)", in = ParameterIn.QUERY) @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @Parameter(name = "enum_query_string", description = "Query parameter enum test (string)", in = ParameterIn.QUERY) @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, + @Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)", in = ParameterIn.QUERY) @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @Parameter(name = "enum_query_double", description = "Query parameter enum test (double)", in = ParameterIn.QUERY) @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)") @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @Parameter(name = "enum_form_string", description = "Form parameter enum test (string)") @RequestParam(value = "enum_form_string", required = false) String enumFormString ) { return getDelegate().testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } @@ -450,12 +450,12 @@ default ResponseEntity testEnumParameters( ) default ResponseEntity testGroupParameters( - @NotNull @Parameter(name = "required_string_group", description = "Required String in group parameters", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @Parameter(name = "required_string_group", description = "Required String in group parameters", required = true, in = ParameterIn.QUERY) @RequestParam(value = "required_string_group") @NotNull Integer requiredStringGroup, @NotNull @Parameter(name = "required_boolean_group", description = "Required Boolean in group parameters", required = true, in = ParameterIn.HEADER) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, - @NotNull @Parameter(name = "required_int64_group", description = "Required Integer in group parameters", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, - @Parameter(name = "string_group", description = "String in group parameters", in = ParameterIn.QUERY) @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup, + @Parameter(name = "required_int64_group", description = "Required Integer in group parameters", required = true, in = ParameterIn.QUERY) @RequestParam(value = "required_int64_group") @NotNull Long requiredInt64Group, + @Parameter(name = "string_group", description = "String in group parameters", in = ParameterIn.QUERY) @RequestParam(value = "string_group", required = false) Integer stringGroup, @Parameter(name = "boolean_group", description = "Boolean in group parameters", in = ParameterIn.HEADER) @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup, - @Parameter(name = "int64_group", description = "Integer in group parameters", in = ParameterIn.QUERY) @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + @Parameter(name = "int64_group", description = "Integer in group parameters", in = ParameterIn.QUERY) @RequestParam(value = "int64_group", required = false) Long int64Group ) { return getDelegate().testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); } @@ -484,7 +484,7 @@ default ResponseEntity testGroupParameters( ) default ResponseEntity testInlineAdditionalProperties( - @Parameter(name = "request_body", description = "request body", required = true) @Valid @RequestBody Map requestBody + @Parameter(name = "request_body", description = "request body", required = true) @RequestBody @NotNull Map requestBody ) { return getDelegate().testInlineAdditionalProperties(requestBody); } @@ -514,8 +514,8 @@ default ResponseEntity testInlineAdditionalProperties( ) default ResponseEntity testJsonFormData( - @Parameter(name = "param", description = "field1", required = true) @Valid @RequestParam(value = "param", required = true) String param, - @Parameter(name = "param2", description = "field2", required = true) @Valid @RequestParam(value = "param2", required = true) String param2 + @Parameter(name = "param", description = "field1", required = true) @RequestParam(value = "param") @NotNull String param, + @Parameter(name = "param2", description = "field2", required = true) @RequestParam(value = "param2") @NotNull String param2 ) { return getDelegate().testJsonFormData(param, param2); } @@ -544,7 +544,7 @@ default ResponseEntity testJsonFormData( ) default ResponseEntity testNullable( - @Parameter(name = "ChildWithNullable", description = "request body", required = true) @Valid @RequestBody ChildWithNullable childWithNullable + @Parameter(name = "ChildWithNullable", description = "request body", required = true) @RequestBody @NotNull @Valid ChildWithNullable childWithNullable ) { return getDelegate().testNullable(childWithNullable); } @@ -574,10 +574,10 @@ default ResponseEntity testNullable( ) default ResponseEntity testQueryParameterCollectionFormat( - @NotNull @Parameter(name = "pipe", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "pipe", required = true) List pipe, - @NotNull @Parameter(name = "http", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "http", required = true) List http, - @NotNull @Parameter(name = "url", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "url", required = true) List url, - @NotNull @Parameter(name = "context", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "context", required = true) List context + @Parameter(name = "pipe", description = "", required = true, in = ParameterIn.QUERY) @RequestParam(value = "pipe") @NotNull List pipe, + @Parameter(name = "http", description = "", required = true, in = ParameterIn.QUERY) @RequestParam(value = "http") @NotNull List http, + @Parameter(name = "url", description = "", required = true, in = ParameterIn.QUERY) @RequestParam(value = "url") @NotNull List url, + @Parameter(name = "context", description = "", required = true, in = ParameterIn.QUERY) @RequestParam(value = "context") @NotNull List context ) { return getDelegate().testQueryParameterCollectionFormat(pipe, http, url, context); } @@ -643,9 +643,9 @@ default ResponseEntity testWithResultExample( ) default ResponseEntity uploadFileWithRequiredFile( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, - @Parameter(name = "requiredFile", description = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, - @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata + @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, + @Parameter(name = "requiredFile", description = "file to upload", required = true) @RequestPart(value = "requiredFile") MultipartFile requiredFile, + @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata ) { return getDelegate().uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); } diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java index b37b0d70c217..42abdb2c28b5 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -237,14 +237,14 @@ default ResponseEntity testEndpointParameters(BigDecimal number, * or Not found (status code 404) * @see FakeApi#testEnumParameters */ - default ResponseEntity testEnumParameters(List enumHeaderStringArray, - String enumHeaderString, - List enumQueryStringArray, - String enumQueryString, - Integer enumQueryInteger, - Double enumQueryDouble, - List enumFormStringArray, - String enumFormString) { + default ResponseEntity testEnumParameters(List enumHeaderStringArray, + EnumHeaderStringEnum enumHeaderString, + List enumQueryStringArray, + EnumQueryStringEnum enumQueryString, + EnumQueryIntegerEnum enumQueryInteger, + EnumQueryDoubleEnum enumQueryDouble, + List enumFormStringArray, + EnumFormStringEnum enumFormString) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index bffe0f9a2766..19e8faebbdd4 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -66,7 +66,7 @@ default FakeClassnameTestApiDelegate getDelegate() { ) default ResponseEntity testClassname( - @Parameter(name = "Client", description = "client model", required = true) @Valid @RequestBody Client client + @Parameter(name = "Client", description = "client model", required = true) @RequestBody @NotNull @Valid Client client ) { return getDelegate().testClassname(client); } diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java index d518e6825567..14ace6469d53 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java @@ -67,7 +67,7 @@ default PetApiDelegate getDelegate() { ) default ResponseEntity addPet( - @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet pet ) { return getDelegate().addPet(pet); } @@ -101,7 +101,7 @@ default ResponseEntity addPet( ) default ResponseEntity deletePet( - @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, @Parameter(name = "api_key", description = "", in = ParameterIn.HEADER) @RequestHeader(value = "api_key", required = false) String apiKey ) { return getDelegate().deletePet(petId, apiKey); @@ -139,7 +139,7 @@ default ResponseEntity deletePet( ) default ResponseEntity> findPetsByStatus( - @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) List status + @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @RequestParam(value = "status") @NotNull List status ) { return getDelegate().findPetsByStatus(status); } @@ -179,7 +179,7 @@ default ResponseEntity> findPetsByStatus( ) default ResponseEntity> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) Set tags + @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @RequestParam(value = "tags") @NotNull Set tags ) { return getDelegate().findPetsByTags(tags); } @@ -218,7 +218,7 @@ default ResponseEntity> findPetsByTags( ) default ResponseEntity getPetById( - @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId + @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId ) { return getDelegate().getPetById(petId); } @@ -256,7 +256,7 @@ default ResponseEntity getPetById( ) default ResponseEntity updatePet( - @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet pet ) { return getDelegate().updatePet(pet); } @@ -290,9 +290,9 @@ default ResponseEntity updatePet( ) default ResponseEntity updatePetWithForm( - @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, - @Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, - @Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status + @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, + @Parameter(name = "name", description = "Updated name of the pet") @RequestParam(value = "name", required = false) String name, + @Parameter(name = "status", description = "Updated status of the pet") @RequestParam(value = "status", required = false) String status ) { return getDelegate().updatePetWithForm(petId, name, status); } @@ -329,8 +329,8 @@ default ResponseEntity updatePetWithForm( ) default ResponseEntity uploadFile( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, - @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, + @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, + @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) { return getDelegate().uploadFile(petId, additionalMetadata, file); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java index a30221d94724..bd31f7057d3c 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -66,7 +66,7 @@ default ResponseEntity deletePet(Long petId, * or Invalid status value (status code 400) * @see PetApi#findPetsByStatus */ - default ResponseEntity> findPetsByStatus(List status) { + default ResponseEntity> findPetsByStatus(List status) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java index 3dc06400295d..6f9d9e5c0a9d 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java @@ -62,7 +62,7 @@ default StoreApiDelegate getDelegate() { ) default ResponseEntity deleteOrder( - @Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("order_id") String orderId + @Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("order_id") @NotNull String orderId ) { return getDelegate().deleteOrder(orderId); } @@ -131,7 +131,7 @@ default ResponseEntity> getInventory( ) default ResponseEntity getOrderById( - @Min(1L) @Max(5L) @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("order_id") Long orderId + @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("order_id") @NotNull @Min(1L) @Max(5L) Long orderId ) { return getDelegate().getOrderById(orderId); } @@ -166,7 +166,7 @@ default ResponseEntity getOrderById( ) default ResponseEntity placeOrder( - @Parameter(name = "Order", description = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order + @Parameter(name = "Order", description = "order placed for purchasing the pet", required = true) @RequestBody @NotNull @Valid Order order ) { return getDelegate().placeOrder(order); } diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java index b815fc9692ce..2001be48e888 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java @@ -61,7 +61,7 @@ default UserApiDelegate getDelegate() { ) default ResponseEntity createUser( - @Parameter(name = "User", description = "Created user object", required = true) @Valid @RequestBody User user + @Parameter(name = "User", description = "Created user object", required = true) @RequestBody @NotNull @Valid User user ) { return getDelegate().createUser(user); } @@ -90,7 +90,7 @@ default ResponseEntity createUser( ) default ResponseEntity createUsersWithArrayInput( - @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + @Parameter(name = "User", description = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> user ) { return getDelegate().createUsersWithArrayInput(user); } @@ -119,7 +119,7 @@ default ResponseEntity createUsersWithArrayInput( ) default ResponseEntity createUsersWithListInput( - @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + @Parameter(name = "User", description = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> user ) { return getDelegate().createUsersWithListInput(user); } @@ -149,7 +149,7 @@ default ResponseEntity createUsersWithListInput( ) default ResponseEntity deleteUser( - @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") @NotNull String username ) { return getDelegate().deleteUser(username); } @@ -185,7 +185,7 @@ default ResponseEntity deleteUser( ) default ResponseEntity getUserByName( - @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") @NotNull String username ) { return getDelegate().getUserByName(username); } @@ -220,8 +220,8 @@ default ResponseEntity getUserByName( ) default ResponseEntity loginUser( - @NotNull @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username, - @NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) String password + @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @RequestParam(value = "username") @NotNull String username, + @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @RequestParam(value = "password") @NotNull String password ) { return getDelegate().loginUser(username, password); } @@ -280,8 +280,8 @@ default ResponseEntity logoutUser( ) default ResponseEntity updateUser( - @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, - @Parameter(name = "User", description = "Updated user object", required = true) @Valid @RequestBody User user + @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") @NotNull String username, + @Parameter(name = "User", description = "Updated user object", required = true) @RequestBody @NotNull @Valid User user ) { return getDelegate().updateUser(username, user); } diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java index dd48a55ef65a..176522acd979 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java @@ -47,7 +47,7 @@ default ResponseEntity createUser(User user) { * @return successful operation (status code 200) * @see UserApi#createUsersWithArrayInput */ - default ResponseEntity createUsersWithArrayInput(List<@Valid User> user) { + default ResponseEntity createUsersWithArrayInput(List user) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -60,7 +60,7 @@ default ResponseEntity createUsersWithArrayInput(List<@Valid User> user) { * @return successful operation (status code 200) * @see UserApi#createUsersWithListInput */ - default ResponseEntity createUsersWithListInput(List<@Valid User> user) { + default ResponseEntity createUsersWithListInput(List user) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index e14dd983f0f1..0fbe28ea4096 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -36,7 +36,6 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -124,4 +123,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 44db4e0c3810..a7327b15638f 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -37,7 +37,6 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 845d05d68bff..2275717952e3 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -36,7 +36,6 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -124,4 +123,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index cea8ea12066a..3b988af689b4 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -28,33 +28,25 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class AdditionalPropertiesClass { - @Valid private Map mapString = new HashMap<>(); - @Valid private Map mapNumber = new HashMap<>(); - @Valid private Map mapInteger = new HashMap<>(); - @Valid private Map mapBoolean = new HashMap<>(); - @Valid private Map> mapArrayInteger = new HashMap<>(); - @Valid private Map> mapArrayAnytype = new HashMap<>(); - @Valid private Map> mapMapString = new HashMap<>(); - @Valid private Map> mapMapAnytype = new HashMap<>(); private Object anytype1; - private JsonNullable anytype2 = JsonNullable.undefined(); + private JsonNullable anytype2 = JsonNullable.of(null); private Object anytype3; @@ -75,7 +67,6 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ - @Schema(name = "map_string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("map_string") public Map getMapString() { @@ -103,7 +94,6 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ - @Valid @Schema(name = "map_number", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("map_number") public Map getMapNumber() { @@ -131,7 +121,6 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ - @Schema(name = "map_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("map_integer") public Map getMapInteger() { @@ -159,7 +148,6 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ - @Schema(name = "map_boolean", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("map_boolean") public Map getMapBoolean() { @@ -187,7 +175,6 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { @@ -215,7 +202,6 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ - @Valid @Schema(name = "map_array_anytype", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("map_array_anytype") public Map> getMapArrayAnytype() { @@ -243,7 +229,6 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { @@ -271,7 +256,6 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { @@ -291,7 +275,6 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ - @Schema(name = "anytype_1", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("anytype_1") public Object getAnytype1() { @@ -302,8 +285,8 @@ public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; } - public AdditionalPropertiesClass anytype2(Object anytype2) { - this.anytype2 = JsonNullable.of(anytype2); + public AdditionalPropertiesClass anytype2(JsonNullable anytype2) { + this.anytype2 = anytype2; return this; } @@ -311,7 +294,6 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ - @Schema(name = "anytype_2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("anytype_2") public JsonNullable getAnytype2() { @@ -331,7 +313,6 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ - @Schema(name = "anytype_3", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("anytype_3") public Object getAnytype3() { @@ -410,4 +391,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 24c0a0bc4ce6..2f481c341c91 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -36,7 +36,6 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -124,4 +123,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index f881d9449131..2696f58c8203 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -37,7 +37,6 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index fc778107fdd6..ba3e02a567e7 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -37,7 +37,6 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index e7947a2a3e12..d2ddc6c57e1b 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -36,7 +36,6 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -124,4 +123,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java index c2dc521e5e33..9b889cae8fb3 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java @@ -35,7 +35,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class Animal { - private String className; + private @NotNull String className; private String color = "red"; @@ -59,10 +59,9 @@ public Animal className(String className) { * Get className * @return className */ - @NotNull @Schema(name = "className", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("className") - public String getClassName() { + public @NotNull String getClassName() { return className; } @@ -79,7 +78,6 @@ public Animal color(String color) { * Get color * @return color */ - @Schema(name = "color", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("color") public String getColor() { @@ -129,4 +127,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index bb399aa9082e..aae59ed763b2 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnly { - @Valid private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { @@ -45,7 +44,6 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ - @Valid @Schema(name = "ArrayArrayNumber", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("ArrayArrayNumber") public List> getArrayArrayNumber() { @@ -93,4 +91,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 4f171f476c4d..8cec84658578 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayOfNumberOnly { - @Valid private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnly arrayNumber(List arrayNumber) { @@ -45,7 +44,6 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ - @Valid @Schema(name = "ArrayNumber", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("ArrayNumber") public List getArrayNumber() { @@ -93,4 +91,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java index a3f194d7775f..2bf0c2999487 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java @@ -25,13 +25,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayTest { - @Valid private List arrayOfString = new ArrayList<>(); - @Valid private List> arrayArrayOfInteger = new ArrayList<>(); - @Valid private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTest arrayOfString(List arrayOfString) { @@ -51,7 +48,6 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ - @Schema(name = "array_of_string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("array_of_string") public List getArrayOfString() { @@ -79,7 +75,6 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ - @Valid @Schema(name = "array_array_of_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("array_array_of_integer") public List> getArrayArrayOfInteger() { @@ -90,12 +85,12 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } - public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) { + public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { if (this.arrayArrayOfModel == null) { this.arrayArrayOfModel = new ArrayList<>(); } @@ -107,14 +102,13 @@ public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayO * Get arrayArrayOfModel * @return arrayArrayOfModel */ - @Valid @Schema(name = "array_array_of_model", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("array_array_of_model") public List> getArrayArrayOfModel() { return arrayArrayOfModel; } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { + public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } @@ -159,4 +153,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java index 7a6ac9ff486b..1a6b0d9c10a3 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java @@ -66,7 +66,7 @@ public static KindEnum fromValue(String value) { } } - private KindEnum kind; + private String kind; public BigCat() { super(); @@ -88,10 +88,9 @@ public BigCat kind(KindEnum kind) { * Get kind * @return kind */ - @Schema(name = "kind", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("kind") - public KindEnum getKind() { + public String getKind() { return kind; } @@ -153,4 +152,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Capitalization.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Capitalization.java index 1305dc32a58a..16393de364a6 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Capitalization.java @@ -42,7 +42,6 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ - @Schema(name = "smallCamel", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("smallCamel") public String getSmallCamel() { @@ -62,7 +61,6 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ - @Schema(name = "CapitalCamel", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("CapitalCamel") public String getCapitalCamel() { @@ -82,7 +80,6 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ - @Schema(name = "small_Snake", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("small_Snake") public String getSmallSnake() { @@ -102,7 +99,6 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ - @Schema(name = "Capital_Snake", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("Capital_Snake") public String getCapitalSnake() { @@ -122,7 +118,6 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ - @Schema(name = "SCA_ETH_Flow_Points", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("SCA_ETH_Flow_Points") public String getScAETHFlowPoints() { @@ -142,7 +137,6 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ - @Schema(name = "ATT_NAME", description = "Name of the pet ", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("ATT_NAME") public String getATTNAME() { @@ -200,4 +194,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java index c33f8dbcfdb6..1efea170a7fc 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java @@ -56,7 +56,6 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ - @Schema(name = "declawed", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("declawed") public Boolean getDeclawed() { @@ -116,4 +115,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java index 1ee0ac465e49..cf3023ce3d17 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java @@ -23,7 +23,7 @@ public class Category { private Long id; - private String name = "default-name"; + private @NotNull String name = "default-name"; public Category() { super(); @@ -45,7 +45,6 @@ public Category id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -65,10 +64,9 @@ public Category name(String name) { * Get name * @return name */ - @NotNull @Schema(name = "name", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -115,4 +113,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ChildWithNullable.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ChildWithNullable.java index d87259a91c84..acadde522370 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ChildWithNullable.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ChildWithNullable.java @@ -40,7 +40,6 @@ public ChildWithNullable otherProperty(String otherProperty) { * Get otherProperty * @return otherProperty */ - @Schema(name = "otherProperty", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("otherProperty") public String getOtherProperty() { @@ -57,7 +56,7 @@ public ChildWithNullable type(TypeEnum type) { return this; } - public ChildWithNullable nullableProperty(String nullableProperty) { + public ChildWithNullable nullableProperty(JsonNullable nullableProperty) { super.nullableProperty(nullableProperty); return this; } @@ -111,4 +110,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ClassModel.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ClassModel.java index 2e1c3589bf30..ded911ffab13 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ClassModel.java @@ -33,7 +33,6 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @Schema(name = "_class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("_class") public String getPropertyClass() { @@ -81,4 +80,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Client.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Client.java index 2b0dabb274cf..2d0abb6d4339 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Client.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Client.java @@ -32,7 +32,6 @@ public Client client(String client) { * Get client * @return client */ - @Schema(name = "client", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("client") public String getClient() { @@ -80,4 +79,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ContainerDefaultValue.java index 37d809f95881..d767a05520ad 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ContainerDefaultValue.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -26,17 +26,13 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ContainerDefaultValue { - @Valid - private JsonNullable> nullableArray = JsonNullable.>undefined(); + private JsonNullable> nullableArray = JsonNullable.undefined(); - @Valid - private JsonNullable> nullableRequiredArray = JsonNullable.>undefined(); + private JsonNullable> nullableRequiredArray = JsonNullable.undefined(); - @Valid - private List requiredArray = new ArrayList<>(); + private @NotNull List requiredArray = new ArrayList<>(); - @Valid - private JsonNullable> nullableArrayWithDefault = JsonNullable.>undefined(); + private JsonNullable> nullableArrayWithDefault = JsonNullable.of(new ArrayList<>(Arrays.asList("foo", "bar"))); public ContainerDefaultValue() { super(); @@ -45,13 +41,13 @@ public ContainerDefaultValue() { /** * Constructor with only required parameters */ - public ContainerDefaultValue(List nullableRequiredArray, List requiredArray) { - this.nullableRequiredArray = JsonNullable.of(nullableRequiredArray); + public ContainerDefaultValue(JsonNullable> nullableRequiredArray, List requiredArray) { + this.nullableRequiredArray = nullableRequiredArray; this.requiredArray = requiredArray; } - public ContainerDefaultValue nullableArray(List nullableArray) { - this.nullableArray = JsonNullable.of(nullableArray); + public ContainerDefaultValue nullableArray(JsonNullable> nullableArray) { + this.nullableArray = nullableArray; return this; } @@ -67,7 +63,6 @@ public ContainerDefaultValue addNullableArrayItem(String nullableArrayItem) { * Get nullableArray * @return nullableArray */ - @Schema(name = "nullable_array", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("nullable_array") public JsonNullable> getNullableArray() { @@ -78,8 +73,8 @@ public void setNullableArray(JsonNullable> nullableArray) { this.nullableArray = nullableArray; } - public ContainerDefaultValue nullableRequiredArray(List nullableRequiredArray) { - this.nullableRequiredArray = JsonNullable.of(nullableRequiredArray); + public ContainerDefaultValue nullableRequiredArray(JsonNullable> nullableRequiredArray) { + this.nullableRequiredArray = nullableRequiredArray; return this; } @@ -95,7 +90,6 @@ public ContainerDefaultValue addNullableRequiredArrayItem(String nullableRequire * Get nullableRequiredArray * @return nullableRequiredArray */ - @NotNull @Schema(name = "nullable_required_array", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("nullable_required_array") public JsonNullable> getNullableRequiredArray() { @@ -123,10 +117,9 @@ public ContainerDefaultValue addRequiredArrayItem(String requiredArrayItem) { * Get requiredArray * @return requiredArray */ - @NotNull @Schema(name = "required_array", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("required_array") - public List getRequiredArray() { + public @NotNull List getRequiredArray() { return requiredArray; } @@ -134,8 +127,8 @@ public void setRequiredArray(List requiredArray) { this.requiredArray = requiredArray; } - public ContainerDefaultValue nullableArrayWithDefault(List nullableArrayWithDefault) { - this.nullableArrayWithDefault = JsonNullable.of(nullableArrayWithDefault); + public ContainerDefaultValue nullableArrayWithDefault(JsonNullable> nullableArrayWithDefault) { + this.nullableArrayWithDefault = nullableArrayWithDefault; return this; } @@ -151,7 +144,6 @@ public ContainerDefaultValue addNullableArrayWithDefaultItem(String nullableArra * Get nullableArrayWithDefault * @return nullableArrayWithDefault */ - @Schema(name = "nullable_array_with_default", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("nullable_array_with_default") public JsonNullable> getNullableArrayWithDefault() { @@ -216,4 +208,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java index cd79ddcbdd58..a4de5466df17 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java @@ -48,7 +48,6 @@ public Dog breed(String breed) { * Get breed * @return breed */ - @Schema(name = "breed", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("breed") public String getBreed() { @@ -108,4 +107,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java index b4a9a35507f9..0c6797f19e07 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java @@ -60,7 +60,7 @@ public static JustSymbolEnum fromValue(String value) { } } - private JustSymbolEnum justSymbol; + private String justSymbol; /** * Gets or Sets arrayEnum @@ -97,8 +97,7 @@ public static ArrayEnumEnum fromValue(String value) { } } - @Valid - private List arrayEnum = new ArrayList<>(); + private List arrayEnum = new ArrayList<>(); public EnumArrays justSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; @@ -109,10 +108,9 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ - @Schema(name = "just_symbol", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("just_symbol") - public JustSymbolEnum getJustSymbol() { + public String getJustSymbol() { return justSymbol; } @@ -137,10 +135,9 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ - @Schema(name = "array_enum", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("array_enum") - public List getArrayEnum() { + public List getArrayEnum() { return arrayEnum; } @@ -187,4 +184,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java index 7159ceb98955..5ca2a59fe4b8 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java @@ -62,7 +62,7 @@ public static EnumStringEnum fromValue(String value) { } } - private EnumStringEnum enumString; + private String enumString; /** * Gets or Sets enumStringRequired @@ -101,7 +101,7 @@ public static EnumStringRequiredEnum fromValue(String value) { } } - private EnumStringRequiredEnum enumStringRequired; + private @NotNull String enumStringRequired; /** * Gets or Sets enumInteger @@ -138,7 +138,7 @@ public static EnumIntegerEnum fromValue(Integer value) { } } - private EnumIntegerEnum enumInteger; + private Integer enumInteger; /** * Gets or Sets enumNumber @@ -175,7 +175,7 @@ public static EnumNumberEnum fromValue(Double value) { } } - private EnumNumberEnum enumNumber; + private Double enumNumber; private OuterEnum outerEnum; @@ -199,10 +199,9 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ - @Schema(name = "enum_string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("enum_string") - public EnumStringEnum getEnumString() { + public String getEnumString() { return enumString; } @@ -219,10 +218,9 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ - @NotNull @Schema(name = "enum_string_required", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("enum_string_required") - public EnumStringRequiredEnum getEnumStringRequired() { + public @NotNull String getEnumStringRequired() { return enumStringRequired; } @@ -239,10 +237,9 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ - @Schema(name = "enum_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("enum_integer") - public EnumIntegerEnum getEnumInteger() { + public Integer getEnumInteger() { return enumInteger; } @@ -259,10 +256,9 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ - @Schema(name = "enum_number", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("enum_number") - public EnumNumberEnum getEnumNumber() { + public Double getEnumNumber() { return enumNumber; } @@ -279,7 +275,6 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ - @Valid @Schema(name = "outerEnum", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("outerEnum") public OuterEnum getOuterEnum() { @@ -335,4 +330,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/File.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/File.java index e3238ec243e4..d48dd7ebefa4 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/File.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/File.java @@ -33,7 +33,6 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ - @Schema(name = "sourceURI", description = "Test capitalization", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("sourceURI") public String getSourceURI() { @@ -81,4 +80,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 1ec66d518194..df8406531213 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -25,9 +25,8 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class FileSchemaTestClass { - private File file; + private @Valid File file; - @Valid private List<@Valid File> files = new ArrayList<>(); public FileSchemaTestClass file(File file) { @@ -39,10 +38,9 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ - @Valid @Schema(name = "file", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("file") - public File getFile() { + public @Valid File getFile() { return file; } @@ -50,7 +48,7 @@ public void setFile(File file) { this.file = file; } - public FileSchemaTestClass files(List<@Valid File> files) { + public FileSchemaTestClass files(List files) { this.files = files; return this; } @@ -67,14 +65,13 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ - @Valid @Schema(name = "files", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("files") public List<@Valid File> getFiles() { return files; } - public void setFiles(List<@Valid File> files) { + public void setFiles(List files) { this.files = files; } @@ -117,4 +114,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java index 93ce3e21a0c4..7eb3ca99e151 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java @@ -29,33 +29,33 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class FormatTest { - private Integer integer; + private @Min(10) @Max(100) Integer integer; - private Integer int32; + private @Min(20) @Max(200) Integer int32; private Long int64; - private BigDecimal number; + private @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal number; - private Float _float; + private @DecimalMin("54.3") @DecimalMax("987.6") Float _float; - private Double _double; + private @DecimalMin("67.8") @DecimalMax("123.4") Double _double; - private String string; + private @Pattern(regexp = "/[a-z]/i") String string; - private byte[] _byte; + private @NotNull byte[] _byte; private org.springframework.core.io.Resource binary; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) - private LocalDate date; + private @NotNull LocalDate date; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; private UUID uuid; - private String password; + private @NotNull @Size(min = 10, max = 64) String password; private BigDecimal bigDecimal; @@ -84,10 +84,9 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ - @Min(10) @Max(100) @Schema(name = "integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("integer") - public Integer getInteger() { + public @Min(10) @Max(100) Integer getInteger() { return integer; } @@ -106,10 +105,9 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ - @Min(20) @Max(200) @Schema(name = "int32", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("int32") - public Integer getInt32() { + public @Min(20) @Max(200) Integer getInt32() { return int32; } @@ -126,7 +124,6 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ - @Schema(name = "int64", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("int64") public Long getInt64() { @@ -148,10 +145,9 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ - @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @Schema(name = "number", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("number") - public BigDecimal getNumber() { + public @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal getNumber() { return number; } @@ -170,10 +166,9 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ - @DecimalMin("54.3") @DecimalMax("987.6") @Schema(name = "float", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("float") - public Float getFloat() { + public @DecimalMin("54.3") @DecimalMax("987.6") Float getFloat() { return _float; } @@ -192,10 +187,9 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ - @DecimalMin("67.8") @DecimalMax("123.4") @Schema(name = "double", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("double") - public Double getDouble() { + public @DecimalMin("67.8") @DecimalMax("123.4") Double getDouble() { return _double; } @@ -212,10 +206,9 @@ public FormatTest string(String string) { * Get string * @return string */ - @Pattern(regexp = "/[a-z]/i") @Schema(name = "string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("string") - public String getString() { + public @Pattern(regexp = "/[a-z]/i") String getString() { return string; } @@ -232,10 +225,9 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ - @NotNull @Schema(name = "byte", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("byte") - public byte[] getByte() { + public @NotNull byte[] getByte() { return _byte; } @@ -252,7 +244,6 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ - @Valid @Schema(name = "binary", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("binary") public org.springframework.core.io.Resource getBinary() { @@ -272,10 +263,9 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ - @NotNull @Valid @Schema(name = "date", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("date") - public LocalDate getDate() { + public @NotNull LocalDate getDate() { return date; } @@ -292,7 +282,6 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ - @Valid @Schema(name = "dateTime", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dateTime") public OffsetDateTime getDateTime() { @@ -312,7 +301,6 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ - @Valid @Schema(name = "uuid", example = "72f98069-206d-4f12-9f12-3d1e525a8e84", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("uuid") public UUID getUuid() { @@ -332,10 +320,9 @@ public FormatTest password(String password) { * Get password * @return password */ - @NotNull @Size(min = 10, max = 64) @Schema(name = "password", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("password") - public String getPassword() { + public @NotNull @Size(min = 10, max = 64) String getPassword() { return password; } @@ -352,7 +339,6 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ - @Valid @Schema(name = "BigDecimal", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("BigDecimal") public BigDecimal getBigDecimal() { @@ -426,4 +412,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 7670645ce831..34599cb0ba57 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -36,7 +36,6 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ - @Schema(name = "bar", accessMode = Schema.AccessMode.READ_ONLY, requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("bar") public String getBar() { @@ -56,7 +55,6 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ - @Schema(name = "foo", accessMode = Schema.AccessMode.READ_ONLY, requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("foo") public String getFoo() { @@ -106,4 +104,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java index a449469c6aff..17d9a1719a7a 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java @@ -24,7 +24,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class MapTest { - @Valid private Map> mapMapOfString = new HashMap<>(); /** @@ -62,13 +61,10 @@ public static InnerEnum fromValue(String value) { } } - @Valid - private Map mapOfEnumString = new HashMap<>(); + private Map mapOfEnumString = new HashMap<>(); - @Valid private Map directMap = new HashMap<>(); - @Valid private Map indirectMap = new HashMap<>(); public MapTest mapMapOfString(Map> mapMapOfString) { @@ -88,7 +84,6 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ - @Valid @Schema(name = "map_map_of_string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("map_map_of_string") public Map> getMapMapOfString() { @@ -116,10 +111,9 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ - @Schema(name = "map_of_enum_string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("map_of_enum_string") - public Map getMapOfEnumString() { + public Map getMapOfEnumString() { return mapOfEnumString; } @@ -144,7 +138,6 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ - @Schema(name = "direct_map", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("direct_map") public Map getDirectMap() { @@ -172,7 +165,6 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ - @Schema(name = "indirect_map", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("indirect_map") public Map getIndirectMap() { @@ -226,4 +218,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index c02231565c15..9529c5b6ed55 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -32,8 +32,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; - @Valid - private Map map = new HashMap<>(); + private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { this.uuid = uuid; @@ -44,7 +43,6 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ - @Valid @Schema(name = "uuid", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("uuid") public UUID getUuid() { @@ -64,7 +62,6 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ - @Valid @Schema(name = "dateTime", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dateTime") public OffsetDateTime getDateTime() { @@ -92,10 +89,9 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ - @Valid @Schema(name = "map", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("map") - public Map getMap() { + public Map getMap() { return map; } @@ -144,4 +140,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Model200Response.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Model200Response.java index 47ea4a6e7f93..b70662fd9c2d 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Model200Response.java @@ -37,7 +37,6 @@ public Model200Response name(Integer name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public Integer getName() { @@ -57,7 +56,6 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @Schema(name = "class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("class") public String getPropertyClass() { @@ -107,4 +105,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelApiResponse.java index b3ff5612d992..fd7668cb99ed 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -38,7 +38,6 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @Schema(name = "code", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("code") public Integer getCode() { @@ -58,7 +57,6 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @Schema(name = "type", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("type") public String getType() { @@ -78,7 +76,6 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @Schema(name = "message", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("message") public String getMessage() { @@ -130,4 +127,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelList.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelList.java index 70456df44cc8..5084211cf5b6 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelList.java @@ -34,7 +34,6 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ - @Schema(name = "123-list", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("123-list") public String get123list() { @@ -82,4 +81,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelReturn.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelReturn.java index 9e66eec3d6df..a1d5d5179f43 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelReturn.java @@ -35,7 +35,6 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ - @Schema(name = "return", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("return") public Integer getReturn() { @@ -83,4 +82,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java index c700b682aea7..03fe3ae7ba3a 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java @@ -22,7 +22,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class Name { - private Integer name; + private @NotNull Integer name; private Integer snakeCase; @@ -50,10 +50,9 @@ public Name name(Integer name) { * Get name * @return name */ - @NotNull @Schema(name = "name", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("name") - public Integer getName() { + public @NotNull Integer getName() { return name; } @@ -70,7 +69,6 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ - @Schema(name = "snake_case", accessMode = Schema.AccessMode.READ_ONLY, requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("snake_case") public Integer getSnakeCase() { @@ -90,7 +88,6 @@ public Name property(String property) { * Get property * @return property */ - @Schema(name = "property", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("property") public String getProperty() { @@ -110,7 +107,6 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ - @Schema(name = "123Number", accessMode = Schema.AccessMode.READ_ONLY, requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("123Number") public Integer get123number() { @@ -164,4 +160,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NullableMapProperty.java index 1d2cc4aac787..f5df0da7713a 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NullableMapProperty.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -26,11 +26,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class NullableMapProperty { - @Valid - private JsonNullable> languageValues = JsonNullable.>undefined(); + private JsonNullable> languageValues = JsonNullable.undefined(); - public NullableMapProperty languageValues(Map languageValues) { - this.languageValues = JsonNullable.of(languageValues); + public NullableMapProperty languageValues(JsonNullable> languageValues) { + this.languageValues = languageValues; return this; } @@ -46,7 +45,6 @@ public NullableMapProperty putLanguageValuesItem(String key, String languageValu * Get languageValues * @return languageValues */ - @Schema(name = "languageValues", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("languageValues") public JsonNullable> getLanguageValues() { @@ -105,4 +103,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NumberOnly.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NumberOnly.java index e3eded935ac3..42dd6710923f 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NumberOnly.java @@ -33,7 +33,6 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ - @Valid @Schema(name = "JustNumber", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("JustNumber") public BigDecimal getJustNumber() { @@ -81,4 +80,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java index 52470395ae42..9ab26c93ad9e 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java @@ -70,7 +70,7 @@ public static StatusEnum fromValue(String value) { } } - private StatusEnum status; + private String status; private Boolean complete = false; @@ -83,7 +83,6 @@ public Order id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -103,7 +102,6 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @Schema(name = "petId", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("petId") public Long getPetId() { @@ -123,7 +121,6 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @Schema(name = "quantity", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("quantity") public Integer getQuantity() { @@ -143,7 +140,6 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Valid @Schema(name = "shipDate", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("shipDate") public OffsetDateTime getShipDate() { @@ -163,10 +159,9 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @Schema(name = "status", description = "Order Status", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("status") - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -183,7 +178,6 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @Schema(name = "complete", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("complete") public Boolean getComplete() { @@ -241,4 +235,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java index 3946d3ec3499..c351c962a713 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java @@ -37,7 +37,6 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ - @Valid @Schema(name = "my_number", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("my_number") public BigDecimal getMyNumber() { @@ -57,7 +56,6 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ - @Schema(name = "my_string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("my_string") public String getMyString() { @@ -77,7 +75,6 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ - @Schema(name = "my_boolean", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("my_boolean") public Boolean getMyBoolean() { @@ -129,4 +126,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ParentWithNullable.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ParentWithNullable.java index 0bca1c134462..f1aa3e27ec23 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ParentWithNullable.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ParentWithNullable.java @@ -70,9 +70,9 @@ public static TypeEnum fromValue(String value) { } } - private TypeEnum type; + private String type; - private JsonNullable nullableProperty = JsonNullable.undefined(); + private JsonNullable nullableProperty = JsonNullable.undefined(); public ParentWithNullable type(TypeEnum type) { this.type = type; @@ -83,10 +83,9 @@ public ParentWithNullable type(TypeEnum type) { * Get type * @return type */ - @Schema(name = "type", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("type") - public TypeEnum getType() { + public String getType() { return type; } @@ -94,8 +93,8 @@ public void setType(TypeEnum type) { this.type = type; } - public ParentWithNullable nullableProperty(String nullableProperty) { - this.nullableProperty = JsonNullable.of(nullableProperty); + public ParentWithNullable nullableProperty(JsonNullable nullableProperty) { + this.nullableProperty = nullableProperty; return this; } @@ -103,7 +102,6 @@ public ParentWithNullable nullableProperty(String nullableProperty) { * Get nullableProperty * @return nullableProperty */ - @Schema(name = "nullableProperty", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("nullableProperty") public JsonNullable getNullableProperty() { @@ -164,4 +162,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java index dc83b6dd7ead..02044cad8291 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java @@ -32,14 +32,12 @@ public class Pet { private Long id; - private Category category; + private @Valid Category category; - private String name; + private @NotNull String name; - @Valid - private Set photoUrls = new LinkedHashSet<>(); + private @NotNull Set photoUrls = new LinkedHashSet<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** @@ -80,7 +78,7 @@ public static StatusEnum fromValue(String value) { } @Deprecated - private StatusEnum status; + private String status; public Pet() { super(); @@ -103,7 +101,6 @@ public Pet id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -123,10 +120,9 @@ public Pet category(Category category) { * Get category * @return category */ - @Valid @Schema(name = "category", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("category") - public Category getCategory() { + public @Valid Category getCategory() { return category; } @@ -143,10 +139,9 @@ public Pet name(String name) { * Get name * @return name */ - @NotNull @Schema(name = "name", example = "doggie", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -171,10 +166,9 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @NotNull @Schema(name = "photoUrls", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("photoUrls") - public Set getPhotoUrls() { + public @NotNull Set getPhotoUrls() { return photoUrls; } @@ -183,7 +177,7 @@ public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List<@Valid Tag> tags) { + public Pet tags(List tags) { this.tags = tags; return this; } @@ -200,14 +194,13 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Valid @Schema(name = "tags", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("tags") public List<@Valid Tag> getTags() { return tags; } - public void setTags(List<@Valid Tag> tags) { + public void setTags(List tags) { this.tags = tags; } @@ -221,11 +214,10 @@ public Pet status(StatusEnum status) { * @return status * @deprecated */ - @Schema(name = "status", description = "pet status in the store", deprecated = true, requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("status") @Deprecated - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -284,4 +276,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ReadOnlyFirst.java index e2040366bf62..d9110ce888fa 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -34,7 +34,6 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ - @Schema(name = "bar", accessMode = Schema.AccessMode.READ_ONLY, requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("bar") public String getBar() { @@ -54,7 +53,6 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ - @Schema(name = "baz", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("baz") public String getBaz() { @@ -104,4 +102,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java index e739bd1d5ab5..f1ea0fb752ee 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java @@ -38,7 +38,6 @@ public ResponseObjectWithDifferentFieldNames normalPropertyName(String normalPro * Get normalPropertyName * @return normalPropertyName */ - @Schema(name = "normalPropertyName", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("normalPropertyName") public String getNormalPropertyName() { @@ -58,7 +57,6 @@ public ResponseObjectWithDifferentFieldNames UPPER_CASE_PROPERTY_SNAKE(String UP * Get UPPER_CASE_PROPERTY_SNAKE * @return UPPER_CASE_PROPERTY_SNAKE */ - @Schema(name = "UPPER_CASE_PROPERTY_SNAKE", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("UPPER_CASE_PROPERTY_SNAKE") public String getUPPERCASEPROPERTYSNAKE() { @@ -78,7 +76,6 @@ public ResponseObjectWithDifferentFieldNames lowerCasePropertyDashes(String lowe * Get lowerCasePropertyDashes * @return lowerCasePropertyDashes */ - @Schema(name = "lower-case-property-dashes", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("lower-case-property-dashes") public String getLowerCasePropertyDashes() { @@ -98,7 +95,6 @@ public ResponseObjectWithDifferentFieldNames propertyNameWithSpaces(String prope * Get propertyNameWithSpaces * @return propertyNameWithSpaces */ - @Schema(name = "property name with spaces", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("property name with spaces") public String getPropertyNameWithSpaces() { @@ -152,4 +148,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/SpecialModelName.java index 8173a14a8d8e..1f8ea115b01f 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/SpecialModelName.java @@ -34,7 +34,6 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ - @Schema(name = "$special[property.name]", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("$special[property.name]") public Long get$SpecialPropertyName() { @@ -82,4 +81,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Tag.java index 9e7ac9ebf805..583cbc48e7a6 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Tag.java @@ -34,7 +34,6 @@ public Tag id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -54,7 +53,6 @@ public Tag name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -104,4 +102,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java index ef54f5dc15e3..710408e8f15c 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -25,16 +25,15 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class TypeHolderDefault { - private String stringItem = "what"; + private @NotNull String stringItem = "what"; - private BigDecimal numberItem = new BigDecimal("1.234"); + private @NotNull BigDecimal numberItem = new BigDecimal("1.234"); - private Integer integerItem = -2; + private @NotNull Integer integerItem = -2; - private Boolean boolItem = true; + private @NotNull Boolean boolItem = true; - @Valid - private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); + private @NotNull List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); public TypeHolderDefault() { super(); @@ -60,10 +59,9 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @NotNull @Schema(name = "string_item", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("string_item") - public String getStringItem() { + public @NotNull String getStringItem() { return stringItem; } @@ -80,10 +78,9 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @NotNull @Valid @Schema(name = "number_item", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("number_item") - public BigDecimal getNumberItem() { + public @NotNull BigDecimal getNumberItem() { return numberItem; } @@ -100,10 +97,9 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @NotNull @Schema(name = "integer_item", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("integer_item") - public Integer getIntegerItem() { + public @NotNull Integer getIntegerItem() { return integerItem; } @@ -120,10 +116,9 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @NotNull @Schema(name = "bool_item", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("bool_item") - public Boolean getBoolItem() { + public @NotNull Boolean getBoolItem() { return boolItem; } @@ -148,10 +143,9 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @NotNull @Schema(name = "array_item", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("array_item") - public List getArrayItem() { + public @NotNull List getArrayItem() { return arrayItem; } @@ -204,4 +198,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java index b12daf9f5f3a..3cde60834c1a 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -25,18 +25,17 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class TypeHolderExample { - private String stringItem; + private @NotNull String stringItem; - private BigDecimal numberItem; + private @NotNull BigDecimal numberItem; - private Float floatItem; + private @NotNull Float floatItem; - private Integer integerItem; + private @NotNull Integer integerItem; - private Boolean boolItem; + private @NotNull Boolean boolItem; - @Valid - private List arrayItem = new ArrayList<>(); + private @NotNull List arrayItem = new ArrayList<>(); public TypeHolderExample() { super(); @@ -63,10 +62,9 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @NotNull @Schema(name = "string_item", example = "what", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("string_item") - public String getStringItem() { + public @NotNull String getStringItem() { return stringItem; } @@ -83,10 +81,9 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @NotNull @Valid @Schema(name = "number_item", example = "1.234", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("number_item") - public BigDecimal getNumberItem() { + public @NotNull BigDecimal getNumberItem() { return numberItem; } @@ -103,10 +100,9 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ - @NotNull @Schema(name = "float_item", example = "1.234", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("float_item") - public Float getFloatItem() { + public @NotNull Float getFloatItem() { return floatItem; } @@ -123,10 +119,9 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @NotNull @Schema(name = "integer_item", example = "-2", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("integer_item") - public Integer getIntegerItem() { + public @NotNull Integer getIntegerItem() { return integerItem; } @@ -143,10 +138,9 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @NotNull @Schema(name = "bool_item", example = "true", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("bool_item") - public Boolean getBoolItem() { + public @NotNull Boolean getBoolItem() { return boolItem; } @@ -171,10 +165,9 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @NotNull @Schema(name = "array_item", example = "[0,1,2,3]", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("array_item") - public List getArrayItem() { + public @NotNull List getArrayItem() { return arrayItem; } @@ -229,4 +222,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/User.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/User.java index ec465261f6a6..035f3adc34ea 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/User.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/User.java @@ -46,7 +46,6 @@ public User id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -66,7 +65,6 @@ public User username(String username) { * Get username * @return username */ - @Schema(name = "username", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("username") public String getUsername() { @@ -86,7 +84,6 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @Schema(name = "firstName", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("firstName") public String getFirstName() { @@ -106,7 +103,6 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @Schema(name = "lastName", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("lastName") public String getLastName() { @@ -126,7 +122,6 @@ public User email(String email) { * Get email * @return email */ - @Schema(name = "email", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("email") public String getEmail() { @@ -146,7 +141,6 @@ public User password(String password) { * Get password * @return password */ - @Schema(name = "password", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("password") public String getPassword() { @@ -166,7 +160,6 @@ public User phone(String phone) { * Get phone * @return phone */ - @Schema(name = "phone", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("phone") public String getPhone() { @@ -186,7 +179,6 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @Schema(name = "userStatus", description = "User Status", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("userStatus") public Integer getUserStatus() { @@ -248,4 +240,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java index ec738c3d64d6..ee4dfbc877a1 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java @@ -33,7 +33,6 @@ public class XmlItem { private Boolean attributeBoolean; - @Valid private List wrappedArray = new ArrayList<>(); private String nameString; @@ -44,10 +43,8 @@ public class XmlItem { private Boolean nameBoolean; - @Valid private List nameArray = new ArrayList<>(); - @Valid private List nameWrappedArray = new ArrayList<>(); private String prefixString; @@ -58,10 +55,8 @@ public class XmlItem { private Boolean prefixBoolean; - @Valid private List prefixArray = new ArrayList<>(); - @Valid private List prefixWrappedArray = new ArrayList<>(); private String namespaceString; @@ -72,10 +67,8 @@ public class XmlItem { private Boolean namespaceBoolean; - @Valid private List namespaceArray = new ArrayList<>(); - @Valid private List namespaceWrappedArray = new ArrayList<>(); private String prefixNsString; @@ -86,10 +79,8 @@ public class XmlItem { private Boolean prefixNsBoolean; - @Valid private List prefixNsArray = new ArrayList<>(); - @Valid private List prefixNsWrappedArray = new ArrayList<>(); public XmlItem attributeString(String attributeString) { @@ -101,7 +92,6 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ - @Schema(name = "attribute_string", example = "string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("attribute_string") public String getAttributeString() { @@ -121,7 +111,6 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ - @Valid @Schema(name = "attribute_number", example = "1.234", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("attribute_number") public BigDecimal getAttributeNumber() { @@ -141,7 +130,6 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ - @Schema(name = "attribute_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("attribute_integer") public Integer getAttributeInteger() { @@ -161,7 +149,6 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ - @Schema(name = "attribute_boolean", example = "true", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("attribute_boolean") public Boolean getAttributeBoolean() { @@ -189,7 +176,6 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ - @Schema(name = "wrapped_array", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("wrapped_array") public List getWrappedArray() { @@ -209,7 +195,6 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ - @Schema(name = "name_string", example = "string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name_string") public String getNameString() { @@ -229,7 +214,6 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ - @Valid @Schema(name = "name_number", example = "1.234", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name_number") public BigDecimal getNameNumber() { @@ -249,7 +233,6 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ - @Schema(name = "name_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name_integer") public Integer getNameInteger() { @@ -269,7 +252,6 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ - @Schema(name = "name_boolean", example = "true", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name_boolean") public Boolean getNameBoolean() { @@ -297,7 +279,6 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ - @Schema(name = "name_array", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name_array") public List getNameArray() { @@ -325,7 +306,6 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ - @Schema(name = "name_wrapped_array", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name_wrapped_array") public List getNameWrappedArray() { @@ -345,7 +325,6 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ - @Schema(name = "prefix_string", example = "string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_string") public String getPrefixString() { @@ -365,7 +344,6 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ - @Valid @Schema(name = "prefix_number", example = "1.234", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_number") public BigDecimal getPrefixNumber() { @@ -385,7 +363,6 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ - @Schema(name = "prefix_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_integer") public Integer getPrefixInteger() { @@ -405,7 +382,6 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ - @Schema(name = "prefix_boolean", example = "true", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_boolean") public Boolean getPrefixBoolean() { @@ -433,7 +409,6 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ - @Schema(name = "prefix_array", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_array") public List getPrefixArray() { @@ -461,7 +436,6 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ - @Schema(name = "prefix_wrapped_array", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_wrapped_array") public List getPrefixWrappedArray() { @@ -481,7 +455,6 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ - @Schema(name = "namespace_string", example = "string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespace_string") public String getNamespaceString() { @@ -501,7 +474,6 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ - @Valid @Schema(name = "namespace_number", example = "1.234", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespace_number") public BigDecimal getNamespaceNumber() { @@ -521,7 +493,6 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ - @Schema(name = "namespace_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { @@ -541,7 +512,6 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ - @Schema(name = "namespace_boolean", example = "true", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespace_boolean") public Boolean getNamespaceBoolean() { @@ -569,7 +539,6 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ - @Schema(name = "namespace_array", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespace_array") public List getNamespaceArray() { @@ -597,7 +566,6 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ - @Schema(name = "namespace_wrapped_array", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespace_wrapped_array") public List getNamespaceWrappedArray() { @@ -617,7 +585,6 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ - @Schema(name = "prefix_ns_string", example = "string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_ns_string") public String getPrefixNsString() { @@ -637,7 +604,6 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ - @Valid @Schema(name = "prefix_ns_number", example = "1.234", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_ns_number") public BigDecimal getPrefixNsNumber() { @@ -657,7 +623,6 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ - @Schema(name = "prefix_ns_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { @@ -677,7 +642,6 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ - @Schema(name = "prefix_ns_boolean", example = "true", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_ns_boolean") public Boolean getPrefixNsBoolean() { @@ -705,7 +669,6 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ - @Schema(name = "prefix_ns_array", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_ns_array") public List getPrefixNsArray() { @@ -733,7 +696,6 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ - @Schema(name = "prefix_ns_wrapped_array", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_ns_wrapped_array") public List getPrefixNsWrappedArray() { @@ -837,4 +799,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java index 141c3504ede4..0592b701ce24 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -67,7 +67,7 @@ default Optional getRequest() { ) default ResponseEntity call123testSpecialTags( - @Parameter(name = "Client", description = "client model", required = true) @Valid @RequestBody Client client + @Parameter(name = "Client", description = "client model", required = true) @RequestBody @NotNull @Valid Client client ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java index 7b63f2240f1d..46dba293872c 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java @@ -76,7 +76,7 @@ default Optional getRequest() { ) default ResponseEntity createXmlItem( - @Parameter(name = "XmlItem", description = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem + @Parameter(name = "XmlItem", description = "XmlItem Body", required = true) @RequestBody @NotNull @Valid XmlItem xmlItem ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -108,7 +108,7 @@ default ResponseEntity createXmlItem( ) default ResponseEntity fakeOuterBooleanSerialize( - @Parameter(name = "body", description = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body + @Parameter(name = "body", description = "Input boolean as post body") @RequestBody(required = false) Boolean body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -140,7 +140,7 @@ default ResponseEntity fakeOuterBooleanSerialize( ) default ResponseEntity fakeOuterCompositeSerialize( - @Parameter(name = "OuterComposite", description = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite outerComposite + @Parameter(name = "OuterComposite", description = "Input composite as post body") @RequestBody(required = false) @Valid OuterComposite outerComposite ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -181,7 +181,7 @@ default ResponseEntity fakeOuterCompositeSerialize( ) default ResponseEntity fakeOuterNumberSerialize( - @Parameter(name = "body", description = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body + @Parameter(name = "body", description = "Input number as post body") @RequestBody(required = false) BigDecimal body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -213,7 +213,7 @@ default ResponseEntity fakeOuterNumberSerialize( ) default ResponseEntity fakeOuterStringSerialize( - @Parameter(name = "body", description = "Input string as post body") @Valid @RequestBody(required = false) String body + @Parameter(name = "body", description = "Input string as post body") @RequestBody(required = false) String body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -242,7 +242,7 @@ default ResponseEntity fakeOuterStringSerialize( ) default ResponseEntity responseObjectDifferentNames( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId + @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -280,7 +280,7 @@ default ResponseEntity responseObjectDiff ) default ResponseEntity testBodyWithFileSchema( - @Parameter(name = "FileSchemaTestClass", description = "", required = true) @Valid @RequestBody FileSchemaTestClass fileSchemaTestClass + @Parameter(name = "FileSchemaTestClass", description = "", required = true) @RequestBody @NotNull @Valid FileSchemaTestClass fileSchemaTestClass ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -308,8 +308,8 @@ default ResponseEntity testBodyWithFileSchema( ) default ResponseEntity testBodyWithQueryParams( - @NotNull @Parameter(name = "query", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "query", required = true) String query, - @Parameter(name = "User", description = "", required = true) @Valid @RequestBody User user + @Parameter(name = "query", description = "", required = true, in = ParameterIn.QUERY) @RequestParam(value = "query") @NotNull String query, + @Parameter(name = "User", description = "", required = true) @RequestBody @NotNull @Valid User user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -342,7 +342,7 @@ default ResponseEntity testBodyWithQueryParams( ) default ResponseEntity testClientModel( - @Parameter(name = "Client", description = "client model", required = true) @Valid @RequestBody Client client + @Parameter(name = "Client", description = "client model", required = true) @RequestBody @NotNull @Valid Client client ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -399,20 +399,20 @@ default ResponseEntity testClientModel( ) default ResponseEntity testEndpointParameters( - @Parameter(name = "number", description = "None", required = true) @Valid @RequestParam(value = "number", required = true) BigDecimal number, - @Parameter(name = "double", description = "None", required = true) @Valid @RequestParam(value = "double", required = true) Double _double, - @Parameter(name = "pattern_without_delimiter", description = "None", required = true) @Valid @RequestParam(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, - @Parameter(name = "byte", description = "None", required = true) @Valid @RequestParam(value = "byte", required = true) byte[] _byte, - @Parameter(name = "integer", description = "None") @Valid @RequestParam(value = "integer", required = false) Integer integer, - @Parameter(name = "int32", description = "None") @Valid @RequestParam(value = "int32", required = false) Integer int32, - @Parameter(name = "int64", description = "None") @Valid @RequestParam(value = "int64", required = false) Long int64, - @Parameter(name = "float", description = "None") @Valid @RequestParam(value = "float", required = false) Float _float, - @Parameter(name = "string", description = "None") @Valid @RequestParam(value = "string", required = false) String string, + @Parameter(name = "number", description = "None", required = true) @RequestParam(value = "number") @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal number, + @Parameter(name = "double", description = "None", required = true) @RequestParam(value = "double") @NotNull @DecimalMin("67.8") @DecimalMax("123.4") Double _double, + @Parameter(name = "pattern_without_delimiter", description = "None", required = true) @RequestParam(value = "pattern_without_delimiter") @NotNull @Pattern(regexp = "^[A-Z].*") String patternWithoutDelimiter, + @Parameter(name = "byte", description = "None", required = true) @RequestParam(value = "byte") @NotNull byte[] _byte, + @Parameter(name = "integer", description = "None") @RequestParam(value = "integer", required = false) @Min(10) @Max(100) Integer integer, + @Parameter(name = "int32", description = "None") @RequestParam(value = "int32", required = false) @Min(20) @Max(200) Integer int32, + @Parameter(name = "int64", description = "None") @RequestParam(value = "int64", required = false) Long int64, + @Parameter(name = "float", description = "None") @RequestParam(value = "float", required = false) @DecimalMax("987.6") Float _float, + @Parameter(name = "string", description = "None") @RequestParam(value = "string", required = false) @Pattern(regexp = "/[a-z]/i") String string, @Parameter(name = "binary", description = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @Parameter(name = "date", description = "None") @Valid @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, - @Parameter(name = "dateTime", description = "None") @Valid @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, - @Parameter(name = "password", description = "None") @Valid @RequestParam(value = "password", required = false) String password, - @Parameter(name = "callback", description = "None") @Valid @RequestParam(value = "callback", required = false) String paramCallback + @Parameter(name = "date", description = "None") @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @Parameter(name = "dateTime", description = "None") @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @Parameter(name = "password", description = "None") @RequestParam(value = "password", required = false) @Size(min = 10, max = 64) String password, + @Parameter(name = "callback", description = "None") @RequestParam(value = "callback", required = false) String paramCallback ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -453,12 +453,12 @@ default ResponseEntity testEndpointParameters( ) default ResponseEntity testEnumParameters( - @Parameter(name = "enum_query_string_array", description = "Query parameter enum test (string array)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, - @Parameter(name = "enum_query_string", description = "Query parameter enum test (string)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, - @Parameter(name = "enum_query_double", description = "Query parameter enum test (double)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, - @Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, - @Parameter(name = "enum_form_string", description = "Form parameter enum test (string)") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString + @Parameter(name = "enum_query_string_array", description = "Query parameter enum test (string array)", in = ParameterIn.QUERY) @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @Parameter(name = "enum_query_string", description = "Query parameter enum test (string)", in = ParameterIn.QUERY) @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, + @Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)", in = ParameterIn.QUERY) @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @Parameter(name = "enum_query_double", description = "Query parameter enum test (double)", in = ParameterIn.QUERY) @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)") @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @Parameter(name = "enum_form_string", description = "Form parameter enum test (string)") @RequestParam(value = "enum_form_string", required = false) String enumFormString ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -494,10 +494,10 @@ default ResponseEntity testEnumParameters( ) default ResponseEntity testGroupParameters( - @NotNull @Parameter(name = "required_string_group", description = "Required String in group parameters", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, - @NotNull @Parameter(name = "required_int64_group", description = "Required Integer in group parameters", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, - @Parameter(name = "string_group", description = "String in group parameters", in = ParameterIn.QUERY) @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup, - @Parameter(name = "int64_group", description = "Integer in group parameters", in = ParameterIn.QUERY) @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + @Parameter(name = "required_string_group", description = "Required String in group parameters", required = true, in = ParameterIn.QUERY) @RequestParam(value = "required_string_group") @NotNull Integer requiredStringGroup, + @Parameter(name = "required_int64_group", description = "Required Integer in group parameters", required = true, in = ParameterIn.QUERY) @RequestParam(value = "required_int64_group") @NotNull Long requiredInt64Group, + @Parameter(name = "string_group", description = "String in group parameters", in = ParameterIn.QUERY) @RequestParam(value = "string_group", required = false) Integer stringGroup, + @Parameter(name = "int64_group", description = "Integer in group parameters", in = ParameterIn.QUERY) @RequestParam(value = "int64_group", required = false) Long int64Group ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -527,7 +527,7 @@ default ResponseEntity testGroupParameters( ) default ResponseEntity testInlineAdditionalProperties( - @Parameter(name = "request_body", description = "request body", required = true) @Valid @RequestBody Map requestBody + @Parameter(name = "request_body", description = "request body", required = true) @RequestBody @NotNull Map requestBody ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -558,8 +558,8 @@ default ResponseEntity testInlineAdditionalProperties( ) default ResponseEntity testJsonFormData( - @Parameter(name = "param", description = "field1", required = true) @Valid @RequestParam(value = "param", required = true) String param, - @Parameter(name = "param2", description = "field2", required = true) @Valid @RequestParam(value = "param2", required = true) String param2 + @Parameter(name = "param", description = "field1", required = true) @RequestParam(value = "param") @NotNull String param, + @Parameter(name = "param2", description = "field2", required = true) @RequestParam(value = "param2") @NotNull String param2 ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -589,7 +589,7 @@ default ResponseEntity testJsonFormData( ) default ResponseEntity testNullable( - @Parameter(name = "ChildWithNullable", description = "request body", required = true) @Valid @RequestBody ChildWithNullable childWithNullable + @Parameter(name = "ChildWithNullable", description = "request body", required = true) @RequestBody @NotNull @Valid ChildWithNullable childWithNullable ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -620,10 +620,10 @@ default ResponseEntity testNullable( ) default ResponseEntity testQueryParameterCollectionFormat( - @NotNull @Parameter(name = "pipe", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "pipe", required = true) List pipe, - @NotNull @Parameter(name = "http", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "http", required = true) List http, - @NotNull @Parameter(name = "url", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "url", required = true) List url, - @NotNull @Parameter(name = "context", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "context", required = true) List context + @Parameter(name = "pipe", description = "", required = true, in = ParameterIn.QUERY) @RequestParam(value = "pipe") @NotNull List pipe, + @Parameter(name = "http", description = "", required = true, in = ParameterIn.QUERY) @RequestParam(value = "http") @NotNull List http, + @Parameter(name = "url", description = "", required = true, in = ParameterIn.QUERY) @RequestParam(value = "url") @NotNull List url, + @Parameter(name = "context", description = "", required = true, in = ParameterIn.QUERY) @RequestParam(value = "context") @NotNull List context ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -700,9 +700,9 @@ default ResponseEntity testWithResultExample( ) default ResponseEntity uploadFileWithRequiredFile( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, - @Parameter(name = "requiredFile", description = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, - @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata + @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, + @Parameter(name = "requiredFile", description = "file to upload", required = true) @RequestPart(value = "requiredFile") MultipartFile requiredFile, + @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index df78c55de878..77323999f7a4 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -70,7 +70,7 @@ default Optional getRequest() { ) default ResponseEntity testClassname( - @Parameter(name = "Client", description = "client model", required = true) @Valid @RequestBody Client client + @Parameter(name = "Client", description = "client model", required = true) @RequestBody @NotNull @Valid Client client ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java index d74fb26997c0..93b077a20024 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java @@ -71,7 +71,7 @@ default Optional getRequest() { ) default ResponseEntity addPet( - @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet pet ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -108,7 +108,7 @@ default ResponseEntity addPet( ) default ResponseEntity deletePet( - @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId + @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -146,7 +146,7 @@ default ResponseEntity deletePet( ) default ResponseEntity> findPetsByStatus( - @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) List status + @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @RequestParam(value = "status") @NotNull List status ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -201,7 +201,7 @@ default ResponseEntity> findPetsByStatus( ) default ResponseEntity> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) Set tags + @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @RequestParam(value = "tags") @NotNull Set tags ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -255,7 +255,7 @@ default ResponseEntity> findPetsByTags( ) default ResponseEntity getPetById( - @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId + @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -308,7 +308,7 @@ default ResponseEntity getPetById( ) default ResponseEntity updatePet( - @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet pet ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -343,9 +343,9 @@ default ResponseEntity updatePet( ) default ResponseEntity updatePetWithForm( - @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, - @Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, - @Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status + @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, + @Parameter(name = "name", description = "Updated name of the pet") @RequestParam(value = "name", required = false) String name, + @Parameter(name = "status", description = "Updated status of the pet") @RequestParam(value = "status", required = false) String status ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -383,8 +383,8 @@ default ResponseEntity updatePetWithForm( ) default ResponseEntity uploadFile( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, - @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, + @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, + @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) { getRequest().ifPresent(request -> { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java index d4f782f7ed24..7be18f589c40 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java @@ -66,7 +66,7 @@ default Optional getRequest() { ) default ResponseEntity deleteOrder( - @Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("order_id") String orderId + @Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("order_id") @NotNull String orderId ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -137,7 +137,7 @@ default ResponseEntity> getInventory( ) default ResponseEntity getOrderById( - @Min(1L) @Max(5L) @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("order_id") Long orderId + @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("order_id") @NotNull @Min(1L) @Max(5L) Long orderId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -187,7 +187,7 @@ default ResponseEntity getOrderById( ) default ResponseEntity placeOrder( - @Parameter(name = "Order", description = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order + @Parameter(name = "Order", description = "order placed for purchasing the pet", required = true) @RequestBody @NotNull @Valid Order order ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java index d06a9e9b0fb1..c8732adad9d9 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java @@ -65,7 +65,7 @@ default Optional getRequest() { ) default ResponseEntity createUser( - @Parameter(name = "User", description = "Created user object", required = true) @Valid @RequestBody User user + @Parameter(name = "User", description = "Created user object", required = true) @RequestBody @NotNull @Valid User user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -95,7 +95,7 @@ default ResponseEntity createUser( ) default ResponseEntity createUsersWithArrayInput( - @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + @Parameter(name = "User", description = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -125,7 +125,7 @@ default ResponseEntity createUsersWithArrayInput( ) default ResponseEntity createUsersWithListInput( - @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + @Parameter(name = "User", description = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -156,7 +156,7 @@ default ResponseEntity createUsersWithListInput( ) default ResponseEntity deleteUser( - @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") @NotNull String username ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -193,7 +193,7 @@ default ResponseEntity deleteUser( ) default ResponseEntity getUserByName( - @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") @NotNull String username ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -243,8 +243,8 @@ default ResponseEntity getUserByName( ) default ResponseEntity loginUser( - @NotNull @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username, - @NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) String password + @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @RequestParam(value = "username") @NotNull String username, + @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @RequestParam(value = "password") @NotNull String password ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -305,8 +305,8 @@ default ResponseEntity logoutUser( ) default ResponseEntity updateUser( - @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, - @Parameter(name = "User", description = "Updated user object", required = true) @Valid @RequestBody User user + @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") @NotNull String username, + @Parameter(name = "User", description = "Updated user object", required = true) @RequestBody @NotNull @Valid User user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index e14dd983f0f1..0fbe28ea4096 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -36,7 +36,6 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -124,4 +123,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 44db4e0c3810..a7327b15638f 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -37,7 +37,6 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 845d05d68bff..2275717952e3 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -36,7 +36,6 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -124,4 +123,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index cea8ea12066a..3b988af689b4 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -28,33 +28,25 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class AdditionalPropertiesClass { - @Valid private Map mapString = new HashMap<>(); - @Valid private Map mapNumber = new HashMap<>(); - @Valid private Map mapInteger = new HashMap<>(); - @Valid private Map mapBoolean = new HashMap<>(); - @Valid private Map> mapArrayInteger = new HashMap<>(); - @Valid private Map> mapArrayAnytype = new HashMap<>(); - @Valid private Map> mapMapString = new HashMap<>(); - @Valid private Map> mapMapAnytype = new HashMap<>(); private Object anytype1; - private JsonNullable anytype2 = JsonNullable.undefined(); + private JsonNullable anytype2 = JsonNullable.of(null); private Object anytype3; @@ -75,7 +67,6 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ - @Schema(name = "map_string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("map_string") public Map getMapString() { @@ -103,7 +94,6 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ - @Valid @Schema(name = "map_number", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("map_number") public Map getMapNumber() { @@ -131,7 +121,6 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ - @Schema(name = "map_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("map_integer") public Map getMapInteger() { @@ -159,7 +148,6 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ - @Schema(name = "map_boolean", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("map_boolean") public Map getMapBoolean() { @@ -187,7 +175,6 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { @@ -215,7 +202,6 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ - @Valid @Schema(name = "map_array_anytype", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("map_array_anytype") public Map> getMapArrayAnytype() { @@ -243,7 +229,6 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { @@ -271,7 +256,6 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { @@ -291,7 +275,6 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ - @Schema(name = "anytype_1", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("anytype_1") public Object getAnytype1() { @@ -302,8 +285,8 @@ public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; } - public AdditionalPropertiesClass anytype2(Object anytype2) { - this.anytype2 = JsonNullable.of(anytype2); + public AdditionalPropertiesClass anytype2(JsonNullable anytype2) { + this.anytype2 = anytype2; return this; } @@ -311,7 +294,6 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ - @Schema(name = "anytype_2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("anytype_2") public JsonNullable getAnytype2() { @@ -331,7 +313,6 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ - @Schema(name = "anytype_3", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("anytype_3") public Object getAnytype3() { @@ -410,4 +391,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 24c0a0bc4ce6..2f481c341c91 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -36,7 +36,6 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -124,4 +123,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index f881d9449131..2696f58c8203 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -37,7 +37,6 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index fc778107fdd6..ba3e02a567e7 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -37,7 +37,6 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index e7947a2a3e12..d2ddc6c57e1b 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -36,7 +36,6 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -124,4 +123,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java index c2dc521e5e33..9b889cae8fb3 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java @@ -35,7 +35,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class Animal { - private String className; + private @NotNull String className; private String color = "red"; @@ -59,10 +59,9 @@ public Animal className(String className) { * Get className * @return className */ - @NotNull @Schema(name = "className", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("className") - public String getClassName() { + public @NotNull String getClassName() { return className; } @@ -79,7 +78,6 @@ public Animal color(String color) { * Get color * @return color */ - @Schema(name = "color", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("color") public String getColor() { @@ -129,4 +127,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index bb399aa9082e..aae59ed763b2 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnly { - @Valid private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { @@ -45,7 +44,6 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ - @Valid @Schema(name = "ArrayArrayNumber", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("ArrayArrayNumber") public List> getArrayArrayNumber() { @@ -93,4 +91,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 4f171f476c4d..8cec84658578 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayOfNumberOnly { - @Valid private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnly arrayNumber(List arrayNumber) { @@ -45,7 +44,6 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ - @Valid @Schema(name = "ArrayNumber", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("ArrayNumber") public List getArrayNumber() { @@ -93,4 +91,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java index a3f194d7775f..2bf0c2999487 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java @@ -25,13 +25,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayTest { - @Valid private List arrayOfString = new ArrayList<>(); - @Valid private List> arrayArrayOfInteger = new ArrayList<>(); - @Valid private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTest arrayOfString(List arrayOfString) { @@ -51,7 +48,6 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ - @Schema(name = "array_of_string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("array_of_string") public List getArrayOfString() { @@ -79,7 +75,6 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ - @Valid @Schema(name = "array_array_of_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("array_array_of_integer") public List> getArrayArrayOfInteger() { @@ -90,12 +85,12 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } - public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) { + public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { if (this.arrayArrayOfModel == null) { this.arrayArrayOfModel = new ArrayList<>(); } @@ -107,14 +102,13 @@ public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayO * Get arrayArrayOfModel * @return arrayArrayOfModel */ - @Valid @Schema(name = "array_array_of_model", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("array_array_of_model") public List> getArrayArrayOfModel() { return arrayArrayOfModel; } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { + public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } @@ -159,4 +153,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java index 7a6ac9ff486b..1a6b0d9c10a3 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java @@ -66,7 +66,7 @@ public static KindEnum fromValue(String value) { } } - private KindEnum kind; + private String kind; public BigCat() { super(); @@ -88,10 +88,9 @@ public BigCat kind(KindEnum kind) { * Get kind * @return kind */ - @Schema(name = "kind", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("kind") - public KindEnum getKind() { + public String getKind() { return kind; } @@ -153,4 +152,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Capitalization.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Capitalization.java index 1305dc32a58a..16393de364a6 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Capitalization.java @@ -42,7 +42,6 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ - @Schema(name = "smallCamel", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("smallCamel") public String getSmallCamel() { @@ -62,7 +61,6 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ - @Schema(name = "CapitalCamel", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("CapitalCamel") public String getCapitalCamel() { @@ -82,7 +80,6 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ - @Schema(name = "small_Snake", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("small_Snake") public String getSmallSnake() { @@ -102,7 +99,6 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ - @Schema(name = "Capital_Snake", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("Capital_Snake") public String getCapitalSnake() { @@ -122,7 +118,6 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ - @Schema(name = "SCA_ETH_Flow_Points", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("SCA_ETH_Flow_Points") public String getScAETHFlowPoints() { @@ -142,7 +137,6 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ - @Schema(name = "ATT_NAME", description = "Name of the pet ", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("ATT_NAME") public String getATTNAME() { @@ -200,4 +194,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java index c33f8dbcfdb6..1efea170a7fc 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java @@ -56,7 +56,6 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ - @Schema(name = "declawed", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("declawed") public Boolean getDeclawed() { @@ -116,4 +115,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java index 1ee0ac465e49..cf3023ce3d17 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java @@ -23,7 +23,7 @@ public class Category { private Long id; - private String name = "default-name"; + private @NotNull String name = "default-name"; public Category() { super(); @@ -45,7 +45,6 @@ public Category id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -65,10 +64,9 @@ public Category name(String name) { * Get name * @return name */ - @NotNull @Schema(name = "name", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -115,4 +113,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ChildWithNullable.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ChildWithNullable.java index d87259a91c84..acadde522370 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ChildWithNullable.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ChildWithNullable.java @@ -40,7 +40,6 @@ public ChildWithNullable otherProperty(String otherProperty) { * Get otherProperty * @return otherProperty */ - @Schema(name = "otherProperty", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("otherProperty") public String getOtherProperty() { @@ -57,7 +56,7 @@ public ChildWithNullable type(TypeEnum type) { return this; } - public ChildWithNullable nullableProperty(String nullableProperty) { + public ChildWithNullable nullableProperty(JsonNullable nullableProperty) { super.nullableProperty(nullableProperty); return this; } @@ -111,4 +110,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ClassModel.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ClassModel.java index 2e1c3589bf30..ded911ffab13 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ClassModel.java @@ -33,7 +33,6 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @Schema(name = "_class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("_class") public String getPropertyClass() { @@ -81,4 +80,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Client.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Client.java index 2b0dabb274cf..2d0abb6d4339 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Client.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Client.java @@ -32,7 +32,6 @@ public Client client(String client) { * Get client * @return client */ - @Schema(name = "client", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("client") public String getClient() { @@ -80,4 +79,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ContainerDefaultValue.java index 37d809f95881..d767a05520ad 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ContainerDefaultValue.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -26,17 +26,13 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ContainerDefaultValue { - @Valid - private JsonNullable> nullableArray = JsonNullable.>undefined(); + private JsonNullable> nullableArray = JsonNullable.undefined(); - @Valid - private JsonNullable> nullableRequiredArray = JsonNullable.>undefined(); + private JsonNullable> nullableRequiredArray = JsonNullable.undefined(); - @Valid - private List requiredArray = new ArrayList<>(); + private @NotNull List requiredArray = new ArrayList<>(); - @Valid - private JsonNullable> nullableArrayWithDefault = JsonNullable.>undefined(); + private JsonNullable> nullableArrayWithDefault = JsonNullable.of(new ArrayList<>(Arrays.asList("foo", "bar"))); public ContainerDefaultValue() { super(); @@ -45,13 +41,13 @@ public ContainerDefaultValue() { /** * Constructor with only required parameters */ - public ContainerDefaultValue(List nullableRequiredArray, List requiredArray) { - this.nullableRequiredArray = JsonNullable.of(nullableRequiredArray); + public ContainerDefaultValue(JsonNullable> nullableRequiredArray, List requiredArray) { + this.nullableRequiredArray = nullableRequiredArray; this.requiredArray = requiredArray; } - public ContainerDefaultValue nullableArray(List nullableArray) { - this.nullableArray = JsonNullable.of(nullableArray); + public ContainerDefaultValue nullableArray(JsonNullable> nullableArray) { + this.nullableArray = nullableArray; return this; } @@ -67,7 +63,6 @@ public ContainerDefaultValue addNullableArrayItem(String nullableArrayItem) { * Get nullableArray * @return nullableArray */ - @Schema(name = "nullable_array", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("nullable_array") public JsonNullable> getNullableArray() { @@ -78,8 +73,8 @@ public void setNullableArray(JsonNullable> nullableArray) { this.nullableArray = nullableArray; } - public ContainerDefaultValue nullableRequiredArray(List nullableRequiredArray) { - this.nullableRequiredArray = JsonNullable.of(nullableRequiredArray); + public ContainerDefaultValue nullableRequiredArray(JsonNullable> nullableRequiredArray) { + this.nullableRequiredArray = nullableRequiredArray; return this; } @@ -95,7 +90,6 @@ public ContainerDefaultValue addNullableRequiredArrayItem(String nullableRequire * Get nullableRequiredArray * @return nullableRequiredArray */ - @NotNull @Schema(name = "nullable_required_array", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("nullable_required_array") public JsonNullable> getNullableRequiredArray() { @@ -123,10 +117,9 @@ public ContainerDefaultValue addRequiredArrayItem(String requiredArrayItem) { * Get requiredArray * @return requiredArray */ - @NotNull @Schema(name = "required_array", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("required_array") - public List getRequiredArray() { + public @NotNull List getRequiredArray() { return requiredArray; } @@ -134,8 +127,8 @@ public void setRequiredArray(List requiredArray) { this.requiredArray = requiredArray; } - public ContainerDefaultValue nullableArrayWithDefault(List nullableArrayWithDefault) { - this.nullableArrayWithDefault = JsonNullable.of(nullableArrayWithDefault); + public ContainerDefaultValue nullableArrayWithDefault(JsonNullable> nullableArrayWithDefault) { + this.nullableArrayWithDefault = nullableArrayWithDefault; return this; } @@ -151,7 +144,6 @@ public ContainerDefaultValue addNullableArrayWithDefaultItem(String nullableArra * Get nullableArrayWithDefault * @return nullableArrayWithDefault */ - @Schema(name = "nullable_array_with_default", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("nullable_array_with_default") public JsonNullable> getNullableArrayWithDefault() { @@ -216,4 +208,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java index cd79ddcbdd58..a4de5466df17 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java @@ -48,7 +48,6 @@ public Dog breed(String breed) { * Get breed * @return breed */ - @Schema(name = "breed", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("breed") public String getBreed() { @@ -108,4 +107,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java index b4a9a35507f9..0c6797f19e07 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java @@ -60,7 +60,7 @@ public static JustSymbolEnum fromValue(String value) { } } - private JustSymbolEnum justSymbol; + private String justSymbol; /** * Gets or Sets arrayEnum @@ -97,8 +97,7 @@ public static ArrayEnumEnum fromValue(String value) { } } - @Valid - private List arrayEnum = new ArrayList<>(); + private List arrayEnum = new ArrayList<>(); public EnumArrays justSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; @@ -109,10 +108,9 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ - @Schema(name = "just_symbol", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("just_symbol") - public JustSymbolEnum getJustSymbol() { + public String getJustSymbol() { return justSymbol; } @@ -137,10 +135,9 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ - @Schema(name = "array_enum", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("array_enum") - public List getArrayEnum() { + public List getArrayEnum() { return arrayEnum; } @@ -187,4 +184,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java index 7159ceb98955..5ca2a59fe4b8 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java @@ -62,7 +62,7 @@ public static EnumStringEnum fromValue(String value) { } } - private EnumStringEnum enumString; + private String enumString; /** * Gets or Sets enumStringRequired @@ -101,7 +101,7 @@ public static EnumStringRequiredEnum fromValue(String value) { } } - private EnumStringRequiredEnum enumStringRequired; + private @NotNull String enumStringRequired; /** * Gets or Sets enumInteger @@ -138,7 +138,7 @@ public static EnumIntegerEnum fromValue(Integer value) { } } - private EnumIntegerEnum enumInteger; + private Integer enumInteger; /** * Gets or Sets enumNumber @@ -175,7 +175,7 @@ public static EnumNumberEnum fromValue(Double value) { } } - private EnumNumberEnum enumNumber; + private Double enumNumber; private OuterEnum outerEnum; @@ -199,10 +199,9 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ - @Schema(name = "enum_string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("enum_string") - public EnumStringEnum getEnumString() { + public String getEnumString() { return enumString; } @@ -219,10 +218,9 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ - @NotNull @Schema(name = "enum_string_required", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("enum_string_required") - public EnumStringRequiredEnum getEnumStringRequired() { + public @NotNull String getEnumStringRequired() { return enumStringRequired; } @@ -239,10 +237,9 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ - @Schema(name = "enum_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("enum_integer") - public EnumIntegerEnum getEnumInteger() { + public Integer getEnumInteger() { return enumInteger; } @@ -259,10 +256,9 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ - @Schema(name = "enum_number", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("enum_number") - public EnumNumberEnum getEnumNumber() { + public Double getEnumNumber() { return enumNumber; } @@ -279,7 +275,6 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ - @Valid @Schema(name = "outerEnum", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("outerEnum") public OuterEnum getOuterEnum() { @@ -335,4 +330,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/File.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/File.java index e3238ec243e4..d48dd7ebefa4 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/File.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/File.java @@ -33,7 +33,6 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ - @Schema(name = "sourceURI", description = "Test capitalization", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("sourceURI") public String getSourceURI() { @@ -81,4 +80,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 1ec66d518194..df8406531213 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -25,9 +25,8 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class FileSchemaTestClass { - private File file; + private @Valid File file; - @Valid private List<@Valid File> files = new ArrayList<>(); public FileSchemaTestClass file(File file) { @@ -39,10 +38,9 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ - @Valid @Schema(name = "file", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("file") - public File getFile() { + public @Valid File getFile() { return file; } @@ -50,7 +48,7 @@ public void setFile(File file) { this.file = file; } - public FileSchemaTestClass files(List<@Valid File> files) { + public FileSchemaTestClass files(List files) { this.files = files; return this; } @@ -67,14 +65,13 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ - @Valid @Schema(name = "files", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("files") public List<@Valid File> getFiles() { return files; } - public void setFiles(List<@Valid File> files) { + public void setFiles(List files) { this.files = files; } @@ -117,4 +114,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java index 93ce3e21a0c4..7eb3ca99e151 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java @@ -29,33 +29,33 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class FormatTest { - private Integer integer; + private @Min(10) @Max(100) Integer integer; - private Integer int32; + private @Min(20) @Max(200) Integer int32; private Long int64; - private BigDecimal number; + private @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal number; - private Float _float; + private @DecimalMin("54.3") @DecimalMax("987.6") Float _float; - private Double _double; + private @DecimalMin("67.8") @DecimalMax("123.4") Double _double; - private String string; + private @Pattern(regexp = "/[a-z]/i") String string; - private byte[] _byte; + private @NotNull byte[] _byte; private org.springframework.core.io.Resource binary; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) - private LocalDate date; + private @NotNull LocalDate date; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; private UUID uuid; - private String password; + private @NotNull @Size(min = 10, max = 64) String password; private BigDecimal bigDecimal; @@ -84,10 +84,9 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ - @Min(10) @Max(100) @Schema(name = "integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("integer") - public Integer getInteger() { + public @Min(10) @Max(100) Integer getInteger() { return integer; } @@ -106,10 +105,9 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ - @Min(20) @Max(200) @Schema(name = "int32", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("int32") - public Integer getInt32() { + public @Min(20) @Max(200) Integer getInt32() { return int32; } @@ -126,7 +124,6 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ - @Schema(name = "int64", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("int64") public Long getInt64() { @@ -148,10 +145,9 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ - @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @Schema(name = "number", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("number") - public BigDecimal getNumber() { + public @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal getNumber() { return number; } @@ -170,10 +166,9 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ - @DecimalMin("54.3") @DecimalMax("987.6") @Schema(name = "float", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("float") - public Float getFloat() { + public @DecimalMin("54.3") @DecimalMax("987.6") Float getFloat() { return _float; } @@ -192,10 +187,9 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ - @DecimalMin("67.8") @DecimalMax("123.4") @Schema(name = "double", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("double") - public Double getDouble() { + public @DecimalMin("67.8") @DecimalMax("123.4") Double getDouble() { return _double; } @@ -212,10 +206,9 @@ public FormatTest string(String string) { * Get string * @return string */ - @Pattern(regexp = "/[a-z]/i") @Schema(name = "string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("string") - public String getString() { + public @Pattern(regexp = "/[a-z]/i") String getString() { return string; } @@ -232,10 +225,9 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ - @NotNull @Schema(name = "byte", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("byte") - public byte[] getByte() { + public @NotNull byte[] getByte() { return _byte; } @@ -252,7 +244,6 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ - @Valid @Schema(name = "binary", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("binary") public org.springframework.core.io.Resource getBinary() { @@ -272,10 +263,9 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ - @NotNull @Valid @Schema(name = "date", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("date") - public LocalDate getDate() { + public @NotNull LocalDate getDate() { return date; } @@ -292,7 +282,6 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ - @Valid @Schema(name = "dateTime", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dateTime") public OffsetDateTime getDateTime() { @@ -312,7 +301,6 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ - @Valid @Schema(name = "uuid", example = "72f98069-206d-4f12-9f12-3d1e525a8e84", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("uuid") public UUID getUuid() { @@ -332,10 +320,9 @@ public FormatTest password(String password) { * Get password * @return password */ - @NotNull @Size(min = 10, max = 64) @Schema(name = "password", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("password") - public String getPassword() { + public @NotNull @Size(min = 10, max = 64) String getPassword() { return password; } @@ -352,7 +339,6 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ - @Valid @Schema(name = "BigDecimal", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("BigDecimal") public BigDecimal getBigDecimal() { @@ -426,4 +412,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 7670645ce831..34599cb0ba57 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -36,7 +36,6 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ - @Schema(name = "bar", accessMode = Schema.AccessMode.READ_ONLY, requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("bar") public String getBar() { @@ -56,7 +55,6 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ - @Schema(name = "foo", accessMode = Schema.AccessMode.READ_ONLY, requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("foo") public String getFoo() { @@ -106,4 +104,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java index a449469c6aff..17d9a1719a7a 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java @@ -24,7 +24,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class MapTest { - @Valid private Map> mapMapOfString = new HashMap<>(); /** @@ -62,13 +61,10 @@ public static InnerEnum fromValue(String value) { } } - @Valid - private Map mapOfEnumString = new HashMap<>(); + private Map mapOfEnumString = new HashMap<>(); - @Valid private Map directMap = new HashMap<>(); - @Valid private Map indirectMap = new HashMap<>(); public MapTest mapMapOfString(Map> mapMapOfString) { @@ -88,7 +84,6 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ - @Valid @Schema(name = "map_map_of_string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("map_map_of_string") public Map> getMapMapOfString() { @@ -116,10 +111,9 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ - @Schema(name = "map_of_enum_string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("map_of_enum_string") - public Map getMapOfEnumString() { + public Map getMapOfEnumString() { return mapOfEnumString; } @@ -144,7 +138,6 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ - @Schema(name = "direct_map", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("direct_map") public Map getDirectMap() { @@ -172,7 +165,6 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ - @Schema(name = "indirect_map", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("indirect_map") public Map getIndirectMap() { @@ -226,4 +218,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index c02231565c15..9529c5b6ed55 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -32,8 +32,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; - @Valid - private Map map = new HashMap<>(); + private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { this.uuid = uuid; @@ -44,7 +43,6 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ - @Valid @Schema(name = "uuid", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("uuid") public UUID getUuid() { @@ -64,7 +62,6 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ - @Valid @Schema(name = "dateTime", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dateTime") public OffsetDateTime getDateTime() { @@ -92,10 +89,9 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ - @Valid @Schema(name = "map", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("map") - public Map getMap() { + public Map getMap() { return map; } @@ -144,4 +140,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Model200Response.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Model200Response.java index 47ea4a6e7f93..b70662fd9c2d 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Model200Response.java @@ -37,7 +37,6 @@ public Model200Response name(Integer name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public Integer getName() { @@ -57,7 +56,6 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @Schema(name = "class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("class") public String getPropertyClass() { @@ -107,4 +105,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelApiResponse.java index b3ff5612d992..fd7668cb99ed 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -38,7 +38,6 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @Schema(name = "code", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("code") public Integer getCode() { @@ -58,7 +57,6 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @Schema(name = "type", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("type") public String getType() { @@ -78,7 +76,6 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @Schema(name = "message", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("message") public String getMessage() { @@ -130,4 +127,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelList.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelList.java index 70456df44cc8..5084211cf5b6 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelList.java @@ -34,7 +34,6 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ - @Schema(name = "123-list", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("123-list") public String get123list() { @@ -82,4 +81,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelReturn.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelReturn.java index 9e66eec3d6df..a1d5d5179f43 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelReturn.java @@ -35,7 +35,6 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ - @Schema(name = "return", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("return") public Integer getReturn() { @@ -83,4 +82,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java index c700b682aea7..03fe3ae7ba3a 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java @@ -22,7 +22,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class Name { - private Integer name; + private @NotNull Integer name; private Integer snakeCase; @@ -50,10 +50,9 @@ public Name name(Integer name) { * Get name * @return name */ - @NotNull @Schema(name = "name", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("name") - public Integer getName() { + public @NotNull Integer getName() { return name; } @@ -70,7 +69,6 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ - @Schema(name = "snake_case", accessMode = Schema.AccessMode.READ_ONLY, requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("snake_case") public Integer getSnakeCase() { @@ -90,7 +88,6 @@ public Name property(String property) { * Get property * @return property */ - @Schema(name = "property", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("property") public String getProperty() { @@ -110,7 +107,6 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ - @Schema(name = "123Number", accessMode = Schema.AccessMode.READ_ONLY, requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("123Number") public Integer get123number() { @@ -164,4 +160,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NullableMapProperty.java index 1d2cc4aac787..f5df0da7713a 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NullableMapProperty.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -26,11 +26,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class NullableMapProperty { - @Valid - private JsonNullable> languageValues = JsonNullable.>undefined(); + private JsonNullable> languageValues = JsonNullable.undefined(); - public NullableMapProperty languageValues(Map languageValues) { - this.languageValues = JsonNullable.of(languageValues); + public NullableMapProperty languageValues(JsonNullable> languageValues) { + this.languageValues = languageValues; return this; } @@ -46,7 +45,6 @@ public NullableMapProperty putLanguageValuesItem(String key, String languageValu * Get languageValues * @return languageValues */ - @Schema(name = "languageValues", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("languageValues") public JsonNullable> getLanguageValues() { @@ -105,4 +103,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NumberOnly.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NumberOnly.java index e3eded935ac3..42dd6710923f 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NumberOnly.java @@ -33,7 +33,6 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ - @Valid @Schema(name = "JustNumber", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("JustNumber") public BigDecimal getJustNumber() { @@ -81,4 +80,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java index 52470395ae42..9ab26c93ad9e 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java @@ -70,7 +70,7 @@ public static StatusEnum fromValue(String value) { } } - private StatusEnum status; + private String status; private Boolean complete = false; @@ -83,7 +83,6 @@ public Order id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -103,7 +102,6 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @Schema(name = "petId", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("petId") public Long getPetId() { @@ -123,7 +121,6 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @Schema(name = "quantity", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("quantity") public Integer getQuantity() { @@ -143,7 +140,6 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Valid @Schema(name = "shipDate", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("shipDate") public OffsetDateTime getShipDate() { @@ -163,10 +159,9 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @Schema(name = "status", description = "Order Status", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("status") - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -183,7 +178,6 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @Schema(name = "complete", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("complete") public Boolean getComplete() { @@ -241,4 +235,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java index 3946d3ec3499..c351c962a713 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java @@ -37,7 +37,6 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ - @Valid @Schema(name = "my_number", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("my_number") public BigDecimal getMyNumber() { @@ -57,7 +56,6 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ - @Schema(name = "my_string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("my_string") public String getMyString() { @@ -77,7 +75,6 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ - @Schema(name = "my_boolean", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("my_boolean") public Boolean getMyBoolean() { @@ -129,4 +126,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ParentWithNullable.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ParentWithNullable.java index 0bca1c134462..f1aa3e27ec23 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ParentWithNullable.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ParentWithNullable.java @@ -70,9 +70,9 @@ public static TypeEnum fromValue(String value) { } } - private TypeEnum type; + private String type; - private JsonNullable nullableProperty = JsonNullable.undefined(); + private JsonNullable nullableProperty = JsonNullable.undefined(); public ParentWithNullable type(TypeEnum type) { this.type = type; @@ -83,10 +83,9 @@ public ParentWithNullable type(TypeEnum type) { * Get type * @return type */ - @Schema(name = "type", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("type") - public TypeEnum getType() { + public String getType() { return type; } @@ -94,8 +93,8 @@ public void setType(TypeEnum type) { this.type = type; } - public ParentWithNullable nullableProperty(String nullableProperty) { - this.nullableProperty = JsonNullable.of(nullableProperty); + public ParentWithNullable nullableProperty(JsonNullable nullableProperty) { + this.nullableProperty = nullableProperty; return this; } @@ -103,7 +102,6 @@ public ParentWithNullable nullableProperty(String nullableProperty) { * Get nullableProperty * @return nullableProperty */ - @Schema(name = "nullableProperty", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("nullableProperty") public JsonNullable getNullableProperty() { @@ -164,4 +162,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java index dc83b6dd7ead..02044cad8291 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java @@ -32,14 +32,12 @@ public class Pet { private Long id; - private Category category; + private @Valid Category category; - private String name; + private @NotNull String name; - @Valid - private Set photoUrls = new LinkedHashSet<>(); + private @NotNull Set photoUrls = new LinkedHashSet<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** @@ -80,7 +78,7 @@ public static StatusEnum fromValue(String value) { } @Deprecated - private StatusEnum status; + private String status; public Pet() { super(); @@ -103,7 +101,6 @@ public Pet id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -123,10 +120,9 @@ public Pet category(Category category) { * Get category * @return category */ - @Valid @Schema(name = "category", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("category") - public Category getCategory() { + public @Valid Category getCategory() { return category; } @@ -143,10 +139,9 @@ public Pet name(String name) { * Get name * @return name */ - @NotNull @Schema(name = "name", example = "doggie", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -171,10 +166,9 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @NotNull @Schema(name = "photoUrls", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("photoUrls") - public Set getPhotoUrls() { + public @NotNull Set getPhotoUrls() { return photoUrls; } @@ -183,7 +177,7 @@ public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List<@Valid Tag> tags) { + public Pet tags(List tags) { this.tags = tags; return this; } @@ -200,14 +194,13 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Valid @Schema(name = "tags", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("tags") public List<@Valid Tag> getTags() { return tags; } - public void setTags(List<@Valid Tag> tags) { + public void setTags(List tags) { this.tags = tags; } @@ -221,11 +214,10 @@ public Pet status(StatusEnum status) { * @return status * @deprecated */ - @Schema(name = "status", description = "pet status in the store", deprecated = true, requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("status") @Deprecated - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -284,4 +276,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ReadOnlyFirst.java index e2040366bf62..d9110ce888fa 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -34,7 +34,6 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ - @Schema(name = "bar", accessMode = Schema.AccessMode.READ_ONLY, requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("bar") public String getBar() { @@ -54,7 +53,6 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ - @Schema(name = "baz", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("baz") public String getBaz() { @@ -104,4 +102,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java index e739bd1d5ab5..f1ea0fb752ee 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java @@ -38,7 +38,6 @@ public ResponseObjectWithDifferentFieldNames normalPropertyName(String normalPro * Get normalPropertyName * @return normalPropertyName */ - @Schema(name = "normalPropertyName", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("normalPropertyName") public String getNormalPropertyName() { @@ -58,7 +57,6 @@ public ResponseObjectWithDifferentFieldNames UPPER_CASE_PROPERTY_SNAKE(String UP * Get UPPER_CASE_PROPERTY_SNAKE * @return UPPER_CASE_PROPERTY_SNAKE */ - @Schema(name = "UPPER_CASE_PROPERTY_SNAKE", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("UPPER_CASE_PROPERTY_SNAKE") public String getUPPERCASEPROPERTYSNAKE() { @@ -78,7 +76,6 @@ public ResponseObjectWithDifferentFieldNames lowerCasePropertyDashes(String lowe * Get lowerCasePropertyDashes * @return lowerCasePropertyDashes */ - @Schema(name = "lower-case-property-dashes", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("lower-case-property-dashes") public String getLowerCasePropertyDashes() { @@ -98,7 +95,6 @@ public ResponseObjectWithDifferentFieldNames propertyNameWithSpaces(String prope * Get propertyNameWithSpaces * @return propertyNameWithSpaces */ - @Schema(name = "property name with spaces", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("property name with spaces") public String getPropertyNameWithSpaces() { @@ -152,4 +148,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/SpecialModelName.java index 8173a14a8d8e..1f8ea115b01f 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/SpecialModelName.java @@ -34,7 +34,6 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ - @Schema(name = "$special[property.name]", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("$special[property.name]") public Long get$SpecialPropertyName() { @@ -82,4 +81,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Tag.java index 9e7ac9ebf805..583cbc48e7a6 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Tag.java @@ -34,7 +34,6 @@ public Tag id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -54,7 +53,6 @@ public Tag name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -104,4 +102,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java index ef54f5dc15e3..710408e8f15c 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -25,16 +25,15 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class TypeHolderDefault { - private String stringItem = "what"; + private @NotNull String stringItem = "what"; - private BigDecimal numberItem = new BigDecimal("1.234"); + private @NotNull BigDecimal numberItem = new BigDecimal("1.234"); - private Integer integerItem = -2; + private @NotNull Integer integerItem = -2; - private Boolean boolItem = true; + private @NotNull Boolean boolItem = true; - @Valid - private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); + private @NotNull List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); public TypeHolderDefault() { super(); @@ -60,10 +59,9 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @NotNull @Schema(name = "string_item", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("string_item") - public String getStringItem() { + public @NotNull String getStringItem() { return stringItem; } @@ -80,10 +78,9 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @NotNull @Valid @Schema(name = "number_item", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("number_item") - public BigDecimal getNumberItem() { + public @NotNull BigDecimal getNumberItem() { return numberItem; } @@ -100,10 +97,9 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @NotNull @Schema(name = "integer_item", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("integer_item") - public Integer getIntegerItem() { + public @NotNull Integer getIntegerItem() { return integerItem; } @@ -120,10 +116,9 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @NotNull @Schema(name = "bool_item", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("bool_item") - public Boolean getBoolItem() { + public @NotNull Boolean getBoolItem() { return boolItem; } @@ -148,10 +143,9 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @NotNull @Schema(name = "array_item", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("array_item") - public List getArrayItem() { + public @NotNull List getArrayItem() { return arrayItem; } @@ -204,4 +198,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java index b12daf9f5f3a..3cde60834c1a 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -25,18 +25,17 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class TypeHolderExample { - private String stringItem; + private @NotNull String stringItem; - private BigDecimal numberItem; + private @NotNull BigDecimal numberItem; - private Float floatItem; + private @NotNull Float floatItem; - private Integer integerItem; + private @NotNull Integer integerItem; - private Boolean boolItem; + private @NotNull Boolean boolItem; - @Valid - private List arrayItem = new ArrayList<>(); + private @NotNull List arrayItem = new ArrayList<>(); public TypeHolderExample() { super(); @@ -63,10 +62,9 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @NotNull @Schema(name = "string_item", example = "what", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("string_item") - public String getStringItem() { + public @NotNull String getStringItem() { return stringItem; } @@ -83,10 +81,9 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @NotNull @Valid @Schema(name = "number_item", example = "1.234", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("number_item") - public BigDecimal getNumberItem() { + public @NotNull BigDecimal getNumberItem() { return numberItem; } @@ -103,10 +100,9 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ - @NotNull @Schema(name = "float_item", example = "1.234", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("float_item") - public Float getFloatItem() { + public @NotNull Float getFloatItem() { return floatItem; } @@ -123,10 +119,9 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @NotNull @Schema(name = "integer_item", example = "-2", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("integer_item") - public Integer getIntegerItem() { + public @NotNull Integer getIntegerItem() { return integerItem; } @@ -143,10 +138,9 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @NotNull @Schema(name = "bool_item", example = "true", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("bool_item") - public Boolean getBoolItem() { + public @NotNull Boolean getBoolItem() { return boolItem; } @@ -171,10 +165,9 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @NotNull @Schema(name = "array_item", example = "[0,1,2,3]", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("array_item") - public List getArrayItem() { + public @NotNull List getArrayItem() { return arrayItem; } @@ -229,4 +222,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/User.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/User.java index ec465261f6a6..035f3adc34ea 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/User.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/User.java @@ -46,7 +46,6 @@ public User id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -66,7 +65,6 @@ public User username(String username) { * Get username * @return username */ - @Schema(name = "username", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("username") public String getUsername() { @@ -86,7 +84,6 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @Schema(name = "firstName", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("firstName") public String getFirstName() { @@ -106,7 +103,6 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @Schema(name = "lastName", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("lastName") public String getLastName() { @@ -126,7 +122,6 @@ public User email(String email) { * Get email * @return email */ - @Schema(name = "email", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("email") public String getEmail() { @@ -146,7 +141,6 @@ public User password(String password) { * Get password * @return password */ - @Schema(name = "password", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("password") public String getPassword() { @@ -166,7 +160,6 @@ public User phone(String phone) { * Get phone * @return phone */ - @Schema(name = "phone", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("phone") public String getPhone() { @@ -186,7 +179,6 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @Schema(name = "userStatus", description = "User Status", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("userStatus") public Integer getUserStatus() { @@ -248,4 +240,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java index ec738c3d64d6..ee4dfbc877a1 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java @@ -33,7 +33,6 @@ public class XmlItem { private Boolean attributeBoolean; - @Valid private List wrappedArray = new ArrayList<>(); private String nameString; @@ -44,10 +43,8 @@ public class XmlItem { private Boolean nameBoolean; - @Valid private List nameArray = new ArrayList<>(); - @Valid private List nameWrappedArray = new ArrayList<>(); private String prefixString; @@ -58,10 +55,8 @@ public class XmlItem { private Boolean prefixBoolean; - @Valid private List prefixArray = new ArrayList<>(); - @Valid private List prefixWrappedArray = new ArrayList<>(); private String namespaceString; @@ -72,10 +67,8 @@ public class XmlItem { private Boolean namespaceBoolean; - @Valid private List namespaceArray = new ArrayList<>(); - @Valid private List namespaceWrappedArray = new ArrayList<>(); private String prefixNsString; @@ -86,10 +79,8 @@ public class XmlItem { private Boolean prefixNsBoolean; - @Valid private List prefixNsArray = new ArrayList<>(); - @Valid private List prefixNsWrappedArray = new ArrayList<>(); public XmlItem attributeString(String attributeString) { @@ -101,7 +92,6 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ - @Schema(name = "attribute_string", example = "string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("attribute_string") public String getAttributeString() { @@ -121,7 +111,6 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ - @Valid @Schema(name = "attribute_number", example = "1.234", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("attribute_number") public BigDecimal getAttributeNumber() { @@ -141,7 +130,6 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ - @Schema(name = "attribute_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("attribute_integer") public Integer getAttributeInteger() { @@ -161,7 +149,6 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ - @Schema(name = "attribute_boolean", example = "true", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("attribute_boolean") public Boolean getAttributeBoolean() { @@ -189,7 +176,6 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ - @Schema(name = "wrapped_array", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("wrapped_array") public List getWrappedArray() { @@ -209,7 +195,6 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ - @Schema(name = "name_string", example = "string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name_string") public String getNameString() { @@ -229,7 +214,6 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ - @Valid @Schema(name = "name_number", example = "1.234", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name_number") public BigDecimal getNameNumber() { @@ -249,7 +233,6 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ - @Schema(name = "name_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name_integer") public Integer getNameInteger() { @@ -269,7 +252,6 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ - @Schema(name = "name_boolean", example = "true", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name_boolean") public Boolean getNameBoolean() { @@ -297,7 +279,6 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ - @Schema(name = "name_array", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name_array") public List getNameArray() { @@ -325,7 +306,6 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ - @Schema(name = "name_wrapped_array", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name_wrapped_array") public List getNameWrappedArray() { @@ -345,7 +325,6 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ - @Schema(name = "prefix_string", example = "string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_string") public String getPrefixString() { @@ -365,7 +344,6 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ - @Valid @Schema(name = "prefix_number", example = "1.234", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_number") public BigDecimal getPrefixNumber() { @@ -385,7 +363,6 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ - @Schema(name = "prefix_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_integer") public Integer getPrefixInteger() { @@ -405,7 +382,6 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ - @Schema(name = "prefix_boolean", example = "true", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_boolean") public Boolean getPrefixBoolean() { @@ -433,7 +409,6 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ - @Schema(name = "prefix_array", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_array") public List getPrefixArray() { @@ -461,7 +436,6 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ - @Schema(name = "prefix_wrapped_array", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_wrapped_array") public List getPrefixWrappedArray() { @@ -481,7 +455,6 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ - @Schema(name = "namespace_string", example = "string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespace_string") public String getNamespaceString() { @@ -501,7 +474,6 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ - @Valid @Schema(name = "namespace_number", example = "1.234", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespace_number") public BigDecimal getNamespaceNumber() { @@ -521,7 +493,6 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ - @Schema(name = "namespace_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { @@ -541,7 +512,6 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ - @Schema(name = "namespace_boolean", example = "true", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespace_boolean") public Boolean getNamespaceBoolean() { @@ -569,7 +539,6 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ - @Schema(name = "namespace_array", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespace_array") public List getNamespaceArray() { @@ -597,7 +566,6 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ - @Schema(name = "namespace_wrapped_array", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespace_wrapped_array") public List getNamespaceWrappedArray() { @@ -617,7 +585,6 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ - @Schema(name = "prefix_ns_string", example = "string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_ns_string") public String getPrefixNsString() { @@ -637,7 +604,6 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ - @Valid @Schema(name = "prefix_ns_number", example = "1.234", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_ns_number") public BigDecimal getPrefixNsNumber() { @@ -657,7 +623,6 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ - @Schema(name = "prefix_ns_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { @@ -677,7 +642,6 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ - @Schema(name = "prefix_ns_boolean", example = "true", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_ns_boolean") public Boolean getPrefixNsBoolean() { @@ -705,7 +669,6 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ - @Schema(name = "prefix_ns_array", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_ns_array") public List getPrefixNsArray() { @@ -733,7 +696,6 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ - @Schema(name = "prefix_ns_wrapped_array", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_ns_wrapped_array") public List getPrefixNsWrappedArray() { @@ -837,4 +799,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/PetApi.java index 9512dc9e23ab..21293ec9caea 100644 --- a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/PetApi.java @@ -46,7 +46,7 @@ default Optional getRequest() { ) default ResponseEntity addPet( - @Valid @RequestBody Pet pet + @RequestBody @NotNull @Valid Pet pet ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -81,7 +81,7 @@ default ResponseEntity addPet( ) default ResponseEntity deletePet( - @PathVariable("petId") Long petId, + @PathVariable("petId") @NotNull Long petId, @RequestHeader(value = "api_key", required = false) String apiKey ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -104,7 +104,7 @@ default ResponseEntity deletePet( ) default ResponseEntity> findPetsByStatus( - @NotNull @Valid @RequestParam(value = "status", required = true) @Deprecated List status + @RequestParam(value = "status") @Deprecated @NotNull List status ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -142,7 +142,7 @@ default ResponseEntity> findPetsByStatus( ) default ResponseEntity> findPetsByTags( - @NotNull @Valid @RequestParam(value = "tags", required = true) List tags + @RequestParam(value = "tags") @NotNull List tags ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -179,7 +179,7 @@ default ResponseEntity> findPetsByTags( ) default ResponseEntity getPetById( - @PathVariable("petId") Long petId + @PathVariable("petId") @NotNull Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -220,7 +220,7 @@ default ResponseEntity getPetById( ) default ResponseEntity updatePet( - @Valid @RequestBody Pet pet + @RequestBody @NotNull @Valid Pet pet ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -257,9 +257,9 @@ default ResponseEntity updatePet( ) default ResponseEntity updatePetWithForm( - @PathVariable("petId") Long petId, - @Valid @RequestParam(value = "name", required = false) String name, - @Valid @RequestParam(value = "status", required = false) String status + @PathVariable("petId") @NotNull Long petId, + @RequestParam(value = "name", required = false) String name, + @RequestParam(value = "status", required = false) String status ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -283,8 +283,8 @@ default ResponseEntity updatePetWithForm( ) default ResponseEntity uploadFile( - @PathVariable("petId") Long petId, - @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, + @PathVariable("petId") @NotNull Long petId, + @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @RequestPart(value = "file", required = false) MultipartFile file ) { getRequest().ifPresent(request -> { diff --git a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/StoreApi.java index 1414e5554575..0b52c50a8142 100644 --- a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/StoreApi.java @@ -44,7 +44,7 @@ default Optional getRequest() { ) default ResponseEntity deleteOrder( - @PathVariable("orderId") String orderId + @PathVariable("orderId") @NotNull String orderId ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -87,7 +87,7 @@ default ResponseEntity> getInventory( ) default ResponseEntity getOrderById( - @Min(1L) @Max(5L) @PathVariable("orderId") Long orderId + @PathVariable("orderId") @NotNull @Min(1L) @Max(5L) Long orderId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -124,7 +124,7 @@ default ResponseEntity getOrderById( ) default ResponseEntity placeOrder( - @Valid @RequestBody Order order + @RequestBody @NotNull @Valid Order order ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/UserApi.java index 8acdcb00ccc1..9789fc58ba18 100644 --- a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/UserApi.java @@ -44,7 +44,7 @@ default Optional getRequest() { ) default ResponseEntity createUser( - @Valid @RequestBody User user + @RequestBody @NotNull @Valid User user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -65,7 +65,7 @@ default ResponseEntity createUser( ) default ResponseEntity createUsersWithArrayInput( - @Valid @RequestBody List<@Valid User> user + @RequestBody @NotNull List<@Valid User> user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -86,7 +86,7 @@ default ResponseEntity createUsersWithArrayInput( ) default ResponseEntity createUsersWithListInput( - @Valid @RequestBody List<@Valid User> user + @RequestBody @NotNull List<@Valid User> user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -107,7 +107,7 @@ default ResponseEntity createUsersWithListInput( ) default ResponseEntity deleteUser( - @PathVariable("username") String username + @PathVariable("username") @NotNull String username ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -130,7 +130,7 @@ default ResponseEntity deleteUser( ) default ResponseEntity getUserByName( - @PathVariable("username") String username + @PathVariable("username") @NotNull String username ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -167,8 +167,8 @@ default ResponseEntity getUserByName( ) default ResponseEntity loginUser( - @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @Valid @RequestParam(value = "username", required = true) String username, - @NotNull @Valid @RequestParam(value = "password", required = true) String password + @RequestParam(value = "username") @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String username, + @RequestParam(value = "password") @NotNull String password ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -210,8 +210,8 @@ default ResponseEntity logoutUser( ) default ResponseEntity updateUser( - @PathVariable("username") String username, - @Valid @RequestBody User user + @PathVariable("username") @NotNull String username, + @RequestBody @NotNull @Valid User user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Category.java index 32bd7e47b43e..4220da323fbc 100644 --- a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Category.java @@ -22,7 +22,7 @@ public class Category { private Long id; - private String name; + private @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String name; public Category id(Long id) { this.id = id; @@ -33,7 +33,6 @@ public Category id(Long id) { * Get id * @return id */ - @JsonProperty("id") public Long getId() { return id; @@ -52,9 +51,8 @@ public Category name(String name) { * Get name * @return name */ - @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @JsonProperty("name") - public String getName() { + public @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String getName() { return name; } @@ -101,4 +99,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/ModelApiResponse.java index c9ec1d423b80..d455b674a212 100644 --- a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -37,7 +37,6 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @JsonProperty("code") public Integer getCode() { return code; @@ -56,7 +55,6 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @JsonProperty("type") public String getType() { return type; @@ -75,7 +73,6 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @JsonProperty("message") public String getMessage() { return message; @@ -126,4 +123,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Order.java index c6cc5ff4c7d0..e0516dfa70f2 100644 --- a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Order.java +++ b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Order.java @@ -69,7 +69,7 @@ public static StatusEnum fromValue(String value) { } } - private StatusEnum status; + private String status; private Boolean complete = false; @@ -82,7 +82,6 @@ public Order id(Long id) { * Get id * @return id */ - @JsonProperty("id") public Long getId() { return id; @@ -101,7 +100,6 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @JsonProperty("petId") public Long getPetId() { return petId; @@ -120,7 +118,6 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @JsonProperty("quantity") public Integer getQuantity() { return quantity; @@ -139,7 +136,6 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Valid @JsonProperty("shipDate") public OffsetDateTime getShipDate() { return shipDate; @@ -158,9 +154,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @JsonProperty("status") - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -177,7 +172,6 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @JsonProperty("complete") public Boolean getComplete() { return complete; @@ -234,4 +228,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Pet.java index 4373541b9568..9d7b20e68ff2 100644 --- a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Pet.java @@ -28,14 +28,12 @@ public class Pet { private Long id; - private Category category; + private @Valid Category category; - private String name; + private @NotNull String name; - @Valid - private List photoUrls = new ArrayList<>(); + private @NotNull List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** @@ -76,7 +74,7 @@ public static StatusEnum fromValue(String value) { } @Deprecated - private StatusEnum status; + private String status; public Pet() { super(); @@ -99,7 +97,6 @@ public Pet id(Long id) { * Get id * @return id */ - @JsonProperty("id") public Long getId() { return id; @@ -118,9 +115,8 @@ public Pet category(Category category) { * Get category * @return category */ - @Valid @JsonProperty("category") - public Category getCategory() { + public @Valid Category getCategory() { return category; } @@ -137,9 +133,8 @@ public Pet name(String name) { * Get name * @return name */ - @NotNull @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -164,9 +159,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @NotNull @JsonProperty("photoUrls") - public List getPhotoUrls() { + public @NotNull List getPhotoUrls() { return photoUrls; } @@ -174,7 +168,7 @@ public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List<@Valid Tag> tags) { + public Pet tags(List tags) { this.tags = tags; return this; } @@ -191,13 +185,12 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Valid @JsonProperty("tags") public List<@Valid Tag> getTags() { return tags; } - public void setTags(List<@Valid Tag> tags) { + public void setTags(List tags) { this.tags = tags; } @@ -211,10 +204,9 @@ public Pet status(StatusEnum status) { * @return status * @deprecated */ - @JsonProperty("status") @Deprecated - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -273,4 +265,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Tag.java index 17bf1e904341..f9d561eead54 100644 --- a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Tag.java @@ -33,7 +33,6 @@ public Tag id(Long id) { * Get id * @return id */ - @JsonProperty("id") public Long getId() { return id; @@ -52,7 +51,6 @@ public Tag name(String name) { * Get name * @return name */ - @JsonProperty("name") public String getName() { return name; @@ -101,4 +99,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/User.java b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/User.java index cfc3c4573536..02d03ce583b1 100644 --- a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/User.java +++ b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/User.java @@ -45,7 +45,6 @@ public User id(Long id) { * Get id * @return id */ - @JsonProperty("id") public Long getId() { return id; @@ -64,7 +63,6 @@ public User username(String username) { * Get username * @return username */ - @JsonProperty("username") public String getUsername() { return username; @@ -83,7 +81,6 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @JsonProperty("firstName") public String getFirstName() { return firstName; @@ -102,7 +99,6 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @JsonProperty("lastName") public String getLastName() { return lastName; @@ -121,7 +117,6 @@ public User email(String email) { * Get email * @return email */ - @JsonProperty("email") public String getEmail() { return email; @@ -140,7 +135,6 @@ public User password(String password) { * Get password * @return password */ - @JsonProperty("password") public String getPassword() { return password; @@ -159,7 +153,6 @@ public User phone(String phone) { * Get phone * @return phone */ - @JsonProperty("phone") public String getPhone() { return phone; @@ -178,7 +171,6 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @JsonProperty("userStatus") public Integer getUserStatus() { return userStatus; @@ -239,4 +231,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java index de70746990f0..31f34b54dc47 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java @@ -75,7 +75,7 @@ default Optional getRequest() { ) default ResponseEntity addPet( - @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet pet ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -122,7 +122,7 @@ default ResponseEntity addPet( ) default ResponseEntity deletePet( - @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, @Parameter(name = "api_key", description = "", in = ParameterIn.HEADER) @RequestHeader(value = "api_key", required = false) String apiKey ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -161,7 +161,7 @@ default ResponseEntity deletePet( ) default ResponseEntity> findPetsByStatus( - @NotNull @Parameter(name = "status", deprecated = true, description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) @Deprecated List status + @Parameter(name = "status", deprecated = true, description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @RequestParam(value = "status") @Deprecated @NotNull List status ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -216,7 +216,7 @@ default ResponseEntity> findPetsByStatus( ) default ResponseEntity> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) List tags + @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @RequestParam(value = "tags") @NotNull List tags ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -270,7 +270,7 @@ default ResponseEntity> findPetsByTags( ) default ResponseEntity getPetById( - @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId + @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -330,7 +330,7 @@ default ResponseEntity getPetById( ) default ResponseEntity updatePet( - @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet pet ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -379,9 +379,9 @@ default ResponseEntity updatePet( ) default ResponseEntity updatePetWithForm( - @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, - @Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, - @Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status + @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, + @Parameter(name = "name", description = "Updated name of the pet") @RequestParam(value = "name", required = false) String name, + @Parameter(name = "status", description = "Updated status of the pet") @RequestParam(value = "status", required = false) String status ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -419,8 +419,8 @@ default ResponseEntity updatePetWithForm( ) default ResponseEntity uploadFile( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, - @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, + @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, + @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) { getRequest().ifPresent(request -> { diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java index 74beda792f41..4cd2804f9b23 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java @@ -67,7 +67,7 @@ default Optional getRequest() { ) default ResponseEntity deleteOrder( - @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId + @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") @NotNull String orderId ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -138,7 +138,7 @@ default ResponseEntity> getInventory( ) default ResponseEntity getOrderById( - @Min(1L) @Max(5L) @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("orderId") Long orderId + @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("orderId") @NotNull @Min(1L) @Max(5L) Long orderId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -188,7 +188,7 @@ default ResponseEntity getOrderById( ) default ResponseEntity placeOrder( - @Parameter(name = "Order", description = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order + @Parameter(name = "Order", description = "order placed for purchasing the pet", required = true) @RequestBody @NotNull @Valid Order order ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java index 47df523fbf9a..424903230ba9 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java @@ -69,7 +69,7 @@ default Optional getRequest() { ) default ResponseEntity createUser( - @Parameter(name = "User", description = "Created user object", required = true) @Valid @RequestBody User user + @Parameter(name = "User", description = "Created user object", required = true) @RequestBody @NotNull @Valid User user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -102,7 +102,7 @@ default ResponseEntity createUser( ) default ResponseEntity createUsersWithArrayInput( - @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + @Parameter(name = "User", description = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -135,7 +135,7 @@ default ResponseEntity createUsersWithArrayInput( ) default ResponseEntity createUsersWithListInput( - @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + @Parameter(name = "User", description = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -169,7 +169,7 @@ default ResponseEntity createUsersWithListInput( ) default ResponseEntity deleteUser( - @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") @NotNull String username ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -206,7 +206,7 @@ default ResponseEntity deleteUser( ) default ResponseEntity getUserByName( - @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") @NotNull String username ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -256,8 +256,8 @@ default ResponseEntity getUserByName( ) default ResponseEntity loginUser( - @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username, - @NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) String password + @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @RequestParam(value = "username") @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String username, + @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @RequestParam(value = "password") @NotNull String password ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -324,8 +324,8 @@ default ResponseEntity logoutUser( ) default ResponseEntity updateUser( - @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, - @Parameter(name = "User", description = "Updated user object", required = true) @Valid @RequestBody User user + @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") @NotNull String username, + @Parameter(name = "User", description = "Updated user object", required = true) @RequestBody @NotNull @Valid User user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Category.java index 404ff8514e68..c0ab61ef2083 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Category.java @@ -24,7 +24,7 @@ public class Category { private Long id; - private String name; + private @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String name; public Category id(Long id) { this.id = id; @@ -35,7 +35,6 @@ public Category id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -55,10 +54,9 @@ public Category name(String name) { * Get name * @return name */ - @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") - public String getName() { + public @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String getName() { return name; } @@ -105,4 +103,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/ModelApiResponse.java index 0446e2562ee0..46704d751615 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -39,7 +39,6 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @Schema(name = "code", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("code") public Integer getCode() { @@ -59,7 +58,6 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @Schema(name = "type", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("type") public String getType() { @@ -79,7 +77,6 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @Schema(name = "message", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("message") public String getMessage() { @@ -131,4 +128,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java index 42861e6943e0..416b488c0d45 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java @@ -71,7 +71,7 @@ public static StatusEnum fromValue(String value) { } } - private StatusEnum status; + private String status; private Boolean complete = false; @@ -84,7 +84,6 @@ public Order id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -104,7 +103,6 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @Schema(name = "petId", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("petId") public Long getPetId() { @@ -124,7 +122,6 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @Schema(name = "quantity", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("quantity") public Integer getQuantity() { @@ -144,7 +141,6 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Valid @Schema(name = "shipDate", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("shipDate") public OffsetDateTime getShipDate() { @@ -164,10 +160,9 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @Schema(name = "status", description = "Order Status", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("status") - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -184,7 +179,6 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @Schema(name = "complete", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("complete") public Boolean getComplete() { @@ -242,4 +236,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java index a14eaa01737f..c60fee0780d9 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java @@ -30,14 +30,12 @@ public class Pet { private Long id; - private Category category; + private @Valid Category category; - private String name; + private @NotNull String name; - @Valid - private List photoUrls = new ArrayList<>(); + private @NotNull List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** @@ -78,7 +76,7 @@ public static StatusEnum fromValue(String value) { } @Deprecated - private StatusEnum status; + private String status; public Pet() { super(); @@ -101,7 +99,6 @@ public Pet id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -121,10 +118,9 @@ public Pet category(Category category) { * Get category * @return category */ - @Valid @Schema(name = "category", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("category") - public Category getCategory() { + public @Valid Category getCategory() { return category; } @@ -141,10 +137,9 @@ public Pet name(String name) { * Get name * @return name */ - @NotNull @Schema(name = "name", example = "doggie", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -169,10 +164,9 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @NotNull @Schema(name = "photoUrls", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("photoUrls") - public List getPhotoUrls() { + public @NotNull List getPhotoUrls() { return photoUrls; } @@ -180,7 +174,7 @@ public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List<@Valid Tag> tags) { + public Pet tags(List tags) { this.tags = tags; return this; } @@ -197,14 +191,13 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Valid @Schema(name = "tags", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("tags") public List<@Valid Tag> getTags() { return tags; } - public void setTags(List<@Valid Tag> tags) { + public void setTags(List tags) { this.tags = tags; } @@ -218,11 +211,10 @@ public Pet status(StatusEnum status) { * @return status * @deprecated */ - @Schema(name = "status", description = "pet status in the store", deprecated = true, requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("status") @Deprecated - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -281,4 +273,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Tag.java index f1a466ed802e..7e2360011252 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Tag.java @@ -35,7 +35,6 @@ public Tag id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -55,7 +54,6 @@ public Tag name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -105,4 +103,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/User.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/User.java index 916cc3d937f9..84014db8ad34 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/User.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/User.java @@ -47,7 +47,6 @@ public User id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -67,7 +66,6 @@ public User username(String username) { * Get username * @return username */ - @Schema(name = "username", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("username") public String getUsername() { @@ -87,7 +85,6 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @Schema(name = "firstName", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("firstName") public String getFirstName() { @@ -107,7 +104,6 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @Schema(name = "lastName", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("lastName") public String getLastName() { @@ -127,7 +123,6 @@ public User email(String email) { * Get email * @return email */ - @Schema(name = "email", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("email") public String getEmail() { @@ -147,7 +142,6 @@ public User password(String password) { * Get password * @return password */ - @Schema(name = "password", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("password") public String getPassword() { @@ -167,7 +161,6 @@ public User phone(String phone) { * Get phone * @return phone */ - @Schema(name = "phone", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("phone") public String getPhone() { @@ -187,7 +180,6 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @Schema(name = "userStatus", description = "User Status", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("userStatus") public Integer getUserStatus() { @@ -249,4 +241,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Category.java index eb9becab7c69..bce338cc0a1d 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Category.java @@ -32,7 +32,7 @@ public class Category { private Long id; - private String name; + private @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String name; public Category id(Long id) { this.id = id; @@ -43,7 +43,6 @@ public Category id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") @JacksonXmlProperty(localName = "id") @@ -64,11 +63,10 @@ public Category name(String name) { * Get name * @return name */ - @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") @JacksonXmlProperty(localName = "name") - public String getName() { + public @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String getName() { return name; } diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/ModelApiResponse.java index 96cdea4efb18..bb269b3d8637 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -47,7 +47,6 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @Schema(name = "code", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("code") @JacksonXmlProperty(localName = "code") @@ -68,7 +67,6 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @Schema(name = "type", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("type") @JacksonXmlProperty(localName = "type") @@ -89,7 +87,6 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @Schema(name = "message", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("message") @JacksonXmlProperty(localName = "message") diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Order.java index 78ca4d748b9c..8903db92952d 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Order.java @@ -79,7 +79,7 @@ public static StatusEnum fromValue(String value) { } } - private StatusEnum status; + private String status; private Boolean complete = false; @@ -92,7 +92,6 @@ public Order id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") @JacksonXmlProperty(localName = "id") @@ -113,7 +112,6 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @Schema(name = "petId", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("petId") @JacksonXmlProperty(localName = "petId") @@ -134,7 +132,6 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @Schema(name = "quantity", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("quantity") @JacksonXmlProperty(localName = "quantity") @@ -155,7 +152,6 @@ public Order shipDate(Date shipDate) { * Get shipDate * @return shipDate */ - @Valid @Schema(name = "shipDate", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("shipDate") @JacksonXmlProperty(localName = "shipDate") @@ -176,11 +172,10 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @Schema(name = "status", description = "Order Status", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("status") @JacksonXmlProperty(localName = "status") - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -197,7 +192,6 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @Schema(name = "complete", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("complete") @JacksonXmlProperty(localName = "complete") diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Pet.java index 35b8977b2b88..f4aabf008054 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Pet.java @@ -38,14 +38,12 @@ public class Pet { private Long id; - private Category category; + private @Valid Category category; - private String name; + private @NotNull String name; - @Valid - private List photoUrls = new ArrayList<>(); + private @NotNull List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** @@ -86,7 +84,7 @@ public static StatusEnum fromValue(String value) { } @Deprecated - private StatusEnum status; + private String status; public Pet() { super(); @@ -109,7 +107,6 @@ public Pet id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") @JacksonXmlProperty(localName = "id") @@ -130,11 +127,10 @@ public Pet category(Category category) { * Get category * @return category */ - @Valid @Schema(name = "category", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("category") @JacksonXmlProperty(localName = "Category") - public Category getCategory() { + public @Valid Category getCategory() { return category; } @@ -151,11 +147,10 @@ public Pet name(String name) { * Get name * @return name */ - @NotNull @Schema(name = "name", example = "doggie", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("name") @JacksonXmlProperty(localName = "name") - public String getName() { + public @NotNull String getName() { return name; } @@ -180,12 +175,11 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @NotNull @Schema(name = "photoUrls", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("photoUrls") @JacksonXmlProperty(localName = "photoUrl") @JacksonXmlElementWrapper(localName = "photoUrl", useWrapping = true) - public List getPhotoUrls() { + public @NotNull List getPhotoUrls() { return photoUrls; } @@ -193,7 +187,7 @@ public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List<@Valid Tag> tags) { + public Pet tags(List tags) { this.tags = tags; return this; } @@ -210,7 +204,6 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Valid @Schema(name = "tags", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("tags") @JacksonXmlProperty(localName = "Tag") @@ -219,7 +212,7 @@ public Pet addTagsItem(Tag tagsItem) { return tags; } - public void setTags(List<@Valid Tag> tags) { + public void setTags(List tags) { this.tags = tags; } @@ -233,12 +226,11 @@ public Pet status(StatusEnum status) { * @return status * @deprecated */ - @Schema(name = "status", description = "pet status in the store", deprecated = true, requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("status") @JacksonXmlProperty(localName = "status") @Deprecated - public StatusEnum getStatus() { + public String getStatus() { return status; } diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Tag.java index 6a9b2f247f41..d850a4a0d147 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Tag.java @@ -43,7 +43,6 @@ public Tag id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") @JacksonXmlProperty(localName = "id") @@ -64,7 +63,6 @@ public Tag name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") @JacksonXmlProperty(localName = "name") diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/User.java index b27c5c402a87..86587360502e 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/User.java @@ -55,7 +55,6 @@ public User id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") @JacksonXmlProperty(localName = "id") @@ -76,7 +75,6 @@ public User username(String username) { * Get username * @return username */ - @Schema(name = "username", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("username") @JacksonXmlProperty(localName = "username") @@ -97,7 +95,6 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @Schema(name = "firstName", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("firstName") @JacksonXmlProperty(localName = "firstName") @@ -118,7 +115,6 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @Schema(name = "lastName", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("lastName") @JacksonXmlProperty(localName = "lastName") @@ -139,7 +135,6 @@ public User email(String email) { * Get email * @return email */ - @Schema(name = "email", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("email") @JacksonXmlProperty(localName = "email") @@ -160,7 +155,6 @@ public User password(String password) { * Get password * @return password */ - @Schema(name = "password", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("password") @JacksonXmlProperty(localName = "password") @@ -181,7 +175,6 @@ public User phone(String phone) { * Get phone * @return phone */ - @Schema(name = "phone", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("phone") @JacksonXmlProperty(localName = "phone") @@ -202,7 +195,6 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @Schema(name = "userStatus", description = "User Status", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("userStatus") @JacksonXmlProperty(localName = "userStatus") diff --git a/samples/server/petstore/java-undertow/src/main/java/org/openapitools/handler/PathHandlerInterface.java b/samples/server/petstore/java-undertow/src/main/java/org/openapitools/handler/PathHandlerInterface.java index bad7106ea5c8..22e3fb2f0f99 100644 --- a/samples/server/petstore/java-undertow/src/main/java/org/openapitools/handler/PathHandlerInterface.java +++ b/samples/server/petstore/java-undertow/src/main/java/org/openapitools/handler/PathHandlerInterface.java @@ -94,7 +94,7 @@ public interface PathHandlerInterface { *

"status" *

Status values that need to be considered for filter

*

- * - Parameter type: {@link java.util.List List} of {@link List<String>}
+ * - Parameter type: {@link java.util.List List} of {@link List}
* - Appears in: {@link HttpServerExchange#getQueryParameters Query}
* - Required: true *

@@ -126,7 +126,7 @@ public interface PathHandlerInterface { *

"tags" *

Tags to filter by

*

- * - Parameter type: {@link java.util.List List} of {@link List<String>}
+ * - Parameter type: {@link java.util.List List} of {@link List}
* - Appears in: {@link HttpServerExchange#getQueryParameters Query}
* - Required: true *

diff --git a/samples/server/petstore/java-undertow/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/java-undertow/src/main/java/org/openapitools/model/Pet.java index e172bb8806ce..683a86b8a045 100644 --- a/samples/server/petstore/java-undertow/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/java-undertow/src/main/java/org/openapitools/model/Pet.java @@ -35,8 +35,8 @@ public class Pet { private Long id; private Category category; private String name; - private List photoUrls = new ArrayList<>(); - private List tags = new ArrayList<>(); + private List photoUrls = new ArrayList<>(); + private List tags = new ArrayList<>(); public enum StatusEnum { @@ -112,7 +112,7 @@ public void setName(String name) { /** */ - public Pet photoUrls(List photoUrls) { + public Pet photoUrls(List photoUrls) { this.photoUrls = photoUrls; return this; } @@ -120,16 +120,16 @@ public Pet photoUrls(List photoUrls) { @ApiModelProperty(required = true, value = "") @JsonProperty("photoUrls") - public List getPhotoUrls() { + public List getPhotoUrls() { return photoUrls; } - public void setPhotoUrls(List photoUrls) { + public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } /** */ - public Pet tags(List tags) { + public Pet tags(List tags) { this.tags = tags; return this; } @@ -137,10 +137,10 @@ public Pet tags(List tags) { @ApiModelProperty(value = "") @JsonProperty("tags") - public List getTags() { + public List getTags() { return tags; } - public void setTags(List tags) { + public void setTags(List tags) { this.tags = tags; } diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/AnotherFakeApi.java index e8a70c03584f..25d414b2d733 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -63,7 +63,7 @@ public interface AnotherFakeApi { ) ResponseEntity call123testSpecialTags( - @Parameter(name = "Client", description = "client model", required = true) @Valid @RequestBody Client client + @Parameter(name = "Client", description = "client model", required = true) @RequestBody @NotNull @Valid Client client ) throws Exception; } diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeApi.java index 90a8e45a59bb..eb2833cac3df 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeApi.java @@ -72,7 +72,7 @@ public interface FakeApi { ) ResponseEntity createXmlItem( - @Parameter(name = "XmlItem", description = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem + @Parameter(name = "XmlItem", description = "XmlItem Body", required = true) @RequestBody @NotNull @Valid XmlItem xmlItem ) throws Exception; @@ -101,7 +101,7 @@ ResponseEntity createXmlItem( ) ResponseEntity fakeOuterBooleanSerialize( - @Parameter(name = "body", description = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body + @Parameter(name = "body", description = "Input boolean as post body") @RequestBody(required = false) Boolean body ) throws Exception; @@ -130,7 +130,7 @@ ResponseEntity fakeOuterBooleanSerialize( ) ResponseEntity fakeOuterCompositeSerialize( - @Parameter(name = "OuterComposite", description = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite outerComposite + @Parameter(name = "OuterComposite", description = "Input composite as post body") @RequestBody(required = false) @Valid OuterComposite outerComposite ) throws Exception; @@ -159,7 +159,7 @@ ResponseEntity fakeOuterCompositeSerialize( ) ResponseEntity fakeOuterNumberSerialize( - @Parameter(name = "body", description = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body + @Parameter(name = "body", description = "Input number as post body") @RequestBody(required = false) BigDecimal body ) throws Exception; @@ -188,7 +188,7 @@ ResponseEntity fakeOuterNumberSerialize( ) ResponseEntity fakeOuterStringSerialize( - @Parameter(name = "body", description = "Input string as post body") @Valid @RequestBody(required = false) String body + @Parameter(name = "body", description = "Input string as post body") @RequestBody(required = false) String body ) throws Exception; @@ -214,7 +214,7 @@ ResponseEntity fakeOuterStringSerialize( ) ResponseEntity responseObjectDifferentNames( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId + @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId ) throws Exception; @@ -240,7 +240,7 @@ ResponseEntity responseObjectDifferentNam ) ResponseEntity testBodyWithFileSchema( - @Parameter(name = "FileSchemaTestClass", description = "", required = true) @Valid @RequestBody FileSchemaTestClass fileSchemaTestClass + @Parameter(name = "FileSchemaTestClass", description = "", required = true) @RequestBody @NotNull @Valid FileSchemaTestClass fileSchemaTestClass ) throws Exception; @@ -265,8 +265,8 @@ ResponseEntity testBodyWithFileSchema( ) ResponseEntity testBodyWithQueryParams( - @NotNull @Parameter(name = "query", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "query", required = true) String query, - @Parameter(name = "User", description = "", required = true) @Valid @RequestBody User user + @Parameter(name = "query", description = "", required = true, in = ParameterIn.QUERY) @RequestParam(value = "query") @NotNull String query, + @Parameter(name = "User", description = "", required = true) @RequestBody @NotNull @Valid User user ) throws Exception; @@ -296,7 +296,7 @@ ResponseEntity testBodyWithQueryParams( ) ResponseEntity testClientModel( - @Parameter(name = "Client", description = "client model", required = true) @Valid @RequestBody Client client + @Parameter(name = "Client", description = "client model", required = true) @RequestBody @NotNull @Valid Client client ) throws Exception; @@ -341,20 +341,20 @@ ResponseEntity testClientModel( ) ResponseEntity testEndpointParameters( - @Parameter(name = "number", description = "None", required = true) @Valid @RequestParam(value = "number", required = true) BigDecimal number, - @Parameter(name = "double", description = "None", required = true) @Valid @RequestParam(value = "double", required = true) Double _double, - @Parameter(name = "pattern_without_delimiter", description = "None", required = true) @Valid @RequestParam(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, - @Parameter(name = "byte", description = "None", required = true) @Valid @RequestParam(value = "byte", required = true) byte[] _byte, - @Parameter(name = "integer", description = "None") @Valid @RequestParam(value = "integer", required = false) Integer integer, - @Parameter(name = "int32", description = "None") @Valid @RequestParam(value = "int32", required = false) Integer int32, - @Parameter(name = "int64", description = "None") @Valid @RequestParam(value = "int64", required = false) Long int64, - @Parameter(name = "float", description = "None") @Valid @RequestParam(value = "float", required = false) Float _float, - @Parameter(name = "string", description = "None") @Valid @RequestParam(value = "string", required = false) String string, + @Parameter(name = "number", description = "None", required = true) @RequestParam(value = "number") @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal number, + @Parameter(name = "double", description = "None", required = true) @RequestParam(value = "double") @NotNull @DecimalMin("67.8") @DecimalMax("123.4") Double _double, + @Parameter(name = "pattern_without_delimiter", description = "None", required = true) @RequestParam(value = "pattern_without_delimiter") @NotNull @Pattern(regexp = "^[A-Z].*") String patternWithoutDelimiter, + @Parameter(name = "byte", description = "None", required = true) @RequestParam(value = "byte") @NotNull byte[] _byte, + @Parameter(name = "integer", description = "None") @RequestParam(value = "integer", required = false) @Min(10) @Max(100) Integer integer, + @Parameter(name = "int32", description = "None") @RequestParam(value = "int32", required = false) @Min(20) @Max(200) Integer int32, + @Parameter(name = "int64", description = "None") @RequestParam(value = "int64", required = false) Long int64, + @Parameter(name = "float", description = "None") @RequestParam(value = "float", required = false) @DecimalMax("987.6") Float _float, + @Parameter(name = "string", description = "None") @RequestParam(value = "string", required = false) @Pattern(regexp = "/[a-z]/i") String string, @Parameter(name = "binary", description = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @Parameter(name = "date", description = "None") @Valid @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, - @Parameter(name = "dateTime", description = "None") @Valid @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, - @Parameter(name = "password", description = "None") @Valid @RequestParam(value = "password", required = false) String password, - @Parameter(name = "callback", description = "None") @Valid @RequestParam(value = "callback", required = false) String paramCallback + @Parameter(name = "date", description = "None") @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @Parameter(name = "dateTime", description = "None") @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @Parameter(name = "password", description = "None") @RequestParam(value = "password", required = false) @Size(min = 10, max = 64) String password, + @Parameter(name = "callback", description = "None") @RequestParam(value = "callback", required = false) String paramCallback ) throws Exception; @@ -390,14 +390,14 @@ ResponseEntity testEndpointParameters( ) ResponseEntity testEnumParameters( - @Parameter(name = "enum_header_string_array", description = "Header parameter enum test (string array)", in = ParameterIn.HEADER) @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @Parameter(name = "enum_header_string_array", description = "Header parameter enum test (string array)", in = ParameterIn.HEADER) @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, @Parameter(name = "enum_header_string", description = "Header parameter enum test (string)", in = ParameterIn.HEADER) @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, - @Parameter(name = "enum_query_string_array", description = "Query parameter enum test (string array)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, - @Parameter(name = "enum_query_string", description = "Query parameter enum test (string)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, - @Parameter(name = "enum_query_double", description = "Query parameter enum test (double)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, - @Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, - @Parameter(name = "enum_form_string", description = "Form parameter enum test (string)") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString + @Parameter(name = "enum_query_string_array", description = "Query parameter enum test (string array)", in = ParameterIn.QUERY) @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @Parameter(name = "enum_query_string", description = "Query parameter enum test (string)", in = ParameterIn.QUERY) @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, + @Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)", in = ParameterIn.QUERY) @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @Parameter(name = "enum_query_double", description = "Query parameter enum test (double)", in = ParameterIn.QUERY) @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)") @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @Parameter(name = "enum_form_string", description = "Form parameter enum test (string)") @RequestParam(value = "enum_form_string", required = false) String enumFormString ) throws Exception; @@ -428,12 +428,12 @@ ResponseEntity testEnumParameters( ) ResponseEntity testGroupParameters( - @NotNull @Parameter(name = "required_string_group", description = "Required String in group parameters", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @Parameter(name = "required_string_group", description = "Required String in group parameters", required = true, in = ParameterIn.QUERY) @RequestParam(value = "required_string_group") @NotNull Integer requiredStringGroup, @NotNull @Parameter(name = "required_boolean_group", description = "Required Boolean in group parameters", required = true, in = ParameterIn.HEADER) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, - @NotNull @Parameter(name = "required_int64_group", description = "Required Integer in group parameters", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, - @Parameter(name = "string_group", description = "String in group parameters", in = ParameterIn.QUERY) @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup, + @Parameter(name = "required_int64_group", description = "Required Integer in group parameters", required = true, in = ParameterIn.QUERY) @RequestParam(value = "required_int64_group") @NotNull Long requiredInt64Group, + @Parameter(name = "string_group", description = "String in group parameters", in = ParameterIn.QUERY) @RequestParam(value = "string_group", required = false) Integer stringGroup, @Parameter(name = "boolean_group", description = "Boolean in group parameters", in = ParameterIn.HEADER) @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup, - @Parameter(name = "int64_group", description = "Integer in group parameters", in = ParameterIn.QUERY) @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + @Parameter(name = "int64_group", description = "Integer in group parameters", in = ParameterIn.QUERY) @RequestParam(value = "int64_group", required = false) Long int64Group ) throws Exception; @@ -460,7 +460,7 @@ ResponseEntity testGroupParameters( ) ResponseEntity testInlineAdditionalProperties( - @Parameter(name = "request_body", description = "request body", required = true) @Valid @RequestBody Map requestBody + @Parameter(name = "request_body", description = "request body", required = true) @RequestBody @NotNull Map requestBody ) throws Exception; @@ -488,8 +488,8 @@ ResponseEntity testInlineAdditionalProperties( ) ResponseEntity testJsonFormData( - @Parameter(name = "param", description = "field1", required = true) @Valid @RequestParam(value = "param", required = true) String param, - @Parameter(name = "param2", description = "field2", required = true) @Valid @RequestParam(value = "param2", required = true) String param2 + @Parameter(name = "param", description = "field1", required = true) @RequestParam(value = "param") @NotNull String param, + @Parameter(name = "param2", description = "field2", required = true) @RequestParam(value = "param2") @NotNull String param2 ) throws Exception; @@ -516,7 +516,7 @@ ResponseEntity testJsonFormData( ) ResponseEntity testNullable( - @Parameter(name = "ChildWithNullable", description = "request body", required = true) @Valid @RequestBody ChildWithNullable childWithNullable + @Parameter(name = "ChildWithNullable", description = "request body", required = true) @RequestBody @NotNull @Valid ChildWithNullable childWithNullable ) throws Exception; @@ -544,10 +544,10 @@ ResponseEntity testNullable( ) ResponseEntity testQueryParameterCollectionFormat( - @NotNull @Parameter(name = "pipe", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "pipe", required = true) List pipe, - @NotNull @Parameter(name = "http", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "http", required = true) List http, - @NotNull @Parameter(name = "url", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "url", required = true) List url, - @NotNull @Parameter(name = "context", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "context", required = true) List context + @Parameter(name = "pipe", description = "", required = true, in = ParameterIn.QUERY) @RequestParam(value = "pipe") @NotNull List pipe, + @Parameter(name = "http", description = "", required = true, in = ParameterIn.QUERY) @RequestParam(value = "http") @NotNull List http, + @Parameter(name = "url", description = "", required = true, in = ParameterIn.QUERY) @RequestParam(value = "url") @NotNull List url, + @Parameter(name = "context", description = "", required = true, in = ParameterIn.QUERY) @RequestParam(value = "context") @NotNull List context ) throws Exception; @@ -609,9 +609,9 @@ ResponseEntity testWithResultExample( ) ResponseEntity uploadFileWithRequiredFile( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, - @Parameter(name = "requiredFile", description = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, - @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata + @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, + @Parameter(name = "requiredFile", description = "file to upload", required = true) @RequestPart(value = "requiredFile") MultipartFile requiredFile, + @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata ) throws Exception; } diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 461340935db1..45d685b8df05 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -66,7 +66,7 @@ public interface FakeClassnameTestApi { ) ResponseEntity testClassname( - @Parameter(name = "Client", description = "client model", required = true) @Valid @RequestBody Client client + @Parameter(name = "Client", description = "client model", required = true) @RequestBody @NotNull @Valid Client client ) throws Exception; } diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/PetApi.java index 6ac3f5640b70..5681806642c8 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/PetApi.java @@ -67,7 +67,7 @@ public interface PetApi { ) ResponseEntity addPet( - @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet pet ) throws Exception; @@ -99,7 +99,7 @@ ResponseEntity addPet( ) ResponseEntity deletePet( - @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, @Parameter(name = "api_key", description = "", in = ParameterIn.HEADER) @RequestHeader(value = "api_key", required = false) String apiKey ) throws Exception; @@ -135,7 +135,7 @@ ResponseEntity deletePet( ) ResponseEntity> findPetsByStatus( - @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) List status + @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @RequestParam(value = "status") @NotNull List status ) throws Exception; @@ -173,7 +173,7 @@ ResponseEntity> findPetsByStatus( ) ResponseEntity> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) Set tags + @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @RequestParam(value = "tags") @NotNull Set tags ) throws Exception; @@ -210,7 +210,7 @@ ResponseEntity> findPetsByTags( ) ResponseEntity getPetById( - @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId + @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId ) throws Exception; @@ -246,7 +246,7 @@ ResponseEntity getPetById( ) ResponseEntity updatePet( - @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet pet ) throws Exception; @@ -278,9 +278,9 @@ ResponseEntity updatePet( ) ResponseEntity updatePetWithForm( - @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, - @Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, - @Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status + @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, + @Parameter(name = "name", description = "Updated name of the pet") @RequestParam(value = "name", required = false) String name, + @Parameter(name = "status", description = "Updated status of the pet") @RequestParam(value = "status", required = false) String status ) throws Exception; @@ -315,8 +315,8 @@ ResponseEntity updatePetWithForm( ) ResponseEntity uploadFile( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, - @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, + @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, + @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) throws Exception; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/StoreApi.java index 3fdff6d53e38..2ebfa07ca30b 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/StoreApi.java @@ -62,7 +62,7 @@ public interface StoreApi { ) ResponseEntity deleteOrder( - @Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("order_id") String orderId + @Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("order_id") @NotNull String orderId ) throws Exception; @@ -127,7 +127,7 @@ ResponseEntity> getInventory( ) ResponseEntity getOrderById( - @Min(1L) @Max(5L) @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("order_id") Long orderId + @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("order_id") @NotNull @Min(1L) @Max(5L) Long orderId ) throws Exception; @@ -160,7 +160,7 @@ ResponseEntity getOrderById( ) ResponseEntity placeOrder( - @Parameter(name = "Order", description = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order + @Parameter(name = "Order", description = "order placed for purchasing the pet", required = true) @RequestBody @NotNull @Valid Order order ) throws Exception; } diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/UserApi.java index 90110e4c57fa..0ad12e241109 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/UserApi.java @@ -61,7 +61,7 @@ public interface UserApi { ) ResponseEntity createUser( - @Parameter(name = "User", description = "Created user object", required = true) @Valid @RequestBody User user + @Parameter(name = "User", description = "Created user object", required = true) @RequestBody @NotNull @Valid User user ) throws Exception; @@ -88,7 +88,7 @@ ResponseEntity createUser( ) ResponseEntity createUsersWithArrayInput( - @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + @Parameter(name = "User", description = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> user ) throws Exception; @@ -115,7 +115,7 @@ ResponseEntity createUsersWithArrayInput( ) ResponseEntity createUsersWithListInput( - @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + @Parameter(name = "User", description = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> user ) throws Exception; @@ -143,7 +143,7 @@ ResponseEntity createUsersWithListInput( ) ResponseEntity deleteUser( - @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") @NotNull String username ) throws Exception; @@ -177,7 +177,7 @@ ResponseEntity deleteUser( ) ResponseEntity getUserByName( - @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") @NotNull String username ) throws Exception; @@ -210,8 +210,8 @@ ResponseEntity getUserByName( ) ResponseEntity loginUser( - @NotNull @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username, - @NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) String password + @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @RequestParam(value = "username") @NotNull String username, + @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @RequestParam(value = "password") @NotNull String password ) throws Exception; @@ -266,8 +266,8 @@ ResponseEntity logoutUser( ) ResponseEntity updateUser( - @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, - @Parameter(name = "User", description = "Updated user object", required = true) @Valid @RequestBody User user + @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") @NotNull String username, + @Parameter(name = "User", description = "Updated user object", required = true) @RequestBody @NotNull @Valid User user ) throws Exception; } diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index e14dd983f0f1..0fbe28ea4096 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -36,7 +36,6 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -124,4 +123,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 44db4e0c3810..a7327b15638f 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -37,7 +37,6 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 845d05d68bff..2275717952e3 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -36,7 +36,6 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -124,4 +123,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index cea8ea12066a..3b988af689b4 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -28,33 +28,25 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class AdditionalPropertiesClass { - @Valid private Map mapString = new HashMap<>(); - @Valid private Map mapNumber = new HashMap<>(); - @Valid private Map mapInteger = new HashMap<>(); - @Valid private Map mapBoolean = new HashMap<>(); - @Valid private Map> mapArrayInteger = new HashMap<>(); - @Valid private Map> mapArrayAnytype = new HashMap<>(); - @Valid private Map> mapMapString = new HashMap<>(); - @Valid private Map> mapMapAnytype = new HashMap<>(); private Object anytype1; - private JsonNullable anytype2 = JsonNullable.undefined(); + private JsonNullable anytype2 = JsonNullable.of(null); private Object anytype3; @@ -75,7 +67,6 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ - @Schema(name = "map_string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("map_string") public Map getMapString() { @@ -103,7 +94,6 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ - @Valid @Schema(name = "map_number", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("map_number") public Map getMapNumber() { @@ -131,7 +121,6 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ - @Schema(name = "map_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("map_integer") public Map getMapInteger() { @@ -159,7 +148,6 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ - @Schema(name = "map_boolean", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("map_boolean") public Map getMapBoolean() { @@ -187,7 +175,6 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { @@ -215,7 +202,6 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ - @Valid @Schema(name = "map_array_anytype", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("map_array_anytype") public Map> getMapArrayAnytype() { @@ -243,7 +229,6 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { @@ -271,7 +256,6 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { @@ -291,7 +275,6 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ - @Schema(name = "anytype_1", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("anytype_1") public Object getAnytype1() { @@ -302,8 +285,8 @@ public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; } - public AdditionalPropertiesClass anytype2(Object anytype2) { - this.anytype2 = JsonNullable.of(anytype2); + public AdditionalPropertiesClass anytype2(JsonNullable anytype2) { + this.anytype2 = anytype2; return this; } @@ -311,7 +294,6 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ - @Schema(name = "anytype_2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("anytype_2") public JsonNullable getAnytype2() { @@ -331,7 +313,6 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ - @Schema(name = "anytype_3", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("anytype_3") public Object getAnytype3() { @@ -410,4 +391,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 24c0a0bc4ce6..2f481c341c91 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -36,7 +36,6 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -124,4 +123,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index f881d9449131..2696f58c8203 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -37,7 +37,6 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index fc778107fdd6..ba3e02a567e7 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -37,7 +37,6 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index e7947a2a3e12..d2ddc6c57e1b 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -36,7 +36,6 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -124,4 +123,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Animal.java index c2dc521e5e33..9b889cae8fb3 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Animal.java @@ -35,7 +35,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class Animal { - private String className; + private @NotNull String className; private String color = "red"; @@ -59,10 +59,9 @@ public Animal className(String className) { * Get className * @return className */ - @NotNull @Schema(name = "className", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("className") - public String getClassName() { + public @NotNull String getClassName() { return className; } @@ -79,7 +78,6 @@ public Animal color(String color) { * Get color * @return color */ - @Schema(name = "color", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("color") public String getColor() { @@ -129,4 +127,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index bb399aa9082e..aae59ed763b2 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnly { - @Valid private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { @@ -45,7 +44,6 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ - @Valid @Schema(name = "ArrayArrayNumber", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("ArrayArrayNumber") public List> getArrayArrayNumber() { @@ -93,4 +91,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 4f171f476c4d..8cec84658578 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayOfNumberOnly { - @Valid private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnly arrayNumber(List arrayNumber) { @@ -45,7 +44,6 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ - @Valid @Schema(name = "ArrayNumber", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("ArrayNumber") public List getArrayNumber() { @@ -93,4 +91,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ArrayTest.java index a3f194d7775f..2bf0c2999487 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ArrayTest.java @@ -25,13 +25,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayTest { - @Valid private List arrayOfString = new ArrayList<>(); - @Valid private List> arrayArrayOfInteger = new ArrayList<>(); - @Valid private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTest arrayOfString(List arrayOfString) { @@ -51,7 +48,6 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ - @Schema(name = "array_of_string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("array_of_string") public List getArrayOfString() { @@ -79,7 +75,6 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ - @Valid @Schema(name = "array_array_of_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("array_array_of_integer") public List> getArrayArrayOfInteger() { @@ -90,12 +85,12 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } - public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) { + public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { if (this.arrayArrayOfModel == null) { this.arrayArrayOfModel = new ArrayList<>(); } @@ -107,14 +102,13 @@ public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayO * Get arrayArrayOfModel * @return arrayArrayOfModel */ - @Valid @Schema(name = "array_array_of_model", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("array_array_of_model") public List> getArrayArrayOfModel() { return arrayArrayOfModel; } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { + public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } @@ -159,4 +153,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/BigCat.java index 7a6ac9ff486b..1a6b0d9c10a3 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/BigCat.java @@ -66,7 +66,7 @@ public static KindEnum fromValue(String value) { } } - private KindEnum kind; + private String kind; public BigCat() { super(); @@ -88,10 +88,9 @@ public BigCat kind(KindEnum kind) { * Get kind * @return kind */ - @Schema(name = "kind", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("kind") - public KindEnum getKind() { + public String getKind() { return kind; } @@ -153,4 +152,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Capitalization.java index 1305dc32a58a..16393de364a6 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Capitalization.java @@ -42,7 +42,6 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ - @Schema(name = "smallCamel", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("smallCamel") public String getSmallCamel() { @@ -62,7 +61,6 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ - @Schema(name = "CapitalCamel", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("CapitalCamel") public String getCapitalCamel() { @@ -82,7 +80,6 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ - @Schema(name = "small_Snake", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("small_Snake") public String getSmallSnake() { @@ -102,7 +99,6 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ - @Schema(name = "Capital_Snake", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("Capital_Snake") public String getCapitalSnake() { @@ -122,7 +118,6 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ - @Schema(name = "SCA_ETH_Flow_Points", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("SCA_ETH_Flow_Points") public String getScAETHFlowPoints() { @@ -142,7 +137,6 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ - @Schema(name = "ATT_NAME", description = "Name of the pet ", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("ATT_NAME") public String getATTNAME() { @@ -200,4 +194,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Cat.java index c33f8dbcfdb6..1efea170a7fc 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Cat.java @@ -56,7 +56,6 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ - @Schema(name = "declawed", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("declawed") public Boolean getDeclawed() { @@ -116,4 +115,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Category.java index 1ee0ac465e49..cf3023ce3d17 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Category.java @@ -23,7 +23,7 @@ public class Category { private Long id; - private String name = "default-name"; + private @NotNull String name = "default-name"; public Category() { super(); @@ -45,7 +45,6 @@ public Category id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -65,10 +64,9 @@ public Category name(String name) { * Get name * @return name */ - @NotNull @Schema(name = "name", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -115,4 +113,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ChildWithNullable.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ChildWithNullable.java index d87259a91c84..acadde522370 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ChildWithNullable.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ChildWithNullable.java @@ -40,7 +40,6 @@ public ChildWithNullable otherProperty(String otherProperty) { * Get otherProperty * @return otherProperty */ - @Schema(name = "otherProperty", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("otherProperty") public String getOtherProperty() { @@ -57,7 +56,7 @@ public ChildWithNullable type(TypeEnum type) { return this; } - public ChildWithNullable nullableProperty(String nullableProperty) { + public ChildWithNullable nullableProperty(JsonNullable nullableProperty) { super.nullableProperty(nullableProperty); return this; } @@ -111,4 +110,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ClassModel.java index 2e1c3589bf30..ded911ffab13 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ClassModel.java @@ -33,7 +33,6 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @Schema(name = "_class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("_class") public String getPropertyClass() { @@ -81,4 +80,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Client.java index 2b0dabb274cf..2d0abb6d4339 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Client.java @@ -32,7 +32,6 @@ public Client client(String client) { * Get client * @return client */ - @Schema(name = "client", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("client") public String getClient() { @@ -80,4 +79,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ContainerDefaultValue.java index 37d809f95881..d767a05520ad 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ContainerDefaultValue.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -26,17 +26,13 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ContainerDefaultValue { - @Valid - private JsonNullable> nullableArray = JsonNullable.>undefined(); + private JsonNullable> nullableArray = JsonNullable.undefined(); - @Valid - private JsonNullable> nullableRequiredArray = JsonNullable.>undefined(); + private JsonNullable> nullableRequiredArray = JsonNullable.undefined(); - @Valid - private List requiredArray = new ArrayList<>(); + private @NotNull List requiredArray = new ArrayList<>(); - @Valid - private JsonNullable> nullableArrayWithDefault = JsonNullable.>undefined(); + private JsonNullable> nullableArrayWithDefault = JsonNullable.of(new ArrayList<>(Arrays.asList("foo", "bar"))); public ContainerDefaultValue() { super(); @@ -45,13 +41,13 @@ public ContainerDefaultValue() { /** * Constructor with only required parameters */ - public ContainerDefaultValue(List nullableRequiredArray, List requiredArray) { - this.nullableRequiredArray = JsonNullable.of(nullableRequiredArray); + public ContainerDefaultValue(JsonNullable> nullableRequiredArray, List requiredArray) { + this.nullableRequiredArray = nullableRequiredArray; this.requiredArray = requiredArray; } - public ContainerDefaultValue nullableArray(List nullableArray) { - this.nullableArray = JsonNullable.of(nullableArray); + public ContainerDefaultValue nullableArray(JsonNullable> nullableArray) { + this.nullableArray = nullableArray; return this; } @@ -67,7 +63,6 @@ public ContainerDefaultValue addNullableArrayItem(String nullableArrayItem) { * Get nullableArray * @return nullableArray */ - @Schema(name = "nullable_array", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("nullable_array") public JsonNullable> getNullableArray() { @@ -78,8 +73,8 @@ public void setNullableArray(JsonNullable> nullableArray) { this.nullableArray = nullableArray; } - public ContainerDefaultValue nullableRequiredArray(List nullableRequiredArray) { - this.nullableRequiredArray = JsonNullable.of(nullableRequiredArray); + public ContainerDefaultValue nullableRequiredArray(JsonNullable> nullableRequiredArray) { + this.nullableRequiredArray = nullableRequiredArray; return this; } @@ -95,7 +90,6 @@ public ContainerDefaultValue addNullableRequiredArrayItem(String nullableRequire * Get nullableRequiredArray * @return nullableRequiredArray */ - @NotNull @Schema(name = "nullable_required_array", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("nullable_required_array") public JsonNullable> getNullableRequiredArray() { @@ -123,10 +117,9 @@ public ContainerDefaultValue addRequiredArrayItem(String requiredArrayItem) { * Get requiredArray * @return requiredArray */ - @NotNull @Schema(name = "required_array", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("required_array") - public List getRequiredArray() { + public @NotNull List getRequiredArray() { return requiredArray; } @@ -134,8 +127,8 @@ public void setRequiredArray(List requiredArray) { this.requiredArray = requiredArray; } - public ContainerDefaultValue nullableArrayWithDefault(List nullableArrayWithDefault) { - this.nullableArrayWithDefault = JsonNullable.of(nullableArrayWithDefault); + public ContainerDefaultValue nullableArrayWithDefault(JsonNullable> nullableArrayWithDefault) { + this.nullableArrayWithDefault = nullableArrayWithDefault; return this; } @@ -151,7 +144,6 @@ public ContainerDefaultValue addNullableArrayWithDefaultItem(String nullableArra * Get nullableArrayWithDefault * @return nullableArrayWithDefault */ - @Schema(name = "nullable_array_with_default", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("nullable_array_with_default") public JsonNullable> getNullableArrayWithDefault() { @@ -216,4 +208,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Dog.java index cd79ddcbdd58..a4de5466df17 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Dog.java @@ -48,7 +48,6 @@ public Dog breed(String breed) { * Get breed * @return breed */ - @Schema(name = "breed", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("breed") public String getBreed() { @@ -108,4 +107,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/EnumArrays.java index b4a9a35507f9..0c6797f19e07 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/EnumArrays.java @@ -60,7 +60,7 @@ public static JustSymbolEnum fromValue(String value) { } } - private JustSymbolEnum justSymbol; + private String justSymbol; /** * Gets or Sets arrayEnum @@ -97,8 +97,7 @@ public static ArrayEnumEnum fromValue(String value) { } } - @Valid - private List arrayEnum = new ArrayList<>(); + private List arrayEnum = new ArrayList<>(); public EnumArrays justSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; @@ -109,10 +108,9 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ - @Schema(name = "just_symbol", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("just_symbol") - public JustSymbolEnum getJustSymbol() { + public String getJustSymbol() { return justSymbol; } @@ -137,10 +135,9 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ - @Schema(name = "array_enum", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("array_enum") - public List getArrayEnum() { + public List getArrayEnum() { return arrayEnum; } @@ -187,4 +184,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/EnumTest.java index 7159ceb98955..5ca2a59fe4b8 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/EnumTest.java @@ -62,7 +62,7 @@ public static EnumStringEnum fromValue(String value) { } } - private EnumStringEnum enumString; + private String enumString; /** * Gets or Sets enumStringRequired @@ -101,7 +101,7 @@ public static EnumStringRequiredEnum fromValue(String value) { } } - private EnumStringRequiredEnum enumStringRequired; + private @NotNull String enumStringRequired; /** * Gets or Sets enumInteger @@ -138,7 +138,7 @@ public static EnumIntegerEnum fromValue(Integer value) { } } - private EnumIntegerEnum enumInteger; + private Integer enumInteger; /** * Gets or Sets enumNumber @@ -175,7 +175,7 @@ public static EnumNumberEnum fromValue(Double value) { } } - private EnumNumberEnum enumNumber; + private Double enumNumber; private OuterEnum outerEnum; @@ -199,10 +199,9 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ - @Schema(name = "enum_string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("enum_string") - public EnumStringEnum getEnumString() { + public String getEnumString() { return enumString; } @@ -219,10 +218,9 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ - @NotNull @Schema(name = "enum_string_required", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("enum_string_required") - public EnumStringRequiredEnum getEnumStringRequired() { + public @NotNull String getEnumStringRequired() { return enumStringRequired; } @@ -239,10 +237,9 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ - @Schema(name = "enum_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("enum_integer") - public EnumIntegerEnum getEnumInteger() { + public Integer getEnumInteger() { return enumInteger; } @@ -259,10 +256,9 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ - @Schema(name = "enum_number", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("enum_number") - public EnumNumberEnum getEnumNumber() { + public Double getEnumNumber() { return enumNumber; } @@ -279,7 +275,6 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ - @Valid @Schema(name = "outerEnum", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("outerEnum") public OuterEnum getOuterEnum() { @@ -335,4 +330,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/File.java index e3238ec243e4..d48dd7ebefa4 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/File.java @@ -33,7 +33,6 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ - @Schema(name = "sourceURI", description = "Test capitalization", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("sourceURI") public String getSourceURI() { @@ -81,4 +80,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 1ec66d518194..df8406531213 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -25,9 +25,8 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class FileSchemaTestClass { - private File file; + private @Valid File file; - @Valid private List<@Valid File> files = new ArrayList<>(); public FileSchemaTestClass file(File file) { @@ -39,10 +38,9 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ - @Valid @Schema(name = "file", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("file") - public File getFile() { + public @Valid File getFile() { return file; } @@ -50,7 +48,7 @@ public void setFile(File file) { this.file = file; } - public FileSchemaTestClass files(List<@Valid File> files) { + public FileSchemaTestClass files(List files) { this.files = files; return this; } @@ -67,14 +65,13 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ - @Valid @Schema(name = "files", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("files") public List<@Valid File> getFiles() { return files; } - public void setFiles(List<@Valid File> files) { + public void setFiles(List files) { this.files = files; } @@ -117,4 +114,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/FormatTest.java index 93ce3e21a0c4..7eb3ca99e151 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/FormatTest.java @@ -29,33 +29,33 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class FormatTest { - private Integer integer; + private @Min(10) @Max(100) Integer integer; - private Integer int32; + private @Min(20) @Max(200) Integer int32; private Long int64; - private BigDecimal number; + private @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal number; - private Float _float; + private @DecimalMin("54.3") @DecimalMax("987.6") Float _float; - private Double _double; + private @DecimalMin("67.8") @DecimalMax("123.4") Double _double; - private String string; + private @Pattern(regexp = "/[a-z]/i") String string; - private byte[] _byte; + private @NotNull byte[] _byte; private org.springframework.core.io.Resource binary; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) - private LocalDate date; + private @NotNull LocalDate date; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; private UUID uuid; - private String password; + private @NotNull @Size(min = 10, max = 64) String password; private BigDecimal bigDecimal; @@ -84,10 +84,9 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ - @Min(10) @Max(100) @Schema(name = "integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("integer") - public Integer getInteger() { + public @Min(10) @Max(100) Integer getInteger() { return integer; } @@ -106,10 +105,9 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ - @Min(20) @Max(200) @Schema(name = "int32", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("int32") - public Integer getInt32() { + public @Min(20) @Max(200) Integer getInt32() { return int32; } @@ -126,7 +124,6 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ - @Schema(name = "int64", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("int64") public Long getInt64() { @@ -148,10 +145,9 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ - @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @Schema(name = "number", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("number") - public BigDecimal getNumber() { + public @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal getNumber() { return number; } @@ -170,10 +166,9 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ - @DecimalMin("54.3") @DecimalMax("987.6") @Schema(name = "float", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("float") - public Float getFloat() { + public @DecimalMin("54.3") @DecimalMax("987.6") Float getFloat() { return _float; } @@ -192,10 +187,9 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ - @DecimalMin("67.8") @DecimalMax("123.4") @Schema(name = "double", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("double") - public Double getDouble() { + public @DecimalMin("67.8") @DecimalMax("123.4") Double getDouble() { return _double; } @@ -212,10 +206,9 @@ public FormatTest string(String string) { * Get string * @return string */ - @Pattern(regexp = "/[a-z]/i") @Schema(name = "string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("string") - public String getString() { + public @Pattern(regexp = "/[a-z]/i") String getString() { return string; } @@ -232,10 +225,9 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ - @NotNull @Schema(name = "byte", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("byte") - public byte[] getByte() { + public @NotNull byte[] getByte() { return _byte; } @@ -252,7 +244,6 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ - @Valid @Schema(name = "binary", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("binary") public org.springframework.core.io.Resource getBinary() { @@ -272,10 +263,9 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ - @NotNull @Valid @Schema(name = "date", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("date") - public LocalDate getDate() { + public @NotNull LocalDate getDate() { return date; } @@ -292,7 +282,6 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ - @Valid @Schema(name = "dateTime", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dateTime") public OffsetDateTime getDateTime() { @@ -312,7 +301,6 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ - @Valid @Schema(name = "uuid", example = "72f98069-206d-4f12-9f12-3d1e525a8e84", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("uuid") public UUID getUuid() { @@ -332,10 +320,9 @@ public FormatTest password(String password) { * Get password * @return password */ - @NotNull @Size(min = 10, max = 64) @Schema(name = "password", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("password") - public String getPassword() { + public @NotNull @Size(min = 10, max = 64) String getPassword() { return password; } @@ -352,7 +339,6 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ - @Valid @Schema(name = "BigDecimal", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("BigDecimal") public BigDecimal getBigDecimal() { @@ -426,4 +412,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 7670645ce831..34599cb0ba57 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -36,7 +36,6 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ - @Schema(name = "bar", accessMode = Schema.AccessMode.READ_ONLY, requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("bar") public String getBar() { @@ -56,7 +55,6 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ - @Schema(name = "foo", accessMode = Schema.AccessMode.READ_ONLY, requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("foo") public String getFoo() { @@ -106,4 +104,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/MapTest.java index a449469c6aff..17d9a1719a7a 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/MapTest.java @@ -24,7 +24,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class MapTest { - @Valid private Map> mapMapOfString = new HashMap<>(); /** @@ -62,13 +61,10 @@ public static InnerEnum fromValue(String value) { } } - @Valid - private Map mapOfEnumString = new HashMap<>(); + private Map mapOfEnumString = new HashMap<>(); - @Valid private Map directMap = new HashMap<>(); - @Valid private Map indirectMap = new HashMap<>(); public MapTest mapMapOfString(Map> mapMapOfString) { @@ -88,7 +84,6 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ - @Valid @Schema(name = "map_map_of_string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("map_map_of_string") public Map> getMapMapOfString() { @@ -116,10 +111,9 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ - @Schema(name = "map_of_enum_string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("map_of_enum_string") - public Map getMapOfEnumString() { + public Map getMapOfEnumString() { return mapOfEnumString; } @@ -144,7 +138,6 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ - @Schema(name = "direct_map", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("direct_map") public Map getDirectMap() { @@ -172,7 +165,6 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ - @Schema(name = "indirect_map", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("indirect_map") public Map getIndirectMap() { @@ -226,4 +218,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index c02231565c15..9529c5b6ed55 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -32,8 +32,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; - @Valid - private Map map = new HashMap<>(); + private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { this.uuid = uuid; @@ -44,7 +43,6 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ - @Valid @Schema(name = "uuid", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("uuid") public UUID getUuid() { @@ -64,7 +62,6 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ - @Valid @Schema(name = "dateTime", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dateTime") public OffsetDateTime getDateTime() { @@ -92,10 +89,9 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ - @Valid @Schema(name = "map", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("map") - public Map getMap() { + public Map getMap() { return map; } @@ -144,4 +140,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Model200Response.java index 47ea4a6e7f93..b70662fd9c2d 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Model200Response.java @@ -37,7 +37,6 @@ public Model200Response name(Integer name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public Integer getName() { @@ -57,7 +56,6 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @Schema(name = "class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("class") public String getPropertyClass() { @@ -107,4 +105,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ModelApiResponse.java index b3ff5612d992..fd7668cb99ed 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -38,7 +38,6 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @Schema(name = "code", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("code") public Integer getCode() { @@ -58,7 +57,6 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @Schema(name = "type", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("type") public String getType() { @@ -78,7 +76,6 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @Schema(name = "message", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("message") public String getMessage() { @@ -130,4 +127,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ModelList.java index 70456df44cc8..5084211cf5b6 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ModelList.java @@ -34,7 +34,6 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ - @Schema(name = "123-list", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("123-list") public String get123list() { @@ -82,4 +81,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ModelReturn.java index 9e66eec3d6df..a1d5d5179f43 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ModelReturn.java @@ -35,7 +35,6 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ - @Schema(name = "return", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("return") public Integer getReturn() { @@ -83,4 +82,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Name.java index c700b682aea7..03fe3ae7ba3a 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Name.java @@ -22,7 +22,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class Name { - private Integer name; + private @NotNull Integer name; private Integer snakeCase; @@ -50,10 +50,9 @@ public Name name(Integer name) { * Get name * @return name */ - @NotNull @Schema(name = "name", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("name") - public Integer getName() { + public @NotNull Integer getName() { return name; } @@ -70,7 +69,6 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ - @Schema(name = "snake_case", accessMode = Schema.AccessMode.READ_ONLY, requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("snake_case") public Integer getSnakeCase() { @@ -90,7 +88,6 @@ public Name property(String property) { * Get property * @return property */ - @Schema(name = "property", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("property") public String getProperty() { @@ -110,7 +107,6 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ - @Schema(name = "123Number", accessMode = Schema.AccessMode.READ_ONLY, requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("123Number") public Integer get123number() { @@ -164,4 +160,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/NullableMapProperty.java index 1d2cc4aac787..f5df0da7713a 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/NullableMapProperty.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -26,11 +26,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class NullableMapProperty { - @Valid - private JsonNullable> languageValues = JsonNullable.>undefined(); + private JsonNullable> languageValues = JsonNullable.undefined(); - public NullableMapProperty languageValues(Map languageValues) { - this.languageValues = JsonNullable.of(languageValues); + public NullableMapProperty languageValues(JsonNullable> languageValues) { + this.languageValues = languageValues; return this; } @@ -46,7 +45,6 @@ public NullableMapProperty putLanguageValuesItem(String key, String languageValu * Get languageValues * @return languageValues */ - @Schema(name = "languageValues", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("languageValues") public JsonNullable> getLanguageValues() { @@ -105,4 +103,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/NumberOnly.java index e3eded935ac3..42dd6710923f 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/NumberOnly.java @@ -33,7 +33,6 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ - @Valid @Schema(name = "JustNumber", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("JustNumber") public BigDecimal getJustNumber() { @@ -81,4 +80,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Order.java index 52470395ae42..9ab26c93ad9e 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Order.java @@ -70,7 +70,7 @@ public static StatusEnum fromValue(String value) { } } - private StatusEnum status; + private String status; private Boolean complete = false; @@ -83,7 +83,6 @@ public Order id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -103,7 +102,6 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @Schema(name = "petId", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("petId") public Long getPetId() { @@ -123,7 +121,6 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @Schema(name = "quantity", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("quantity") public Integer getQuantity() { @@ -143,7 +140,6 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Valid @Schema(name = "shipDate", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("shipDate") public OffsetDateTime getShipDate() { @@ -163,10 +159,9 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @Schema(name = "status", description = "Order Status", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("status") - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -183,7 +178,6 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @Schema(name = "complete", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("complete") public Boolean getComplete() { @@ -241,4 +235,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/OuterComposite.java index 3946d3ec3499..c351c962a713 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/OuterComposite.java @@ -37,7 +37,6 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ - @Valid @Schema(name = "my_number", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("my_number") public BigDecimal getMyNumber() { @@ -57,7 +56,6 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ - @Schema(name = "my_string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("my_string") public String getMyString() { @@ -77,7 +75,6 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ - @Schema(name = "my_boolean", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("my_boolean") public Boolean getMyBoolean() { @@ -129,4 +126,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ParentWithNullable.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ParentWithNullable.java index 0bca1c134462..f1aa3e27ec23 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ParentWithNullable.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ParentWithNullable.java @@ -70,9 +70,9 @@ public static TypeEnum fromValue(String value) { } } - private TypeEnum type; + private String type; - private JsonNullable nullableProperty = JsonNullable.undefined(); + private JsonNullable nullableProperty = JsonNullable.undefined(); public ParentWithNullable type(TypeEnum type) { this.type = type; @@ -83,10 +83,9 @@ public ParentWithNullable type(TypeEnum type) { * Get type * @return type */ - @Schema(name = "type", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("type") - public TypeEnum getType() { + public String getType() { return type; } @@ -94,8 +93,8 @@ public void setType(TypeEnum type) { this.type = type; } - public ParentWithNullable nullableProperty(String nullableProperty) { - this.nullableProperty = JsonNullable.of(nullableProperty); + public ParentWithNullable nullableProperty(JsonNullable nullableProperty) { + this.nullableProperty = nullableProperty; return this; } @@ -103,7 +102,6 @@ public ParentWithNullable nullableProperty(String nullableProperty) { * Get nullableProperty * @return nullableProperty */ - @Schema(name = "nullableProperty", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("nullableProperty") public JsonNullable getNullableProperty() { @@ -164,4 +162,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Pet.java index dc83b6dd7ead..02044cad8291 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Pet.java @@ -32,14 +32,12 @@ public class Pet { private Long id; - private Category category; + private @Valid Category category; - private String name; + private @NotNull String name; - @Valid - private Set photoUrls = new LinkedHashSet<>(); + private @NotNull Set photoUrls = new LinkedHashSet<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** @@ -80,7 +78,7 @@ public static StatusEnum fromValue(String value) { } @Deprecated - private StatusEnum status; + private String status; public Pet() { super(); @@ -103,7 +101,6 @@ public Pet id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -123,10 +120,9 @@ public Pet category(Category category) { * Get category * @return category */ - @Valid @Schema(name = "category", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("category") - public Category getCategory() { + public @Valid Category getCategory() { return category; } @@ -143,10 +139,9 @@ public Pet name(String name) { * Get name * @return name */ - @NotNull @Schema(name = "name", example = "doggie", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -171,10 +166,9 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @NotNull @Schema(name = "photoUrls", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("photoUrls") - public Set getPhotoUrls() { + public @NotNull Set getPhotoUrls() { return photoUrls; } @@ -183,7 +177,7 @@ public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List<@Valid Tag> tags) { + public Pet tags(List tags) { this.tags = tags; return this; } @@ -200,14 +194,13 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Valid @Schema(name = "tags", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("tags") public List<@Valid Tag> getTags() { return tags; } - public void setTags(List<@Valid Tag> tags) { + public void setTags(List tags) { this.tags = tags; } @@ -221,11 +214,10 @@ public Pet status(StatusEnum status) { * @return status * @deprecated */ - @Schema(name = "status", description = "pet status in the store", deprecated = true, requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("status") @Deprecated - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -284,4 +276,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ReadOnlyFirst.java index e2040366bf62..d9110ce888fa 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -34,7 +34,6 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ - @Schema(name = "bar", accessMode = Schema.AccessMode.READ_ONLY, requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("bar") public String getBar() { @@ -54,7 +53,6 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ - @Schema(name = "baz", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("baz") public String getBaz() { @@ -104,4 +102,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java index e739bd1d5ab5..f1ea0fb752ee 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java @@ -38,7 +38,6 @@ public ResponseObjectWithDifferentFieldNames normalPropertyName(String normalPro * Get normalPropertyName * @return normalPropertyName */ - @Schema(name = "normalPropertyName", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("normalPropertyName") public String getNormalPropertyName() { @@ -58,7 +57,6 @@ public ResponseObjectWithDifferentFieldNames UPPER_CASE_PROPERTY_SNAKE(String UP * Get UPPER_CASE_PROPERTY_SNAKE * @return UPPER_CASE_PROPERTY_SNAKE */ - @Schema(name = "UPPER_CASE_PROPERTY_SNAKE", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("UPPER_CASE_PROPERTY_SNAKE") public String getUPPERCASEPROPERTYSNAKE() { @@ -78,7 +76,6 @@ public ResponseObjectWithDifferentFieldNames lowerCasePropertyDashes(String lowe * Get lowerCasePropertyDashes * @return lowerCasePropertyDashes */ - @Schema(name = "lower-case-property-dashes", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("lower-case-property-dashes") public String getLowerCasePropertyDashes() { @@ -98,7 +95,6 @@ public ResponseObjectWithDifferentFieldNames propertyNameWithSpaces(String prope * Get propertyNameWithSpaces * @return propertyNameWithSpaces */ - @Schema(name = "property name with spaces", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("property name with spaces") public String getPropertyNameWithSpaces() { @@ -152,4 +148,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/SpecialModelName.java index 8173a14a8d8e..1f8ea115b01f 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/SpecialModelName.java @@ -34,7 +34,6 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ - @Schema(name = "$special[property.name]", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("$special[property.name]") public Long get$SpecialPropertyName() { @@ -82,4 +81,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Tag.java index 9e7ac9ebf805..583cbc48e7a6 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Tag.java @@ -34,7 +34,6 @@ public Tag id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -54,7 +53,6 @@ public Tag name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -104,4 +102,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/TypeHolderDefault.java index ef54f5dc15e3..710408e8f15c 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -25,16 +25,15 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class TypeHolderDefault { - private String stringItem = "what"; + private @NotNull String stringItem = "what"; - private BigDecimal numberItem = new BigDecimal("1.234"); + private @NotNull BigDecimal numberItem = new BigDecimal("1.234"); - private Integer integerItem = -2; + private @NotNull Integer integerItem = -2; - private Boolean boolItem = true; + private @NotNull Boolean boolItem = true; - @Valid - private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); + private @NotNull List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); public TypeHolderDefault() { super(); @@ -60,10 +59,9 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @NotNull @Schema(name = "string_item", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("string_item") - public String getStringItem() { + public @NotNull String getStringItem() { return stringItem; } @@ -80,10 +78,9 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @NotNull @Valid @Schema(name = "number_item", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("number_item") - public BigDecimal getNumberItem() { + public @NotNull BigDecimal getNumberItem() { return numberItem; } @@ -100,10 +97,9 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @NotNull @Schema(name = "integer_item", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("integer_item") - public Integer getIntegerItem() { + public @NotNull Integer getIntegerItem() { return integerItem; } @@ -120,10 +116,9 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @NotNull @Schema(name = "bool_item", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("bool_item") - public Boolean getBoolItem() { + public @NotNull Boolean getBoolItem() { return boolItem; } @@ -148,10 +143,9 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @NotNull @Schema(name = "array_item", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("array_item") - public List getArrayItem() { + public @NotNull List getArrayItem() { return arrayItem; } @@ -204,4 +198,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/TypeHolderExample.java index b12daf9f5f3a..3cde60834c1a 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -25,18 +25,17 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class TypeHolderExample { - private String stringItem; + private @NotNull String stringItem; - private BigDecimal numberItem; + private @NotNull BigDecimal numberItem; - private Float floatItem; + private @NotNull Float floatItem; - private Integer integerItem; + private @NotNull Integer integerItem; - private Boolean boolItem; + private @NotNull Boolean boolItem; - @Valid - private List arrayItem = new ArrayList<>(); + private @NotNull List arrayItem = new ArrayList<>(); public TypeHolderExample() { super(); @@ -63,10 +62,9 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @NotNull @Schema(name = "string_item", example = "what", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("string_item") - public String getStringItem() { + public @NotNull String getStringItem() { return stringItem; } @@ -83,10 +81,9 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @NotNull @Valid @Schema(name = "number_item", example = "1.234", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("number_item") - public BigDecimal getNumberItem() { + public @NotNull BigDecimal getNumberItem() { return numberItem; } @@ -103,10 +100,9 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ - @NotNull @Schema(name = "float_item", example = "1.234", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("float_item") - public Float getFloatItem() { + public @NotNull Float getFloatItem() { return floatItem; } @@ -123,10 +119,9 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @NotNull @Schema(name = "integer_item", example = "-2", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("integer_item") - public Integer getIntegerItem() { + public @NotNull Integer getIntegerItem() { return integerItem; } @@ -143,10 +138,9 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @NotNull @Schema(name = "bool_item", example = "true", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("bool_item") - public Boolean getBoolItem() { + public @NotNull Boolean getBoolItem() { return boolItem; } @@ -171,10 +165,9 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @NotNull @Schema(name = "array_item", example = "[0,1,2,3]", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("array_item") - public List getArrayItem() { + public @NotNull List getArrayItem() { return arrayItem; } @@ -229,4 +222,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/User.java index ec465261f6a6..035f3adc34ea 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/User.java @@ -46,7 +46,6 @@ public User id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -66,7 +65,6 @@ public User username(String username) { * Get username * @return username */ - @Schema(name = "username", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("username") public String getUsername() { @@ -86,7 +84,6 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @Schema(name = "firstName", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("firstName") public String getFirstName() { @@ -106,7 +103,6 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @Schema(name = "lastName", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("lastName") public String getLastName() { @@ -126,7 +122,6 @@ public User email(String email) { * Get email * @return email */ - @Schema(name = "email", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("email") public String getEmail() { @@ -146,7 +141,6 @@ public User password(String password) { * Get password * @return password */ - @Schema(name = "password", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("password") public String getPassword() { @@ -166,7 +160,6 @@ public User phone(String phone) { * Get phone * @return phone */ - @Schema(name = "phone", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("phone") public String getPhone() { @@ -186,7 +179,6 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @Schema(name = "userStatus", description = "User Status", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("userStatus") public Integer getUserStatus() { @@ -248,4 +240,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/XmlItem.java index ec738c3d64d6..ee4dfbc877a1 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/XmlItem.java @@ -33,7 +33,6 @@ public class XmlItem { private Boolean attributeBoolean; - @Valid private List wrappedArray = new ArrayList<>(); private String nameString; @@ -44,10 +43,8 @@ public class XmlItem { private Boolean nameBoolean; - @Valid private List nameArray = new ArrayList<>(); - @Valid private List nameWrappedArray = new ArrayList<>(); private String prefixString; @@ -58,10 +55,8 @@ public class XmlItem { private Boolean prefixBoolean; - @Valid private List prefixArray = new ArrayList<>(); - @Valid private List prefixWrappedArray = new ArrayList<>(); private String namespaceString; @@ -72,10 +67,8 @@ public class XmlItem { private Boolean namespaceBoolean; - @Valid private List namespaceArray = new ArrayList<>(); - @Valid private List namespaceWrappedArray = new ArrayList<>(); private String prefixNsString; @@ -86,10 +79,8 @@ public class XmlItem { private Boolean prefixNsBoolean; - @Valid private List prefixNsArray = new ArrayList<>(); - @Valid private List prefixNsWrappedArray = new ArrayList<>(); public XmlItem attributeString(String attributeString) { @@ -101,7 +92,6 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ - @Schema(name = "attribute_string", example = "string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("attribute_string") public String getAttributeString() { @@ -121,7 +111,6 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ - @Valid @Schema(name = "attribute_number", example = "1.234", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("attribute_number") public BigDecimal getAttributeNumber() { @@ -141,7 +130,6 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ - @Schema(name = "attribute_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("attribute_integer") public Integer getAttributeInteger() { @@ -161,7 +149,6 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ - @Schema(name = "attribute_boolean", example = "true", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("attribute_boolean") public Boolean getAttributeBoolean() { @@ -189,7 +176,6 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ - @Schema(name = "wrapped_array", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("wrapped_array") public List getWrappedArray() { @@ -209,7 +195,6 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ - @Schema(name = "name_string", example = "string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name_string") public String getNameString() { @@ -229,7 +214,6 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ - @Valid @Schema(name = "name_number", example = "1.234", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name_number") public BigDecimal getNameNumber() { @@ -249,7 +233,6 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ - @Schema(name = "name_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name_integer") public Integer getNameInteger() { @@ -269,7 +252,6 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ - @Schema(name = "name_boolean", example = "true", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name_boolean") public Boolean getNameBoolean() { @@ -297,7 +279,6 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ - @Schema(name = "name_array", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name_array") public List getNameArray() { @@ -325,7 +306,6 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ - @Schema(name = "name_wrapped_array", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name_wrapped_array") public List getNameWrappedArray() { @@ -345,7 +325,6 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ - @Schema(name = "prefix_string", example = "string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_string") public String getPrefixString() { @@ -365,7 +344,6 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ - @Valid @Schema(name = "prefix_number", example = "1.234", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_number") public BigDecimal getPrefixNumber() { @@ -385,7 +363,6 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ - @Schema(name = "prefix_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_integer") public Integer getPrefixInteger() { @@ -405,7 +382,6 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ - @Schema(name = "prefix_boolean", example = "true", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_boolean") public Boolean getPrefixBoolean() { @@ -433,7 +409,6 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ - @Schema(name = "prefix_array", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_array") public List getPrefixArray() { @@ -461,7 +436,6 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ - @Schema(name = "prefix_wrapped_array", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_wrapped_array") public List getPrefixWrappedArray() { @@ -481,7 +455,6 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ - @Schema(name = "namespace_string", example = "string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespace_string") public String getNamespaceString() { @@ -501,7 +474,6 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ - @Valid @Schema(name = "namespace_number", example = "1.234", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespace_number") public BigDecimal getNamespaceNumber() { @@ -521,7 +493,6 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ - @Schema(name = "namespace_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { @@ -541,7 +512,6 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ - @Schema(name = "namespace_boolean", example = "true", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespace_boolean") public Boolean getNamespaceBoolean() { @@ -569,7 +539,6 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ - @Schema(name = "namespace_array", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespace_array") public List getNamespaceArray() { @@ -597,7 +566,6 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ - @Schema(name = "namespace_wrapped_array", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespace_wrapped_array") public List getNamespaceWrappedArray() { @@ -617,7 +585,6 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ - @Schema(name = "prefix_ns_string", example = "string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_ns_string") public String getPrefixNsString() { @@ -637,7 +604,6 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ - @Valid @Schema(name = "prefix_ns_number", example = "1.234", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_ns_number") public BigDecimal getPrefixNsNumber() { @@ -657,7 +623,6 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ - @Schema(name = "prefix_ns_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { @@ -677,7 +642,6 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ - @Schema(name = "prefix_ns_boolean", example = "true", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_ns_boolean") public Boolean getPrefixNsBoolean() { @@ -705,7 +669,6 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ - @Schema(name = "prefix_ns_array", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_ns_array") public List getPrefixNsArray() { @@ -733,7 +696,6 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ - @Schema(name = "prefix_ns_wrapped_array", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_ns_wrapped_array") public List getPrefixNsWrappedArray() { @@ -837,4 +799,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/spring-boot-nullable-set/src/main/java/org/openapitools/api/NullableApi.java b/samples/server/petstore/spring-boot-nullable-set/src/main/java/org/openapitools/api/NullableApi.java index 10153ef3971b..fccbe30ae640 100644 --- a/samples/server/petstore/spring-boot-nullable-set/src/main/java/org/openapitools/api/NullableApi.java +++ b/samples/server/petstore/spring-boot-nullable-set/src/main/java/org/openapitools/api/NullableApi.java @@ -64,7 +64,7 @@ default Optional getRequest() { ) default ResponseEntity nullableTest( - @Parameter(name = "ObjectWithUniqueItems", description = "") @Valid @RequestBody(required = false) ObjectWithUniqueItems objectWithUniqueItems + @Parameter(name = "ObjectWithUniqueItems", description = "") @RequestBody(required = false) @Valid ObjectWithUniqueItems objectWithUniqueItems ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/spring-boot-nullable-set/src/main/java/org/openapitools/model/ObjectWithUniqueItems.java b/samples/server/petstore/spring-boot-nullable-set/src/main/java/org/openapitools/model/ObjectWithUniqueItems.java index 111b85fe698e..04571662c5f1 100644 --- a/samples/server/petstore/spring-boot-nullable-set/src/main/java/org/openapitools/model/ObjectWithUniqueItems.java +++ b/samples/server/petstore/spring-boot-nullable-set/src/main/java/org/openapitools/model/ObjectWithUniqueItems.java @@ -31,16 +31,12 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ObjectWithUniqueItems { - @Valid - private JsonNullable> nullSet = JsonNullable.>undefined(); + private JsonNullable> nullSet = JsonNullable.undefined(); - @Valid private Set notNullSet = new LinkedHashSet<>(); - @Valid - private JsonNullable> nullList = JsonNullable.>undefined(); + private JsonNullable> nullList = JsonNullable.undefined(); - @Valid private List notNullList = new ArrayList<>(); @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) @@ -49,8 +45,8 @@ public class ObjectWithUniqueItems { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime nullDateField; - public ObjectWithUniqueItems nullSet(Set nullSet) { - this.nullSet = JsonNullable.of(nullSet); + public ObjectWithUniqueItems nullSet(JsonNullable> nullSet) { + this.nullSet = nullSet; return this; } @@ -66,7 +62,6 @@ public ObjectWithUniqueItems addNullSetItem(String nullSetItem) { * Get nullSet * @return nullSet */ - @Schema(name = "nullSet", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("nullSet") public JsonNullable> getNullSet() { @@ -94,7 +89,6 @@ public ObjectWithUniqueItems addNotNullSetItem(String notNullSetItem) { * Get notNullSet * @return notNullSet */ - @Schema(name = "notNullSet", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("notNullSet") public Set getNotNullSet() { @@ -106,8 +100,8 @@ public void setNotNullSet(Set notNullSet) { this.notNullSet = notNullSet; } - public ObjectWithUniqueItems nullList(List nullList) { - this.nullList = JsonNullable.of(nullList); + public ObjectWithUniqueItems nullList(JsonNullable> nullList) { + this.nullList = nullList; return this; } @@ -123,7 +117,6 @@ public ObjectWithUniqueItems addNullListItem(String nullListItem) { * Get nullList * @return nullList */ - @Schema(name = "nullList", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("nullList") public JsonNullable> getNullList() { @@ -151,7 +144,6 @@ public ObjectWithUniqueItems addNotNullListItem(String notNullListItem) { * Get notNullList * @return notNullList */ - @Schema(name = "notNullList", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("notNullList") public List getNotNullList() { @@ -171,7 +163,6 @@ public ObjectWithUniqueItems notNullDateField(OffsetDateTime notNullDateField) { * Get notNullDateField * @return notNullDateField */ - @Valid @Schema(name = "notNullDateField", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("notNullDateField") public OffsetDateTime getNotNullDateField() { @@ -191,7 +182,6 @@ public ObjectWithUniqueItems nullDateField(OffsetDateTime nullDateField) { * Get nullDateField * @return nullDateField */ - @Valid @Schema(name = "nullDateField", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("nullDateField") public OffsetDateTime getNullDateField() { @@ -260,4 +250,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java index 95449b1c5f94..ff3d248c48be 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -56,7 +56,7 @@ default Optional getRequest() { ) default ResponseEntity call123testSpecialTags( - @ApiParam(value = "client model", required = true) @Valid @RequestBody Client client + @ApiParam(value = "client model", required = true) @RequestBody @NotNull @Valid Client client ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java index 276b4303b2f3..292a6ad8b0e6 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java @@ -66,7 +66,7 @@ default Optional getRequest() { ) default ResponseEntity createXmlItem( - @ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem + @ApiParam(value = "XmlItem Body", required = true) @RequestBody @NotNull @Valid XmlItem xmlItem ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -98,7 +98,7 @@ default ResponseEntity createXmlItem( ) default ResponseEntity fakeOuterBooleanSerialize( - @ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body + @ApiParam(value = "Input boolean as post body") @RequestBody(required = false) Boolean body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -130,7 +130,7 @@ default ResponseEntity fakeOuterBooleanSerialize( ) default ResponseEntity fakeOuterCompositeSerialize( - @ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite outerComposite + @ApiParam(value = "Input composite as post body") @RequestBody(required = false) @Valid OuterComposite outerComposite ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -171,7 +171,7 @@ default ResponseEntity fakeOuterCompositeSerialize( ) default ResponseEntity fakeOuterNumberSerialize( - @ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body + @ApiParam(value = "Input number as post body") @RequestBody(required = false) BigDecimal body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -203,7 +203,7 @@ default ResponseEntity fakeOuterNumberSerialize( ) default ResponseEntity fakeOuterStringSerialize( - @ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body + @ApiParam(value = "Input string as post body") @RequestBody(required = false) String body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -233,7 +233,7 @@ default ResponseEntity fakeOuterStringSerialize( ) default ResponseEntity responseObjectDifferentNames( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") @NotNull Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -272,7 +272,7 @@ default ResponseEntity responseObjectDiff ) default ResponseEntity testBodyWithFileSchema( - @ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass fileSchemaTestClass + @ApiParam(value = "", required = true) @RequestBody @NotNull @Valid FileSchemaTestClass fileSchemaTestClass ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -302,8 +302,8 @@ default ResponseEntity testBodyWithFileSchema( ) default ResponseEntity testBodyWithQueryParams( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, - @ApiParam(value = "", required = true) @Valid @RequestBody User user + @ApiParam(value = "", required = true) @RequestParam(value = "query") @NotNull String query, + @ApiParam(value = "", required = true) @RequestBody @NotNull @Valid User user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -335,7 +335,7 @@ default ResponseEntity testBodyWithQueryParams( ) default ResponseEntity testClientModel( - @ApiParam(value = "client model", required = true) @Valid @RequestBody Client client + @ApiParam(value = "client model", required = true) @RequestBody @NotNull @Valid Client client ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -392,20 +392,20 @@ default ResponseEntity testClientModel( ) default ResponseEntity testEndpointParameters( - @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "number", required = true) BigDecimal number, - @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "double", required = true) Double _double, - @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, - @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "byte", required = true) byte[] _byte, - @ApiParam(value = "None") @Valid @RequestParam(value = "integer", required = false) Integer integer, - @ApiParam(value = "None") @Valid @RequestParam(value = "int32", required = false) Integer int32, - @ApiParam(value = "None") @Valid @RequestParam(value = "int64", required = false) Long int64, - @ApiParam(value = "None") @Valid @RequestParam(value = "float", required = false) Float _float, - @ApiParam(value = "None") @Valid @RequestParam(value = "string", required = false) String string, + @ApiParam(value = "None", required = true) @RequestParam(value = "number") @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal number, + @ApiParam(value = "None", required = true) @RequestParam(value = "double") @NotNull @DecimalMin("67.8") @DecimalMax("123.4") Double _double, + @ApiParam(value = "None", required = true) @RequestParam(value = "pattern_without_delimiter") @NotNull @Pattern(regexp = "^[A-Z].*") String patternWithoutDelimiter, + @ApiParam(value = "None", required = true) @RequestParam(value = "byte") @NotNull byte[] _byte, + @ApiParam(value = "None") @RequestParam(value = "integer", required = false) @Min(10) @Max(100) Integer integer, + @ApiParam(value = "None") @RequestParam(value = "int32", required = false) @Min(20) @Max(200) Integer int32, + @ApiParam(value = "None") @RequestParam(value = "int64", required = false) Long int64, + @ApiParam(value = "None") @RequestParam(value = "float", required = false) @DecimalMax("987.6") Float _float, + @ApiParam(value = "None") @RequestParam(value = "string", required = false) @Pattern(regexp = "/[a-z]/i") String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @ApiParam(value = "None") @Valid @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, - @ApiParam(value = "None") @Valid @RequestParam(value = "password", required = false) String password, - @ApiParam(value = "None") @Valid @RequestParam(value = "callback", required = false) String paramCallback + @ApiParam(value = "None") @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @RequestParam(value = "password", required = false) @Size(min = 10, max = 64) String password, + @ApiParam(value = "None") @RequestParam(value = "callback", required = false) String paramCallback ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -444,14 +444,14 @@ default ResponseEntity testEndpointParameters( ) default ResponseEntity testEnumParameters( - @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, - @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, - @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, - @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, - @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString + @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestParam(value = "enum_form_string", required = false) String enumFormString ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -485,12 +485,12 @@ default ResponseEntity testEnumParameters( ) default ResponseEntity testGroupParameters( - @NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @ApiParam(value = "Required String in group parameters", required = true) @RequestParam(value = "required_string_group") @NotNull Integer requiredStringGroup, @NotNull @ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, - @NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, - @ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup, + @ApiParam(value = "Required Integer in group parameters", required = true) @RequestParam(value = "required_int64_group") @NotNull Long requiredInt64Group, + @ApiParam(value = "String in group parameters") @RequestParam(value = "string_group", required = false) Integer stringGroup, @ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup, - @ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + @ApiParam(value = "Integer in group parameters") @RequestParam(value = "int64_group", required = false) Long int64Group ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -520,7 +520,7 @@ default ResponseEntity testGroupParameters( ) default ResponseEntity testInlineAdditionalProperties( - @ApiParam(value = "request body", required = true) @Valid @RequestBody Map requestBody + @ApiParam(value = "request body", required = true) @RequestBody @NotNull Map requestBody ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -551,8 +551,8 @@ default ResponseEntity testInlineAdditionalProperties( ) default ResponseEntity testJsonFormData( - @ApiParam(value = "field1", required = true) @Valid @RequestParam(value = "param", required = true) String param, - @ApiParam(value = "field2", required = true) @Valid @RequestParam(value = "param2", required = true) String param2 + @ApiParam(value = "field1", required = true) @RequestParam(value = "param") @NotNull String param, + @ApiParam(value = "field2", required = true) @RequestParam(value = "param2") @NotNull String param2 ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -582,7 +582,7 @@ default ResponseEntity testJsonFormData( ) default ResponseEntity testNullable( - @ApiParam(value = "request body", required = true) @Valid @RequestBody ChildWithNullable childWithNullable + @ApiParam(value = "request body", required = true) @RequestBody @NotNull @Valid ChildWithNullable childWithNullable ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -614,10 +614,10 @@ default ResponseEntity testNullable( ) default ResponseEntity testQueryParameterCollectionFormat( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + @ApiParam(value = "", required = true) @RequestParam(value = "pipe") @NotNull List pipe, + @ApiParam(value = "", required = true) @RequestParam(value = "http") @NotNull List http, + @ApiParam(value = "", required = true) @RequestParam(value = "url") @NotNull List url, + @ApiParam(value = "", required = true) @RequestParam(value = "context") @NotNull List context ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -696,9 +696,9 @@ default ResponseEntity testWithResultExample( ) default ResponseEntity uploadFileWithRequiredFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, - @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, - @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") @NotNull Long petId, + @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile") MultipartFile requiredFile, + @ApiParam(value = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 6230e1d2c4fc..106e805c95ba 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -59,7 +59,7 @@ default Optional getRequest() { ) default ResponseEntity testClassname( - @ApiParam(value = "client model", required = true) @Valid @RequestBody Client client + @ApiParam(value = "client model", required = true) @RequestBody @NotNull @Valid Client client ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java index e4d4585001de..ea9f10fb49a1 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java @@ -64,7 +64,7 @@ default Optional getRequest() { ) default ResponseEntity addPet( - @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet pet ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -102,7 +102,7 @@ default ResponseEntity addPet( ) default ResponseEntity deletePet( - @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") @NotNull Long petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -124,7 +124,7 @@ default ResponseEntity deletePet( nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, - responseContainer = "List", + responseContainer = "array", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @@ -133,7 +133,7 @@ default ResponseEntity deletePet( } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "array"), @ApiResponse(code = 400, message = "Invalid status value") }) @RequestMapping( @@ -143,7 +143,7 @@ default ResponseEntity deletePet( ) default ResponseEntity> findPetsByStatus( - @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status + @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @RequestParam(value = "status") @NotNull List status ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -180,7 +180,7 @@ default ResponseEntity> findPetsByStatus( nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, - responseContainer = "Set", + responseContainer = "set", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @@ -189,7 +189,7 @@ default ResponseEntity> findPetsByStatus( } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "Set"), + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "set"), @ApiResponse(code = 400, message = "Invalid tag value") }) @RequestMapping( @@ -199,7 +199,7 @@ default ResponseEntity> findPetsByStatus( ) default ResponseEntity> findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags + @ApiParam(value = "Tags to filter by", required = true) @RequestParam(value = "tags") @NotNull Set tags ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -251,7 +251,7 @@ default ResponseEntity> findPetsByTags( ) default ResponseEntity getPetById( - @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") @NotNull Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -307,7 +307,7 @@ default ResponseEntity getPetById( ) default ResponseEntity updatePet( - @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet pet ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -345,9 +345,9 @@ default ResponseEntity updatePet( ) default ResponseEntity updatePetWithForm( - @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, - @ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, - @ApiParam(value = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status + @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") @NotNull Long petId, + @ApiParam(value = "Updated name of the pet") @RequestParam(value = "name", required = false) String name, + @ApiParam(value = "Updated status of the pet") @RequestParam(value = "status", required = false) String status ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -387,8 +387,8 @@ default ResponseEntity updatePetWithForm( ) default ResponseEntity uploadFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, - @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") @NotNull Long petId, + @ApiParam(value = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) { getRequest().ifPresent(request -> { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java index 5ecfb9933b71..297a887e3eb5 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java @@ -56,7 +56,7 @@ default Optional getRequest() { ) default ResponseEntity deleteOrder( - @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") @NotNull String orderId ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -75,13 +75,13 @@ default ResponseEntity deleteOrder( nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, - responseContainer = "Map", + responseContainer = "map", authorizations = { @Authorization(value = "api_key") } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "map") }) @RequestMapping( method = RequestMethod.GET, @@ -125,7 +125,7 @@ default ResponseEntity> getInventory( ) default ResponseEntity getOrderById( - @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") @NotNull @Min(1L) @Max(5L) Long orderId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -173,7 +173,7 @@ default ResponseEntity getOrderById( ) default ResponseEntity placeOrder( - @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order + @ApiParam(value = "order placed for purchasing the pet", required = true) @RequestBody @NotNull @Valid Order order ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java index 3f247fb6c71e..0fbf78a7e6b7 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java @@ -55,7 +55,7 @@ default Optional getRequest() { ) default ResponseEntity createUser( - @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User user + @ApiParam(value = "Created user object", required = true) @RequestBody @NotNull @Valid User user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -85,7 +85,7 @@ default ResponseEntity createUser( ) default ResponseEntity createUsersWithArrayInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + @ApiParam(value = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -115,7 +115,7 @@ default ResponseEntity createUsersWithArrayInput( ) default ResponseEntity createUsersWithListInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + @ApiParam(value = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -146,7 +146,7 @@ default ResponseEntity createUsersWithListInput( ) default ResponseEntity deleteUser( - @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") @NotNull String username ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -181,7 +181,7 @@ default ResponseEntity deleteUser( ) default ResponseEntity getUserByName( - @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") @NotNull String username ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -229,8 +229,8 @@ default ResponseEntity getUserByName( ) default ResponseEntity loginUser( - @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, - @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + @ApiParam(value = "The user name for login", required = true) @RequestParam(value = "username") @NotNull String username, + @ApiParam(value = "The password for login in clear text", required = true) @RequestParam(value = "password") @NotNull String password ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -291,8 +291,8 @@ default ResponseEntity logoutUser( ) default ResponseEntity updateUser( - @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, - @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User user + @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") @NotNull String username, + @ApiParam(value = "Updated user object", required = true) @RequestBody @NotNull @Valid User user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index a25c222ea134..2baac960ebab 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -36,7 +36,6 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -124,4 +123,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index f68e3c8440dd..d5d9382474b9 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -37,7 +37,6 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index d4fcbc3031cc..2c5d885b141e 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -36,7 +36,6 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -124,4 +123,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 67f74641844d..8a5d7042e3da 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -25,28 +25,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class AdditionalPropertiesClass { - @Valid private Map mapString = new HashMap<>(); - @Valid private Map mapNumber = new HashMap<>(); - @Valid private Map mapInteger = new HashMap<>(); - @Valid private Map mapBoolean = new HashMap<>(); - @Valid private Map> mapArrayInteger = new HashMap<>(); - @Valid private Map> mapArrayAnytype = new HashMap<>(); - @Valid private Map> mapMapString = new HashMap<>(); - @Valid private Map> mapMapAnytype = new HashMap<>(); private Object anytype1; @@ -72,7 +64,6 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ - @ApiModelProperty(value = "") @JsonProperty("map_string") public Map getMapString() { @@ -100,7 +91,6 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("map_number") public Map getMapNumber() { @@ -128,7 +118,6 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ - @ApiModelProperty(value = "") @JsonProperty("map_integer") public Map getMapInteger() { @@ -156,7 +145,6 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ - @ApiModelProperty(value = "") @JsonProperty("map_boolean") public Map getMapBoolean() { @@ -184,7 +172,6 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { @@ -212,7 +199,6 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ - @Valid @ApiModelProperty(value = "") @JsonProperty("map_array_anytype") public Map> getMapArrayAnytype() { @@ -240,7 +226,6 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { @@ -268,7 +253,6 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { @@ -288,7 +272,6 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ - @ApiModelProperty(value = "") @JsonProperty("anytype_1") public Object getAnytype1() { @@ -308,7 +291,6 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ - @ApiModelProperty(value = "") @JsonProperty("anytype_2") public Object getAnytype2() { @@ -328,7 +310,6 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ - @ApiModelProperty(value = "") @JsonProperty("anytype_3") public Object getAnytype3() { @@ -396,4 +377,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 82a9d4af21e1..e736015e9c88 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -36,7 +36,6 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -124,4 +123,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 488c9f58a9df..b449d65cc23a 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -37,7 +37,6 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 732ff6489802..636354474f9e 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -37,7 +37,6 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index bdec0d1182be..93da2fe918d6 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -36,7 +36,6 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -124,4 +123,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Animal.java index 79c75c9e97c2..ef05f3d9bc33 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Animal.java @@ -35,7 +35,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class Animal { - private String className; + private @NotNull String className; private String color = "red"; @@ -59,10 +59,9 @@ public Animal className(String className) { * Get className * @return className */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("className") - public String getClassName() { + public @NotNull String getClassName() { return className; } @@ -79,7 +78,6 @@ public Animal color(String color) { * Get color * @return color */ - @ApiModelProperty(value = "") @JsonProperty("color") public String getColor() { @@ -129,4 +127,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index aa0f020fb81a..420855254471 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnly { - @Valid private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { @@ -45,7 +44,6 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("ArrayArrayNumber") public List> getArrayArrayNumber() { @@ -93,4 +91,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 42e46924cae2..5ed25ea44b43 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayOfNumberOnly { - @Valid private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnly arrayNumber(List arrayNumber) { @@ -45,7 +44,6 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("ArrayNumber") public List getArrayNumber() { @@ -93,4 +91,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java index c3cd802478e8..3340dc0fc56e 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java @@ -25,13 +25,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayTest { - @Valid private List arrayOfString = new ArrayList<>(); - @Valid private List> arrayArrayOfInteger = new ArrayList<>(); - @Valid private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTest arrayOfString(List arrayOfString) { @@ -51,7 +48,6 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ - @ApiModelProperty(value = "") @JsonProperty("array_of_string") public List getArrayOfString() { @@ -79,7 +75,6 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ - @Valid @ApiModelProperty(value = "") @JsonProperty("array_array_of_integer") public List> getArrayArrayOfInteger() { @@ -90,12 +85,12 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } - public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) { + public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { if (this.arrayArrayOfModel == null) { this.arrayArrayOfModel = new ArrayList<>(); } @@ -107,14 +102,13 @@ public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayO * Get arrayArrayOfModel * @return arrayArrayOfModel */ - @Valid @ApiModelProperty(value = "") @JsonProperty("array_array_of_model") public List> getArrayArrayOfModel() { return arrayArrayOfModel; } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { + public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } @@ -159,4 +153,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCat.java index 0b690da62ef8..1638a78e3654 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCat.java @@ -66,7 +66,7 @@ public static KindEnum fromValue(String value) { } } - private KindEnum kind; + private String kind; public BigCat() { super(); @@ -88,10 +88,9 @@ public BigCat kind(KindEnum kind) { * Get kind * @return kind */ - @ApiModelProperty(value = "") @JsonProperty("kind") - public KindEnum getKind() { + public String getKind() { return kind; } @@ -153,4 +152,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Capitalization.java index e17dd1282363..315044095bf2 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Capitalization.java @@ -42,7 +42,6 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ - @ApiModelProperty(value = "") @JsonProperty("smallCamel") public String getSmallCamel() { @@ -62,7 +61,6 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ - @ApiModelProperty(value = "") @JsonProperty("CapitalCamel") public String getCapitalCamel() { @@ -82,7 +80,6 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ - @ApiModelProperty(value = "") @JsonProperty("small_Snake") public String getSmallSnake() { @@ -102,7 +99,6 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ - @ApiModelProperty(value = "") @JsonProperty("Capital_Snake") public String getCapitalSnake() { @@ -122,7 +118,6 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ - @ApiModelProperty(value = "") @JsonProperty("SCA_ETH_Flow_Points") public String getScAETHFlowPoints() { @@ -142,7 +137,6 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ - @ApiModelProperty(value = "Name of the pet ") @JsonProperty("ATT_NAME") public String getATTNAME() { @@ -200,4 +194,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Cat.java index a32ffbf837c5..95e26e7d49b5 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Cat.java @@ -56,7 +56,6 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ - @ApiModelProperty(value = "") @JsonProperty("declawed") public Boolean getDeclawed() { @@ -116,4 +115,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Category.java index 7aa64cc7b2d9..adb67b10f650 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Category.java @@ -23,7 +23,7 @@ public class Category { private Long id; - private String name = "default-name"; + private @NotNull String name = "default-name"; public Category() { super(); @@ -45,7 +45,6 @@ public Category id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -65,10 +64,9 @@ public Category name(String name) { * Get name * @return name */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -115,4 +113,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ChildWithNullable.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ChildWithNullable.java index 10efd3c291ef..04f02df8220d 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ChildWithNullable.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ChildWithNullable.java @@ -38,7 +38,6 @@ public ChildWithNullable otherProperty(String otherProperty) { * Get otherProperty * @return otherProperty */ - @ApiModelProperty(value = "") @JsonProperty("otherProperty") public String getOtherProperty() { @@ -98,4 +97,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ClassModel.java index d52074f517e6..d317011a4a0d 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ClassModel.java @@ -33,7 +33,6 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @ApiModelProperty(value = "") @JsonProperty("_class") public String getPropertyClass() { @@ -81,4 +80,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Client.java index e3564ca8935e..84930c0ce3ec 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Client.java @@ -32,7 +32,6 @@ public Client client(String client) { * Get client * @return client */ - @ApiModelProperty(value = "") @JsonProperty("client") public String getClient() { @@ -80,4 +79,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ContainerDefaultValue.java index a2314dc44d4b..9479fbbcfd26 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ContainerDefaultValue.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -24,16 +24,12 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ContainerDefaultValue { - @Valid - private List nullableArray; + private List nullableArray = null; - @Valid - private List nullableRequiredArray; + private List nullableRequiredArray = null; - @Valid - private List requiredArray = new ArrayList<>(); + private @NotNull List requiredArray = new ArrayList<>(); - @Valid private List nullableArrayWithDefault = new ArrayList<>(Arrays.asList("foo", "bar")); public ContainerDefaultValue() { @@ -65,7 +61,6 @@ public ContainerDefaultValue addNullableArrayItem(String nullableArrayItem) { * Get nullableArray * @return nullableArray */ - @ApiModelProperty(value = "") @JsonProperty("nullable_array") public List getNullableArray() { @@ -93,7 +88,6 @@ public ContainerDefaultValue addNullableRequiredArrayItem(String nullableRequire * Get nullableRequiredArray * @return nullableRequiredArray */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("nullable_required_array") public List getNullableRequiredArray() { @@ -121,10 +115,9 @@ public ContainerDefaultValue addRequiredArrayItem(String requiredArrayItem) { * Get requiredArray * @return requiredArray */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("required_array") - public List getRequiredArray() { + public @NotNull List getRequiredArray() { return requiredArray; } @@ -149,7 +142,6 @@ public ContainerDefaultValue addNullableArrayWithDefaultItem(String nullableArra * Get nullableArrayWithDefault * @return nullableArrayWithDefault */ - @ApiModelProperty(value = "") @JsonProperty("nullable_array_with_default") public List getNullableArrayWithDefault() { @@ -203,4 +195,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Dog.java index f51af4c7886e..d9047e4ebb10 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Dog.java @@ -48,7 +48,6 @@ public Dog breed(String breed) { * Get breed * @return breed */ - @ApiModelProperty(value = "") @JsonProperty("breed") public String getBreed() { @@ -108,4 +107,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java index 4a33d5a698ef..5cf0e2a4ec06 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java @@ -60,7 +60,7 @@ public static JustSymbolEnum fromValue(String value) { } } - private JustSymbolEnum justSymbol; + private String justSymbol; /** * Gets or Sets arrayEnum @@ -97,8 +97,7 @@ public static ArrayEnumEnum fromValue(String value) { } } - @Valid - private List arrayEnum = new ArrayList<>(); + private List arrayEnum = new ArrayList<>(); public EnumArrays justSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; @@ -109,10 +108,9 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ - @ApiModelProperty(value = "") @JsonProperty("just_symbol") - public JustSymbolEnum getJustSymbol() { + public String getJustSymbol() { return justSymbol; } @@ -137,10 +135,9 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ - @ApiModelProperty(value = "") @JsonProperty("array_enum") - public List getArrayEnum() { + public List getArrayEnum() { return arrayEnum; } @@ -187,4 +184,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java index 38830d59d4a0..76e138763470 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java @@ -62,7 +62,7 @@ public static EnumStringEnum fromValue(String value) { } } - private EnumStringEnum enumString; + private String enumString; /** * Gets or Sets enumStringRequired @@ -101,7 +101,7 @@ public static EnumStringRequiredEnum fromValue(String value) { } } - private EnumStringRequiredEnum enumStringRequired; + private @NotNull String enumStringRequired; /** * Gets or Sets enumInteger @@ -138,7 +138,7 @@ public static EnumIntegerEnum fromValue(Integer value) { } } - private EnumIntegerEnum enumInteger; + private Integer enumInteger; /** * Gets or Sets enumNumber @@ -175,7 +175,7 @@ public static EnumNumberEnum fromValue(Double value) { } } - private EnumNumberEnum enumNumber; + private Double enumNumber; private OuterEnum outerEnum; @@ -199,10 +199,9 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ - @ApiModelProperty(value = "") @JsonProperty("enum_string") - public EnumStringEnum getEnumString() { + public String getEnumString() { return enumString; } @@ -219,10 +218,9 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("enum_string_required") - public EnumStringRequiredEnum getEnumStringRequired() { + public @NotNull String getEnumStringRequired() { return enumStringRequired; } @@ -239,10 +237,9 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ - @ApiModelProperty(value = "") @JsonProperty("enum_integer") - public EnumIntegerEnum getEnumInteger() { + public Integer getEnumInteger() { return enumInteger; } @@ -259,10 +256,9 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ - @ApiModelProperty(value = "") @JsonProperty("enum_number") - public EnumNumberEnum getEnumNumber() { + public Double getEnumNumber() { return enumNumber; } @@ -279,7 +275,6 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ - @Valid @ApiModelProperty(value = "") @JsonProperty("outerEnum") public OuterEnum getOuterEnum() { @@ -335,4 +330,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/File.java index 2de5c22cfb15..e94671415f5b 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/File.java @@ -33,7 +33,6 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ - @ApiModelProperty(value = "Test capitalization") @JsonProperty("sourceURI") public String getSourceURI() { @@ -81,4 +80,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 1231741f571c..00c87e60b57c 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -25,9 +25,8 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class FileSchemaTestClass { - private File file; + private @Valid File file; - @Valid private List<@Valid File> files = new ArrayList<>(); public FileSchemaTestClass file(File file) { @@ -39,10 +38,9 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ - @Valid @ApiModelProperty(value = "") @JsonProperty("file") - public File getFile() { + public @Valid File getFile() { return file; } @@ -50,7 +48,7 @@ public void setFile(File file) { this.file = file; } - public FileSchemaTestClass files(List<@Valid File> files) { + public FileSchemaTestClass files(List files) { this.files = files; return this; } @@ -67,14 +65,13 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ - @Valid @ApiModelProperty(value = "") @JsonProperty("files") public List<@Valid File> getFiles() { return files; } - public void setFiles(List<@Valid File> files) { + public void setFiles(List files) { this.files = files; } @@ -117,4 +114,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java index e0d177aceba6..879eadde00a8 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java @@ -29,33 +29,33 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class FormatTest { - private Integer integer; + private @Min(10) @Max(100) Integer integer; - private Integer int32; + private @Min(20) @Max(200) Integer int32; private Long int64; - private BigDecimal number; + private @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal number; - private Float _float; + private @DecimalMin("54.3") @DecimalMax("987.6") Float _float; - private Double _double; + private @DecimalMin("67.8") @DecimalMax("123.4") Double _double; - private String string; + private @Pattern(regexp = "/[a-z]/i") String string; - private byte[] _byte; + private @NotNull byte[] _byte; private org.springframework.core.io.Resource binary; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) - private LocalDate date; + private @NotNull LocalDate date; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; private UUID uuid; - private String password; + private @NotNull @Size(min = 10, max = 64) String password; private BigDecimal bigDecimal; @@ -84,10 +84,9 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ - @Min(10) @Max(100) @ApiModelProperty(value = "") @JsonProperty("integer") - public Integer getInteger() { + public @Min(10) @Max(100) Integer getInteger() { return integer; } @@ -106,10 +105,9 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ - @Min(20) @Max(200) @ApiModelProperty(value = "") @JsonProperty("int32") - public Integer getInt32() { + public @Min(20) @Max(200) Integer getInt32() { return int32; } @@ -126,7 +124,6 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ - @ApiModelProperty(value = "") @JsonProperty("int64") public Long getInt64() { @@ -148,10 +145,9 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ - @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(required = true, value = "") @JsonProperty("number") - public BigDecimal getNumber() { + public @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal getNumber() { return number; } @@ -170,10 +166,9 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ - @DecimalMin("54.3") @DecimalMax("987.6") @ApiModelProperty(value = "") @JsonProperty("float") - public Float getFloat() { + public @DecimalMin("54.3") @DecimalMax("987.6") Float getFloat() { return _float; } @@ -192,10 +187,9 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ - @DecimalMin("67.8") @DecimalMax("123.4") @ApiModelProperty(value = "") @JsonProperty("double") - public Double getDouble() { + public @DecimalMin("67.8") @DecimalMax("123.4") Double getDouble() { return _double; } @@ -212,10 +206,9 @@ public FormatTest string(String string) { * Get string * @return string */ - @Pattern(regexp = "/[a-z]/i") @ApiModelProperty(value = "") @JsonProperty("string") - public String getString() { + public @Pattern(regexp = "/[a-z]/i") String getString() { return string; } @@ -232,10 +225,9 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("byte") - public byte[] getByte() { + public @NotNull byte[] getByte() { return _byte; } @@ -252,7 +244,6 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ - @Valid @ApiModelProperty(value = "") @JsonProperty("binary") public org.springframework.core.io.Resource getBinary() { @@ -272,10 +263,9 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ - @NotNull @Valid @ApiModelProperty(required = true, value = "") @JsonProperty("date") - public LocalDate getDate() { + public @NotNull LocalDate getDate() { return date; } @@ -292,7 +282,6 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ - @Valid @ApiModelProperty(value = "") @JsonProperty("dateTime") public OffsetDateTime getDateTime() { @@ -312,7 +301,6 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ - @Valid @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") @JsonProperty("uuid") public UUID getUuid() { @@ -332,10 +320,9 @@ public FormatTest password(String password) { * Get password * @return password */ - @NotNull @Size(min = 10, max = 64) @ApiModelProperty(required = true, value = "") @JsonProperty("password") - public String getPassword() { + public @NotNull @Size(min = 10, max = 64) String getPassword() { return password; } @@ -352,7 +339,6 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ - @Valid @ApiModelProperty(value = "") @JsonProperty("BigDecimal") public BigDecimal getBigDecimal() { @@ -426,4 +412,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 2c4100be4ad8..b9d28b3afbc9 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -36,7 +36,6 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("bar") public String getBar() { @@ -56,7 +55,6 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("foo") public String getFoo() { @@ -106,4 +104,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MapTest.java index 7254572316e6..9d43cedd8632 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MapTest.java @@ -24,7 +24,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class MapTest { - @Valid private Map> mapMapOfString = new HashMap<>(); /** @@ -62,13 +61,10 @@ public static InnerEnum fromValue(String value) { } } - @Valid - private Map mapOfEnumString = new HashMap<>(); + private Map mapOfEnumString = new HashMap<>(); - @Valid private Map directMap = new HashMap<>(); - @Valid private Map indirectMap = new HashMap<>(); public MapTest mapMapOfString(Map> mapMapOfString) { @@ -88,7 +84,6 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ - @Valid @ApiModelProperty(value = "") @JsonProperty("map_map_of_string") public Map> getMapMapOfString() { @@ -116,10 +111,9 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ - @ApiModelProperty(value = "") @JsonProperty("map_of_enum_string") - public Map getMapOfEnumString() { + public Map getMapOfEnumString() { return mapOfEnumString; } @@ -144,7 +138,6 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ - @ApiModelProperty(value = "") @JsonProperty("direct_map") public Map getDirectMap() { @@ -172,7 +165,6 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ - @ApiModelProperty(value = "") @JsonProperty("indirect_map") public Map getIndirectMap() { @@ -226,4 +218,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 3abb28281280..38cce2fe67cb 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -32,8 +32,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; - @Valid - private Map map = new HashMap<>(); + private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { this.uuid = uuid; @@ -44,7 +43,6 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ - @Valid @ApiModelProperty(value = "") @JsonProperty("uuid") public UUID getUuid() { @@ -64,7 +62,6 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ - @Valid @ApiModelProperty(value = "") @JsonProperty("dateTime") public OffsetDateTime getDateTime() { @@ -92,10 +89,9 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ - @Valid @ApiModelProperty(value = "") @JsonProperty("map") - public Map getMap() { + public Map getMap() { return map; } @@ -144,4 +140,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Model200Response.java index 422f8b9c0dc1..4aef42e636c9 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Model200Response.java @@ -37,7 +37,6 @@ public Model200Response name(Integer name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public Integer getName() { @@ -57,7 +56,6 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @ApiModelProperty(value = "") @JsonProperty("class") public String getPropertyClass() { @@ -107,4 +105,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelApiResponse.java index bf104c5465ed..ebcc5a2a9dc2 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -38,7 +38,6 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @ApiModelProperty(value = "") @JsonProperty("code") public Integer getCode() { @@ -58,7 +57,6 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @ApiModelProperty(value = "") @JsonProperty("type") public String getType() { @@ -78,7 +76,6 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @ApiModelProperty(value = "") @JsonProperty("message") public String getMessage() { @@ -130,4 +127,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelList.java index 79d1eab855aa..b5c82f47717f 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelList.java @@ -34,7 +34,6 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ - @ApiModelProperty(value = "") @JsonProperty("123-list") public String get123list() { @@ -82,4 +81,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelReturn.java index 113814941b9f..a1452977893c 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelReturn.java @@ -35,7 +35,6 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ - @ApiModelProperty(value = "") @JsonProperty("return") public Integer getReturn() { @@ -83,4 +82,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Name.java index f25ae8d135fd..aab813eb19cd 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Name.java @@ -22,7 +22,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class Name { - private Integer name; + private @NotNull Integer name; private Integer snakeCase; @@ -50,10 +50,9 @@ public Name name(Integer name) { * Get name * @return name */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("name") - public Integer getName() { + public @NotNull Integer getName() { return name; } @@ -70,7 +69,6 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("snake_case") public Integer getSnakeCase() { @@ -90,7 +88,6 @@ public Name property(String property) { * Get property * @return property */ - @ApiModelProperty(value = "") @JsonProperty("property") public String getProperty() { @@ -110,7 +107,6 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("123Number") public Integer get123number() { @@ -164,4 +160,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/NullableMapProperty.java index 1bd0c9bb62a9..315f72d27ac8 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/NullableMapProperty.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -23,8 +23,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class NullableMapProperty { - @Valid - private Map languageValues; + private Map languageValues = null; public NullableMapProperty languageValues(Map languageValues) { this.languageValues = languageValues; @@ -43,7 +42,6 @@ public NullableMapProperty putLanguageValuesItem(String key, String languageValu * Get languageValues * @return languageValues */ - @ApiModelProperty(value = "") @JsonProperty("languageValues") public Map getLanguageValues() { @@ -91,4 +89,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/NumberOnly.java index d1a2ceff23aa..d2aa51332f95 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/NumberOnly.java @@ -33,7 +33,6 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("JustNumber") public BigDecimal getJustNumber() { @@ -81,4 +80,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Order.java index 15d9fba0df94..34e745219cfd 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Order.java @@ -70,7 +70,7 @@ public static StatusEnum fromValue(String value) { } } - private StatusEnum status; + private String status; private Boolean complete = false; @@ -83,7 +83,6 @@ public Order id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -103,7 +102,6 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @ApiModelProperty(value = "") @JsonProperty("petId") public Long getPetId() { @@ -123,7 +121,6 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @ApiModelProperty(value = "") @JsonProperty("quantity") public Integer getQuantity() { @@ -143,7 +140,6 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Valid @ApiModelProperty(value = "") @JsonProperty("shipDate") public OffsetDateTime getShipDate() { @@ -163,10 +159,9 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @ApiModelProperty(value = "Order Status") @JsonProperty("status") - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -183,7 +178,6 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @ApiModelProperty(value = "") @JsonProperty("complete") public Boolean getComplete() { @@ -241,4 +235,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterComposite.java index e544721bd380..840c7a796f34 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterComposite.java @@ -37,7 +37,6 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("my_number") public BigDecimal getMyNumber() { @@ -57,7 +56,6 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ - @ApiModelProperty(value = "") @JsonProperty("my_string") public String getMyString() { @@ -77,7 +75,6 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ - @ApiModelProperty(value = "") @JsonProperty("my_boolean") public Boolean getMyBoolean() { @@ -129,4 +126,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ParentWithNullable.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ParentWithNullable.java index 3cca41096e13..99330c8552fe 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ParentWithNullable.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ParentWithNullable.java @@ -67,7 +67,7 @@ public static TypeEnum fromValue(String value) { } } - private TypeEnum type; + private String type; private String nullableProperty = null; @@ -80,10 +80,9 @@ public ParentWithNullable type(TypeEnum type) { * Get type * @return type */ - @ApiModelProperty(value = "") @JsonProperty("type") - public TypeEnum getType() { + public String getType() { return type; } @@ -100,7 +99,6 @@ public ParentWithNullable nullableProperty(String nullableProperty) { * Get nullableProperty * @return nullableProperty */ - @ApiModelProperty(value = "") @JsonProperty("nullableProperty") public String getNullableProperty() { @@ -150,4 +148,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java index c7d94f713828..49b5304c2680 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java @@ -32,14 +32,12 @@ public class Pet { private Long id; - private Category category; + private @Valid Category category; - private String name; + private @NotNull String name; - @Valid - private Set photoUrls = new LinkedHashSet<>(); + private @NotNull Set photoUrls = new LinkedHashSet<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** @@ -80,7 +78,7 @@ public static StatusEnum fromValue(String value) { } @Deprecated - private StatusEnum status; + private String status; public Pet() { super(); @@ -103,7 +101,6 @@ public Pet id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -123,10 +120,9 @@ public Pet category(Category category) { * Get category * @return category */ - @Valid @ApiModelProperty(value = "") @JsonProperty("category") - public Category getCategory() { + public @Valid Category getCategory() { return category; } @@ -143,10 +139,9 @@ public Pet name(String name) { * Get name * @return name */ - @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -171,10 +166,9 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("photoUrls") - public Set getPhotoUrls() { + public @NotNull Set getPhotoUrls() { return photoUrls; } @@ -183,7 +177,7 @@ public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List<@Valid Tag> tags) { + public Pet tags(List tags) { this.tags = tags; return this; } @@ -200,14 +194,13 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Valid @ApiModelProperty(value = "") @JsonProperty("tags") public List<@Valid Tag> getTags() { return tags; } - public void setTags(List<@Valid Tag> tags) { + public void setTags(List tags) { this.tags = tags; } @@ -221,11 +214,10 @@ public Pet status(StatusEnum status) { * @return status * @deprecated */ - @ApiModelProperty(value = "pet status in the store") @JsonProperty("status") @Deprecated - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -284,4 +276,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ReadOnlyFirst.java index ef875b9b8d8c..ca2472038216 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -34,7 +34,6 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("bar") public String getBar() { @@ -54,7 +53,6 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ - @ApiModelProperty(value = "") @JsonProperty("baz") public String getBaz() { @@ -104,4 +102,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java index cc06482d1fbf..dcc9d25b9bac 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java @@ -38,7 +38,6 @@ public ResponseObjectWithDifferentFieldNames normalPropertyName(String normalPro * Get normalPropertyName * @return normalPropertyName */ - @ApiModelProperty(value = "") @JsonProperty("normalPropertyName") public String getNormalPropertyName() { @@ -58,7 +57,6 @@ public ResponseObjectWithDifferentFieldNames UPPER_CASE_PROPERTY_SNAKE(String UP * Get UPPER_CASE_PROPERTY_SNAKE * @return UPPER_CASE_PROPERTY_SNAKE */ - @ApiModelProperty(value = "") @JsonProperty("UPPER_CASE_PROPERTY_SNAKE") public String getUPPERCASEPROPERTYSNAKE() { @@ -78,7 +76,6 @@ public ResponseObjectWithDifferentFieldNames lowerCasePropertyDashes(String lowe * Get lowerCasePropertyDashes * @return lowerCasePropertyDashes */ - @ApiModelProperty(value = "") @JsonProperty("lower-case-property-dashes") public String getLowerCasePropertyDashes() { @@ -98,7 +95,6 @@ public ResponseObjectWithDifferentFieldNames propertyNameWithSpaces(String prope * Get propertyNameWithSpaces * @return propertyNameWithSpaces */ - @ApiModelProperty(value = "") @JsonProperty("property name with spaces") public String getPropertyNameWithSpaces() { @@ -152,4 +148,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/SpecialModelName.java index 8305058012bf..bcb01dbaf681 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/SpecialModelName.java @@ -34,7 +34,6 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ - @ApiModelProperty(value = "") @JsonProperty("$special[property.name]") public Long get$SpecialPropertyName() { @@ -82,4 +81,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Tag.java index 5faf024aa150..f77697e29434 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Tag.java @@ -34,7 +34,6 @@ public Tag id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -54,7 +53,6 @@ public Tag name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -104,4 +102,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java index b0a10fdbef8b..303778f10d72 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -25,16 +25,15 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class TypeHolderDefault { - private String stringItem = "what"; + private @NotNull String stringItem = "what"; - private BigDecimal numberItem = new BigDecimal("1.234"); + private @NotNull BigDecimal numberItem = new BigDecimal("1.234"); - private Integer integerItem = -2; + private @NotNull Integer integerItem = -2; - private Boolean boolItem = true; + private @NotNull Boolean boolItem = true; - @Valid - private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); + private @NotNull List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); public TypeHolderDefault() { super(); @@ -60,10 +59,9 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("string_item") - public String getStringItem() { + public @NotNull String getStringItem() { return stringItem; } @@ -80,10 +78,9 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @NotNull @Valid @ApiModelProperty(required = true, value = "") @JsonProperty("number_item") - public BigDecimal getNumberItem() { + public @NotNull BigDecimal getNumberItem() { return numberItem; } @@ -100,10 +97,9 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("integer_item") - public Integer getIntegerItem() { + public @NotNull Integer getIntegerItem() { return integerItem; } @@ -120,10 +116,9 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("bool_item") - public Boolean getBoolItem() { + public @NotNull Boolean getBoolItem() { return boolItem; } @@ -148,10 +143,9 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("array_item") - public List getArrayItem() { + public @NotNull List getArrayItem() { return arrayItem; } @@ -204,4 +198,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java index a89fc69a6226..de460415edfc 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -25,18 +25,17 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class TypeHolderExample { - private String stringItem; + private @NotNull String stringItem; - private BigDecimal numberItem; + private @NotNull BigDecimal numberItem; - private Float floatItem; + private @NotNull Float floatItem; - private Integer integerItem; + private @NotNull Integer integerItem; - private Boolean boolItem; + private @NotNull Boolean boolItem; - @Valid - private List arrayItem = new ArrayList<>(); + private @NotNull List arrayItem = new ArrayList<>(); public TypeHolderExample() { super(); @@ -63,10 +62,9 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @NotNull @ApiModelProperty(example = "what", required = true, value = "") @JsonProperty("string_item") - public String getStringItem() { + public @NotNull String getStringItem() { return stringItem; } @@ -83,10 +81,9 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @NotNull @Valid @ApiModelProperty(example = "1.234", required = true, value = "") @JsonProperty("number_item") - public BigDecimal getNumberItem() { + public @NotNull BigDecimal getNumberItem() { return numberItem; } @@ -103,10 +100,9 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ - @NotNull @ApiModelProperty(example = "1.234", required = true, value = "") @JsonProperty("float_item") - public Float getFloatItem() { + public @NotNull Float getFloatItem() { return floatItem; } @@ -123,10 +119,9 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @NotNull @ApiModelProperty(example = "-2", required = true, value = "") @JsonProperty("integer_item") - public Integer getIntegerItem() { + public @NotNull Integer getIntegerItem() { return integerItem; } @@ -143,10 +138,9 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @NotNull @ApiModelProperty(example = "true", required = true, value = "") @JsonProperty("bool_item") - public Boolean getBoolItem() { + public @NotNull Boolean getBoolItem() { return boolItem; } @@ -171,10 +165,9 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @NotNull @ApiModelProperty(example = "[0,1,2,3]", required = true, value = "") @JsonProperty("array_item") - public List getArrayItem() { + public @NotNull List getArrayItem() { return arrayItem; } @@ -229,4 +222,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/User.java index e35c2f514155..84bb94749214 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/User.java @@ -46,7 +46,6 @@ public User id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -66,7 +65,6 @@ public User username(String username) { * Get username * @return username */ - @ApiModelProperty(value = "") @JsonProperty("username") public String getUsername() { @@ -86,7 +84,6 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @ApiModelProperty(value = "") @JsonProperty("firstName") public String getFirstName() { @@ -106,7 +103,6 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @ApiModelProperty(value = "") @JsonProperty("lastName") public String getLastName() { @@ -126,7 +122,6 @@ public User email(String email) { * Get email * @return email */ - @ApiModelProperty(value = "") @JsonProperty("email") public String getEmail() { @@ -146,7 +141,6 @@ public User password(String password) { * Get password * @return password */ - @ApiModelProperty(value = "") @JsonProperty("password") public String getPassword() { @@ -166,7 +160,6 @@ public User phone(String phone) { * Get phone * @return phone */ - @ApiModelProperty(value = "") @JsonProperty("phone") public String getPhone() { @@ -186,7 +179,6 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @ApiModelProperty(value = "User Status") @JsonProperty("userStatus") public Integer getUserStatus() { @@ -248,4 +240,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/XmlItem.java index b7eb7c75e553..05e6c6b8438d 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/XmlItem.java @@ -33,7 +33,6 @@ public class XmlItem { private Boolean attributeBoolean; - @Valid private List wrappedArray = new ArrayList<>(); private String nameString; @@ -44,10 +43,8 @@ public class XmlItem { private Boolean nameBoolean; - @Valid private List nameArray = new ArrayList<>(); - @Valid private List nameWrappedArray = new ArrayList<>(); private String prefixString; @@ -58,10 +55,8 @@ public class XmlItem { private Boolean prefixBoolean; - @Valid private List prefixArray = new ArrayList<>(); - @Valid private List prefixWrappedArray = new ArrayList<>(); private String namespaceString; @@ -72,10 +67,8 @@ public class XmlItem { private Boolean namespaceBoolean; - @Valid private List namespaceArray = new ArrayList<>(); - @Valid private List namespaceWrappedArray = new ArrayList<>(); private String prefixNsString; @@ -86,10 +79,8 @@ public class XmlItem { private Boolean prefixNsBoolean; - @Valid private List prefixNsArray = new ArrayList<>(); - @Valid private List prefixNsWrappedArray = new ArrayList<>(); public XmlItem attributeString(String attributeString) { @@ -101,7 +92,6 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("attribute_string") public String getAttributeString() { @@ -121,7 +111,6 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("attribute_number") public BigDecimal getAttributeNumber() { @@ -141,7 +130,6 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("attribute_integer") public Integer getAttributeInteger() { @@ -161,7 +149,6 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("attribute_boolean") public Boolean getAttributeBoolean() { @@ -189,7 +176,6 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("wrapped_array") public List getWrappedArray() { @@ -209,7 +195,6 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("name_string") public String getNameString() { @@ -229,7 +214,6 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("name_number") public BigDecimal getNameNumber() { @@ -249,7 +233,6 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("name_integer") public Integer getNameInteger() { @@ -269,7 +252,6 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("name_boolean") public Boolean getNameBoolean() { @@ -297,7 +279,6 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ - @ApiModelProperty(value = "") @JsonProperty("name_array") public List getNameArray() { @@ -325,7 +306,6 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("name_wrapped_array") public List getNameWrappedArray() { @@ -345,7 +325,6 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("prefix_string") public String getPrefixString() { @@ -365,7 +344,6 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("prefix_number") public BigDecimal getPrefixNumber() { @@ -385,7 +363,6 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_integer") public Integer getPrefixInteger() { @@ -405,7 +382,6 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("prefix_boolean") public Boolean getPrefixBoolean() { @@ -433,7 +409,6 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_array") public List getPrefixArray() { @@ -461,7 +436,6 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_wrapped_array") public List getPrefixWrappedArray() { @@ -481,7 +455,6 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("namespace_string") public String getNamespaceString() { @@ -501,7 +474,6 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("namespace_number") public BigDecimal getNamespaceNumber() { @@ -521,7 +493,6 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { @@ -541,7 +512,6 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("namespace_boolean") public Boolean getNamespaceBoolean() { @@ -569,7 +539,6 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ - @ApiModelProperty(value = "") @JsonProperty("namespace_array") public List getNamespaceArray() { @@ -597,7 +566,6 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("namespace_wrapped_array") public List getNamespaceWrappedArray() { @@ -617,7 +585,6 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("prefix_ns_string") public String getPrefixNsString() { @@ -637,7 +604,6 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("prefix_ns_number") public BigDecimal getPrefixNsNumber() { @@ -657,7 +623,6 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { @@ -677,7 +642,6 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("prefix_ns_boolean") public Boolean getPrefixNsBoolean() { @@ -705,7 +669,6 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_ns_array") public List getPrefixNsArray() { @@ -733,7 +696,6 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_ns_wrapped_array") public List getPrefixNsWrappedArray() { @@ -837,4 +799,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java index 95449b1c5f94..ff3d248c48be 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -56,7 +56,7 @@ default Optional getRequest() { ) default ResponseEntity call123testSpecialTags( - @ApiParam(value = "client model", required = true) @Valid @RequestBody Client client + @ApiParam(value = "client model", required = true) @RequestBody @NotNull @Valid Client client ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java index 276b4303b2f3..292a6ad8b0e6 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java @@ -66,7 +66,7 @@ default Optional getRequest() { ) default ResponseEntity createXmlItem( - @ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem + @ApiParam(value = "XmlItem Body", required = true) @RequestBody @NotNull @Valid XmlItem xmlItem ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -98,7 +98,7 @@ default ResponseEntity createXmlItem( ) default ResponseEntity fakeOuterBooleanSerialize( - @ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body + @ApiParam(value = "Input boolean as post body") @RequestBody(required = false) Boolean body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -130,7 +130,7 @@ default ResponseEntity fakeOuterBooleanSerialize( ) default ResponseEntity fakeOuterCompositeSerialize( - @ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite outerComposite + @ApiParam(value = "Input composite as post body") @RequestBody(required = false) @Valid OuterComposite outerComposite ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -171,7 +171,7 @@ default ResponseEntity fakeOuterCompositeSerialize( ) default ResponseEntity fakeOuterNumberSerialize( - @ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body + @ApiParam(value = "Input number as post body") @RequestBody(required = false) BigDecimal body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -203,7 +203,7 @@ default ResponseEntity fakeOuterNumberSerialize( ) default ResponseEntity fakeOuterStringSerialize( - @ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body + @ApiParam(value = "Input string as post body") @RequestBody(required = false) String body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -233,7 +233,7 @@ default ResponseEntity fakeOuterStringSerialize( ) default ResponseEntity responseObjectDifferentNames( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") @NotNull Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -272,7 +272,7 @@ default ResponseEntity responseObjectDiff ) default ResponseEntity testBodyWithFileSchema( - @ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass fileSchemaTestClass + @ApiParam(value = "", required = true) @RequestBody @NotNull @Valid FileSchemaTestClass fileSchemaTestClass ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -302,8 +302,8 @@ default ResponseEntity testBodyWithFileSchema( ) default ResponseEntity testBodyWithQueryParams( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, - @ApiParam(value = "", required = true) @Valid @RequestBody User user + @ApiParam(value = "", required = true) @RequestParam(value = "query") @NotNull String query, + @ApiParam(value = "", required = true) @RequestBody @NotNull @Valid User user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -335,7 +335,7 @@ default ResponseEntity testBodyWithQueryParams( ) default ResponseEntity testClientModel( - @ApiParam(value = "client model", required = true) @Valid @RequestBody Client client + @ApiParam(value = "client model", required = true) @RequestBody @NotNull @Valid Client client ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -392,20 +392,20 @@ default ResponseEntity testClientModel( ) default ResponseEntity testEndpointParameters( - @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "number", required = true) BigDecimal number, - @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "double", required = true) Double _double, - @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, - @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "byte", required = true) byte[] _byte, - @ApiParam(value = "None") @Valid @RequestParam(value = "integer", required = false) Integer integer, - @ApiParam(value = "None") @Valid @RequestParam(value = "int32", required = false) Integer int32, - @ApiParam(value = "None") @Valid @RequestParam(value = "int64", required = false) Long int64, - @ApiParam(value = "None") @Valid @RequestParam(value = "float", required = false) Float _float, - @ApiParam(value = "None") @Valid @RequestParam(value = "string", required = false) String string, + @ApiParam(value = "None", required = true) @RequestParam(value = "number") @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal number, + @ApiParam(value = "None", required = true) @RequestParam(value = "double") @NotNull @DecimalMin("67.8") @DecimalMax("123.4") Double _double, + @ApiParam(value = "None", required = true) @RequestParam(value = "pattern_without_delimiter") @NotNull @Pattern(regexp = "^[A-Z].*") String patternWithoutDelimiter, + @ApiParam(value = "None", required = true) @RequestParam(value = "byte") @NotNull byte[] _byte, + @ApiParam(value = "None") @RequestParam(value = "integer", required = false) @Min(10) @Max(100) Integer integer, + @ApiParam(value = "None") @RequestParam(value = "int32", required = false) @Min(20) @Max(200) Integer int32, + @ApiParam(value = "None") @RequestParam(value = "int64", required = false) Long int64, + @ApiParam(value = "None") @RequestParam(value = "float", required = false) @DecimalMax("987.6") Float _float, + @ApiParam(value = "None") @RequestParam(value = "string", required = false) @Pattern(regexp = "/[a-z]/i") String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @ApiParam(value = "None") @Valid @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, - @ApiParam(value = "None") @Valid @RequestParam(value = "password", required = false) String password, - @ApiParam(value = "None") @Valid @RequestParam(value = "callback", required = false) String paramCallback + @ApiParam(value = "None") @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @RequestParam(value = "password", required = false) @Size(min = 10, max = 64) String password, + @ApiParam(value = "None") @RequestParam(value = "callback", required = false) String paramCallback ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -444,14 +444,14 @@ default ResponseEntity testEndpointParameters( ) default ResponseEntity testEnumParameters( - @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, - @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, - @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, - @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, - @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString + @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestParam(value = "enum_form_string", required = false) String enumFormString ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -485,12 +485,12 @@ default ResponseEntity testEnumParameters( ) default ResponseEntity testGroupParameters( - @NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @ApiParam(value = "Required String in group parameters", required = true) @RequestParam(value = "required_string_group") @NotNull Integer requiredStringGroup, @NotNull @ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, - @NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, - @ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup, + @ApiParam(value = "Required Integer in group parameters", required = true) @RequestParam(value = "required_int64_group") @NotNull Long requiredInt64Group, + @ApiParam(value = "String in group parameters") @RequestParam(value = "string_group", required = false) Integer stringGroup, @ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup, - @ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + @ApiParam(value = "Integer in group parameters") @RequestParam(value = "int64_group", required = false) Long int64Group ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -520,7 +520,7 @@ default ResponseEntity testGroupParameters( ) default ResponseEntity testInlineAdditionalProperties( - @ApiParam(value = "request body", required = true) @Valid @RequestBody Map requestBody + @ApiParam(value = "request body", required = true) @RequestBody @NotNull Map requestBody ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -551,8 +551,8 @@ default ResponseEntity testInlineAdditionalProperties( ) default ResponseEntity testJsonFormData( - @ApiParam(value = "field1", required = true) @Valid @RequestParam(value = "param", required = true) String param, - @ApiParam(value = "field2", required = true) @Valid @RequestParam(value = "param2", required = true) String param2 + @ApiParam(value = "field1", required = true) @RequestParam(value = "param") @NotNull String param, + @ApiParam(value = "field2", required = true) @RequestParam(value = "param2") @NotNull String param2 ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -582,7 +582,7 @@ default ResponseEntity testJsonFormData( ) default ResponseEntity testNullable( - @ApiParam(value = "request body", required = true) @Valid @RequestBody ChildWithNullable childWithNullable + @ApiParam(value = "request body", required = true) @RequestBody @NotNull @Valid ChildWithNullable childWithNullable ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -614,10 +614,10 @@ default ResponseEntity testNullable( ) default ResponseEntity testQueryParameterCollectionFormat( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + @ApiParam(value = "", required = true) @RequestParam(value = "pipe") @NotNull List pipe, + @ApiParam(value = "", required = true) @RequestParam(value = "http") @NotNull List http, + @ApiParam(value = "", required = true) @RequestParam(value = "url") @NotNull List url, + @ApiParam(value = "", required = true) @RequestParam(value = "context") @NotNull List context ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -696,9 +696,9 @@ default ResponseEntity testWithResultExample( ) default ResponseEntity uploadFileWithRequiredFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, - @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, - @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") @NotNull Long petId, + @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile") MultipartFile requiredFile, + @ApiParam(value = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 6230e1d2c4fc..106e805c95ba 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -59,7 +59,7 @@ default Optional getRequest() { ) default ResponseEntity testClassname( - @ApiParam(value = "client model", required = true) @Valid @RequestBody Client client + @ApiParam(value = "client model", required = true) @RequestBody @NotNull @Valid Client client ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java index e4d4585001de..ea9f10fb49a1 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java @@ -64,7 +64,7 @@ default Optional getRequest() { ) default ResponseEntity addPet( - @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet pet ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -102,7 +102,7 @@ default ResponseEntity addPet( ) default ResponseEntity deletePet( - @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") @NotNull Long petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -124,7 +124,7 @@ default ResponseEntity deletePet( nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, - responseContainer = "List", + responseContainer = "array", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @@ -133,7 +133,7 @@ default ResponseEntity deletePet( } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "array"), @ApiResponse(code = 400, message = "Invalid status value") }) @RequestMapping( @@ -143,7 +143,7 @@ default ResponseEntity deletePet( ) default ResponseEntity> findPetsByStatus( - @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status + @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @RequestParam(value = "status") @NotNull List status ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -180,7 +180,7 @@ default ResponseEntity> findPetsByStatus( nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, - responseContainer = "Set", + responseContainer = "set", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @@ -189,7 +189,7 @@ default ResponseEntity> findPetsByStatus( } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "Set"), + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "set"), @ApiResponse(code = 400, message = "Invalid tag value") }) @RequestMapping( @@ -199,7 +199,7 @@ default ResponseEntity> findPetsByStatus( ) default ResponseEntity> findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags + @ApiParam(value = "Tags to filter by", required = true) @RequestParam(value = "tags") @NotNull Set tags ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -251,7 +251,7 @@ default ResponseEntity> findPetsByTags( ) default ResponseEntity getPetById( - @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") @NotNull Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -307,7 +307,7 @@ default ResponseEntity getPetById( ) default ResponseEntity updatePet( - @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet pet ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -345,9 +345,9 @@ default ResponseEntity updatePet( ) default ResponseEntity updatePetWithForm( - @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, - @ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, - @ApiParam(value = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status + @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") @NotNull Long petId, + @ApiParam(value = "Updated name of the pet") @RequestParam(value = "name", required = false) String name, + @ApiParam(value = "Updated status of the pet") @RequestParam(value = "status", required = false) String status ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -387,8 +387,8 @@ default ResponseEntity updatePetWithForm( ) default ResponseEntity uploadFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, - @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") @NotNull Long petId, + @ApiParam(value = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) { getRequest().ifPresent(request -> { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java index 5ecfb9933b71..297a887e3eb5 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java @@ -56,7 +56,7 @@ default Optional getRequest() { ) default ResponseEntity deleteOrder( - @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") @NotNull String orderId ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -75,13 +75,13 @@ default ResponseEntity deleteOrder( nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, - responseContainer = "Map", + responseContainer = "map", authorizations = { @Authorization(value = "api_key") } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "map") }) @RequestMapping( method = RequestMethod.GET, @@ -125,7 +125,7 @@ default ResponseEntity> getInventory( ) default ResponseEntity getOrderById( - @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") @NotNull @Min(1L) @Max(5L) Long orderId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -173,7 +173,7 @@ default ResponseEntity getOrderById( ) default ResponseEntity placeOrder( - @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order + @ApiParam(value = "order placed for purchasing the pet", required = true) @RequestBody @NotNull @Valid Order order ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java index 3f247fb6c71e..0fbf78a7e6b7 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java @@ -55,7 +55,7 @@ default Optional getRequest() { ) default ResponseEntity createUser( - @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User user + @ApiParam(value = "Created user object", required = true) @RequestBody @NotNull @Valid User user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -85,7 +85,7 @@ default ResponseEntity createUser( ) default ResponseEntity createUsersWithArrayInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + @ApiParam(value = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -115,7 +115,7 @@ default ResponseEntity createUsersWithArrayInput( ) default ResponseEntity createUsersWithListInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + @ApiParam(value = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -146,7 +146,7 @@ default ResponseEntity createUsersWithListInput( ) default ResponseEntity deleteUser( - @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") @NotNull String username ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -181,7 +181,7 @@ default ResponseEntity deleteUser( ) default ResponseEntity getUserByName( - @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") @NotNull String username ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -229,8 +229,8 @@ default ResponseEntity getUserByName( ) default ResponseEntity loginUser( - @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, - @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + @ApiParam(value = "The user name for login", required = true) @RequestParam(value = "username") @NotNull String username, + @ApiParam(value = "The password for login in clear text", required = true) @RequestParam(value = "password") @NotNull String password ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -291,8 +291,8 @@ default ResponseEntity logoutUser( ) default ResponseEntity updateUser( - @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, - @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User user + @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") @NotNull String username, + @ApiParam(value = "Updated user object", required = true) @RequestBody @NotNull @Valid User user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index cf57def58490..291e57234974 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -37,7 +37,6 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index dc535ab3e476..f3b2cfe986ca 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -38,7 +38,6 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -126,4 +125,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 4d4bef3fde91..79708a257b1e 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -37,7 +37,6 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 4b872401a006..c4e2810100bb 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -29,33 +29,25 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class AdditionalPropertiesClass { - @Valid private Map mapString = new HashMap<>(); - @Valid private Map mapNumber = new HashMap<>(); - @Valid private Map mapInteger = new HashMap<>(); - @Valid private Map mapBoolean = new HashMap<>(); - @Valid private Map> mapArrayInteger = new HashMap<>(); - @Valid private Map> mapArrayAnytype = new HashMap<>(); - @Valid private Map> mapMapString = new HashMap<>(); - @Valid private Map> mapMapAnytype = new HashMap<>(); private Object anytype1; - private JsonNullable anytype2 = JsonNullable.undefined(); + private JsonNullable anytype2 = JsonNullable.of(null); private Object anytype3; @@ -76,7 +68,6 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ - @ApiModelProperty(value = "") @JsonProperty("map_string") public Map getMapString() { @@ -104,7 +95,6 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("map_number") public Map getMapNumber() { @@ -132,7 +122,6 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ - @ApiModelProperty(value = "") @JsonProperty("map_integer") public Map getMapInteger() { @@ -160,7 +149,6 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ - @ApiModelProperty(value = "") @JsonProperty("map_boolean") public Map getMapBoolean() { @@ -188,7 +176,6 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { @@ -216,7 +203,6 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ - @Valid @ApiModelProperty(value = "") @JsonProperty("map_array_anytype") public Map> getMapArrayAnytype() { @@ -244,7 +230,6 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { @@ -272,7 +257,6 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { @@ -292,7 +276,6 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ - @ApiModelProperty(value = "") @JsonProperty("anytype_1") public Object getAnytype1() { @@ -303,8 +286,8 @@ public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; } - public AdditionalPropertiesClass anytype2(Object anytype2) { - this.anytype2 = JsonNullable.of(anytype2); + public AdditionalPropertiesClass anytype2(JsonNullable anytype2) { + this.anytype2 = anytype2; return this; } @@ -312,7 +295,6 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ - @ApiModelProperty(value = "") @JsonProperty("anytype_2") public JsonNullable getAnytype2() { @@ -332,7 +314,6 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ - @ApiModelProperty(value = "") @JsonProperty("anytype_3") public Object getAnytype3() { @@ -411,4 +392,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index e8e32dcd7fa9..f12948a1c898 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -37,7 +37,6 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 50fa525424d3..f31c0d0cd9b2 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -38,7 +38,6 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -126,4 +125,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index b2ca3bf5cb02..98e9b7b1a12a 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -38,7 +38,6 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -126,4 +125,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 7e085a44c93d..822b5e79b89f 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -37,7 +37,6 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Animal.java index 5d5fcd5dc18a..d9908d33fa2f 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Animal.java @@ -36,7 +36,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class Animal { - private String className; + private @NotNull String className; private String color = "red"; @@ -60,10 +60,9 @@ public Animal className(String className) { * Get className * @return className */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("className") - public String getClassName() { + public @NotNull String getClassName() { return className; } @@ -80,7 +79,6 @@ public Animal color(String color) { * Get color * @return color */ - @ApiModelProperty(value = "") @JsonProperty("color") public String getColor() { @@ -130,4 +128,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 621c01be49ce..249d0bc72466 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnly { - @Valid private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { @@ -46,7 +45,6 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("ArrayArrayNumber") public List> getArrayArrayNumber() { @@ -94,4 +92,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 3f519bbb9baa..58b3ee1a3bcf 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayOfNumberOnly { - @Valid private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnly arrayNumber(List arrayNumber) { @@ -46,7 +45,6 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("ArrayNumber") public List getArrayNumber() { @@ -94,4 +92,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayTest.java index 382556e65bd6..20402ebb213f 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayTest.java @@ -26,13 +26,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayTest { - @Valid private List arrayOfString = new ArrayList<>(); - @Valid private List> arrayArrayOfInteger = new ArrayList<>(); - @Valid private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTest arrayOfString(List arrayOfString) { @@ -52,7 +49,6 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ - @ApiModelProperty(value = "") @JsonProperty("array_of_string") public List getArrayOfString() { @@ -80,7 +76,6 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ - @Valid @ApiModelProperty(value = "") @JsonProperty("array_array_of_integer") public List> getArrayArrayOfInteger() { @@ -91,12 +86,12 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } - public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) { + public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { if (this.arrayArrayOfModel == null) { this.arrayArrayOfModel = new ArrayList<>(); } @@ -108,14 +103,13 @@ public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayO * Get arrayArrayOfModel * @return arrayArrayOfModel */ - @Valid @ApiModelProperty(value = "") @JsonProperty("array_array_of_model") public List> getArrayArrayOfModel() { return arrayArrayOfModel; } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { + public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } @@ -160,4 +154,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCat.java index 4e7739fe3ab2..c9bbc0145339 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCat.java @@ -67,7 +67,7 @@ public static KindEnum fromValue(String value) { } } - private KindEnum kind; + private String kind; public BigCat() { super(); @@ -89,10 +89,9 @@ public BigCat kind(KindEnum kind) { * Get kind * @return kind */ - @ApiModelProperty(value = "") @JsonProperty("kind") - public KindEnum getKind() { + public String getKind() { return kind; } @@ -154,4 +153,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Capitalization.java index d6e8a694cf85..f9226321c070 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Capitalization.java @@ -43,7 +43,6 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ - @ApiModelProperty(value = "") @JsonProperty("smallCamel") public String getSmallCamel() { @@ -63,7 +62,6 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ - @ApiModelProperty(value = "") @JsonProperty("CapitalCamel") public String getCapitalCamel() { @@ -83,7 +81,6 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ - @ApiModelProperty(value = "") @JsonProperty("small_Snake") public String getSmallSnake() { @@ -103,7 +100,6 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ - @ApiModelProperty(value = "") @JsonProperty("Capital_Snake") public String getCapitalSnake() { @@ -123,7 +119,6 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ - @ApiModelProperty(value = "") @JsonProperty("SCA_ETH_Flow_Points") public String getScAETHFlowPoints() { @@ -143,7 +138,6 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ - @ApiModelProperty(value = "Name of the pet ") @JsonProperty("ATT_NAME") public String getATTNAME() { @@ -201,4 +195,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Cat.java index d8932f6402ef..1bf1e602454d 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Cat.java @@ -57,7 +57,6 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ - @ApiModelProperty(value = "") @JsonProperty("declawed") public Boolean getDeclawed() { @@ -117,4 +116,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Category.java index a7d5b6e5916d..04e9b386ebbe 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Category.java @@ -24,7 +24,7 @@ public class Category { private Long id; - private String name = "default-name"; + private @NotNull String name = "default-name"; public Category() { super(); @@ -46,7 +46,6 @@ public Category id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -66,10 +65,9 @@ public Category name(String name) { * Get name * @return name */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -116,4 +114,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ChildWithNullable.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ChildWithNullable.java index 2609d3eb0201..4738e7f310b9 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ChildWithNullable.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ChildWithNullable.java @@ -41,7 +41,6 @@ public ChildWithNullable otherProperty(String otherProperty) { * Get otherProperty * @return otherProperty */ - @ApiModelProperty(value = "") @JsonProperty("otherProperty") public String getOtherProperty() { @@ -58,7 +57,7 @@ public ChildWithNullable type(TypeEnum type) { return this; } - public ChildWithNullable nullableProperty(String nullableProperty) { + public ChildWithNullable nullableProperty(JsonNullable nullableProperty) { super.nullableProperty(nullableProperty); return this; } @@ -112,4 +111,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ClassModel.java index 56aeaf340f38..508e179a1a9e 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ClassModel.java @@ -34,7 +34,6 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @ApiModelProperty(value = "") @JsonProperty("_class") public String getPropertyClass() { @@ -82,4 +81,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Client.java index 23491ea29e60..0463c48505d8 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Client.java @@ -33,7 +33,6 @@ public Client client(String client) { * Get client * @return client */ - @ApiModelProperty(value = "") @JsonProperty("client") public String getClient() { @@ -81,4 +80,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ContainerDefaultValue.java index c446f8d55e8a..33befb6282cb 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ContainerDefaultValue.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -27,17 +27,13 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ContainerDefaultValue { - @Valid - private JsonNullable> nullableArray = JsonNullable.>undefined(); + private JsonNullable> nullableArray = JsonNullable.undefined(); - @Valid - private JsonNullable> nullableRequiredArray = JsonNullable.>undefined(); + private JsonNullable> nullableRequiredArray = JsonNullable.undefined(); - @Valid - private List requiredArray = new ArrayList<>(); + private @NotNull List requiredArray = new ArrayList<>(); - @Valid - private JsonNullable> nullableArrayWithDefault = JsonNullable.>undefined(); + private JsonNullable> nullableArrayWithDefault = JsonNullable.of(new ArrayList<>(Arrays.asList("foo", "bar"))); public ContainerDefaultValue() { super(); @@ -46,13 +42,13 @@ public ContainerDefaultValue() { /** * Constructor with only required parameters */ - public ContainerDefaultValue(List nullableRequiredArray, List requiredArray) { - this.nullableRequiredArray = JsonNullable.of(nullableRequiredArray); + public ContainerDefaultValue(JsonNullable> nullableRequiredArray, List requiredArray) { + this.nullableRequiredArray = nullableRequiredArray; this.requiredArray = requiredArray; } - public ContainerDefaultValue nullableArray(List nullableArray) { - this.nullableArray = JsonNullable.of(nullableArray); + public ContainerDefaultValue nullableArray(JsonNullable> nullableArray) { + this.nullableArray = nullableArray; return this; } @@ -68,7 +64,6 @@ public ContainerDefaultValue addNullableArrayItem(String nullableArrayItem) { * Get nullableArray * @return nullableArray */ - @ApiModelProperty(value = "") @JsonProperty("nullable_array") public JsonNullable> getNullableArray() { @@ -79,8 +74,8 @@ public void setNullableArray(JsonNullable> nullableArray) { this.nullableArray = nullableArray; } - public ContainerDefaultValue nullableRequiredArray(List nullableRequiredArray) { - this.nullableRequiredArray = JsonNullable.of(nullableRequiredArray); + public ContainerDefaultValue nullableRequiredArray(JsonNullable> nullableRequiredArray) { + this.nullableRequiredArray = nullableRequiredArray; return this; } @@ -96,7 +91,6 @@ public ContainerDefaultValue addNullableRequiredArrayItem(String nullableRequire * Get nullableRequiredArray * @return nullableRequiredArray */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("nullable_required_array") public JsonNullable> getNullableRequiredArray() { @@ -124,10 +118,9 @@ public ContainerDefaultValue addRequiredArrayItem(String requiredArrayItem) { * Get requiredArray * @return requiredArray */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("required_array") - public List getRequiredArray() { + public @NotNull List getRequiredArray() { return requiredArray; } @@ -135,8 +128,8 @@ public void setRequiredArray(List requiredArray) { this.requiredArray = requiredArray; } - public ContainerDefaultValue nullableArrayWithDefault(List nullableArrayWithDefault) { - this.nullableArrayWithDefault = JsonNullable.of(nullableArrayWithDefault); + public ContainerDefaultValue nullableArrayWithDefault(JsonNullable> nullableArrayWithDefault) { + this.nullableArrayWithDefault = nullableArrayWithDefault; return this; } @@ -152,7 +145,6 @@ public ContainerDefaultValue addNullableArrayWithDefaultItem(String nullableArra * Get nullableArrayWithDefault * @return nullableArrayWithDefault */ - @ApiModelProperty(value = "") @JsonProperty("nullable_array_with_default") public JsonNullable> getNullableArrayWithDefault() { @@ -217,4 +209,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Dog.java index bef3e5409a8e..d4656db2ef88 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Dog.java @@ -49,7 +49,6 @@ public Dog breed(String breed) { * Get breed * @return breed */ - @ApiModelProperty(value = "") @JsonProperty("breed") public String getBreed() { @@ -109,4 +108,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumArrays.java index 5bed35014d25..4a80b3b0ffe9 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumArrays.java @@ -61,7 +61,7 @@ public static JustSymbolEnum fromValue(String value) { } } - private JustSymbolEnum justSymbol; + private String justSymbol; /** * Gets or Sets arrayEnum @@ -98,8 +98,7 @@ public static ArrayEnumEnum fromValue(String value) { } } - @Valid - private List arrayEnum = new ArrayList<>(); + private List arrayEnum = new ArrayList<>(); public EnumArrays justSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; @@ -110,10 +109,9 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ - @ApiModelProperty(value = "") @JsonProperty("just_symbol") - public JustSymbolEnum getJustSymbol() { + public String getJustSymbol() { return justSymbol; } @@ -138,10 +136,9 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ - @ApiModelProperty(value = "") @JsonProperty("array_enum") - public List getArrayEnum() { + public List getArrayEnum() { return arrayEnum; } @@ -188,4 +185,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumTest.java index 2865d76ab8bf..8e3d8978857c 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumTest.java @@ -63,7 +63,7 @@ public static EnumStringEnum fromValue(String value) { } } - private EnumStringEnum enumString; + private String enumString; /** * Gets or Sets enumStringRequired @@ -102,7 +102,7 @@ public static EnumStringRequiredEnum fromValue(String value) { } } - private EnumStringRequiredEnum enumStringRequired; + private @NotNull String enumStringRequired; /** * Gets or Sets enumInteger @@ -139,7 +139,7 @@ public static EnumIntegerEnum fromValue(Integer value) { } } - private EnumIntegerEnum enumInteger; + private Integer enumInteger; /** * Gets or Sets enumNumber @@ -176,7 +176,7 @@ public static EnumNumberEnum fromValue(Double value) { } } - private EnumNumberEnum enumNumber; + private Double enumNumber; private OuterEnum outerEnum; @@ -200,10 +200,9 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ - @ApiModelProperty(value = "") @JsonProperty("enum_string") - public EnumStringEnum getEnumString() { + public String getEnumString() { return enumString; } @@ -220,10 +219,9 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("enum_string_required") - public EnumStringRequiredEnum getEnumStringRequired() { + public @NotNull String getEnumStringRequired() { return enumStringRequired; } @@ -240,10 +238,9 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ - @ApiModelProperty(value = "") @JsonProperty("enum_integer") - public EnumIntegerEnum getEnumInteger() { + public Integer getEnumInteger() { return enumInteger; } @@ -260,10 +257,9 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ - @ApiModelProperty(value = "") @JsonProperty("enum_number") - public EnumNumberEnum getEnumNumber() { + public Double getEnumNumber() { return enumNumber; } @@ -280,7 +276,6 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ - @Valid @ApiModelProperty(value = "") @JsonProperty("outerEnum") public OuterEnum getOuterEnum() { @@ -336,4 +331,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/File.java index 6e16961c2d2f..cd9f95a6f91c 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/File.java @@ -34,7 +34,6 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ - @ApiModelProperty(value = "Test capitalization") @JsonProperty("sourceURI") public String getSourceURI() { @@ -82,4 +81,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 9a40dbd168af..0c2d51df5822 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -26,9 +26,8 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class FileSchemaTestClass { - private File file; + private @Valid File file; - @Valid private List<@Valid File> files = new ArrayList<>(); public FileSchemaTestClass file(File file) { @@ -40,10 +39,9 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ - @Valid @ApiModelProperty(value = "") @JsonProperty("file") - public File getFile() { + public @Valid File getFile() { return file; } @@ -51,7 +49,7 @@ public void setFile(File file) { this.file = file; } - public FileSchemaTestClass files(List<@Valid File> files) { + public FileSchemaTestClass files(List files) { this.files = files; return this; } @@ -68,14 +66,13 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ - @Valid @ApiModelProperty(value = "") @JsonProperty("files") public List<@Valid File> getFiles() { return files; } - public void setFiles(List<@Valid File> files) { + public void setFiles(List files) { this.files = files; } @@ -118,4 +115,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FormatTest.java index fda969ad06d3..fa150f1fa069 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FormatTest.java @@ -30,33 +30,33 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class FormatTest { - private Integer integer; + private @Min(10) @Max(100) Integer integer; - private Integer int32; + private @Min(20) @Max(200) Integer int32; private Long int64; - private BigDecimal number; + private @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal number; - private Float _float; + private @DecimalMin("54.3") @DecimalMax("987.6") Float _float; - private Double _double; + private @DecimalMin("67.8") @DecimalMax("123.4") Double _double; - private String string; + private @Pattern(regexp = "/[a-z]/i") String string; - private byte[] _byte; + private @NotNull byte[] _byte; private org.springframework.core.io.Resource binary; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) - private LocalDate date; + private @NotNull LocalDate date; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; private UUID uuid; - private String password; + private @NotNull @Size(min = 10, max = 64) String password; private BigDecimal bigDecimal; @@ -85,10 +85,9 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ - @Min(10) @Max(100) @ApiModelProperty(value = "") @JsonProperty("integer") - public Integer getInteger() { + public @Min(10) @Max(100) Integer getInteger() { return integer; } @@ -107,10 +106,9 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ - @Min(20) @Max(200) @ApiModelProperty(value = "") @JsonProperty("int32") - public Integer getInt32() { + public @Min(20) @Max(200) Integer getInt32() { return int32; } @@ -127,7 +125,6 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ - @ApiModelProperty(value = "") @JsonProperty("int64") public Long getInt64() { @@ -149,10 +146,9 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ - @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(required = true, value = "") @JsonProperty("number") - public BigDecimal getNumber() { + public @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal getNumber() { return number; } @@ -171,10 +167,9 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ - @DecimalMin("54.3") @DecimalMax("987.6") @ApiModelProperty(value = "") @JsonProperty("float") - public Float getFloat() { + public @DecimalMin("54.3") @DecimalMax("987.6") Float getFloat() { return _float; } @@ -193,10 +188,9 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ - @DecimalMin("67.8") @DecimalMax("123.4") @ApiModelProperty(value = "") @JsonProperty("double") - public Double getDouble() { + public @DecimalMin("67.8") @DecimalMax("123.4") Double getDouble() { return _double; } @@ -213,10 +207,9 @@ public FormatTest string(String string) { * Get string * @return string */ - @Pattern(regexp = "/[a-z]/i") @ApiModelProperty(value = "") @JsonProperty("string") - public String getString() { + public @Pattern(regexp = "/[a-z]/i") String getString() { return string; } @@ -233,10 +226,9 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("byte") - public byte[] getByte() { + public @NotNull byte[] getByte() { return _byte; } @@ -253,7 +245,6 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ - @Valid @ApiModelProperty(value = "") @JsonProperty("binary") public org.springframework.core.io.Resource getBinary() { @@ -273,10 +264,9 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ - @NotNull @Valid @ApiModelProperty(required = true, value = "") @JsonProperty("date") - public LocalDate getDate() { + public @NotNull LocalDate getDate() { return date; } @@ -293,7 +283,6 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ - @Valid @ApiModelProperty(value = "") @JsonProperty("dateTime") public OffsetDateTime getDateTime() { @@ -313,7 +302,6 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ - @Valid @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") @JsonProperty("uuid") public UUID getUuid() { @@ -333,10 +321,9 @@ public FormatTest password(String password) { * Get password * @return password */ - @NotNull @Size(min = 10, max = 64) @ApiModelProperty(required = true, value = "") @JsonProperty("password") - public String getPassword() { + public @NotNull @Size(min = 10, max = 64) String getPassword() { return password; } @@ -353,7 +340,6 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ - @Valid @ApiModelProperty(value = "") @JsonProperty("BigDecimal") public BigDecimal getBigDecimal() { @@ -427,4 +413,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 27ea04eaa86c..628772ab47fe 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -37,7 +37,6 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("bar") public String getBar() { @@ -57,7 +56,6 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("foo") public String getFoo() { @@ -107,4 +105,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MapTest.java index bd3eea6e64df..a060e9d647a7 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MapTest.java @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class MapTest { - @Valid private Map> mapMapOfString = new HashMap<>(); /** @@ -63,13 +62,10 @@ public static InnerEnum fromValue(String value) { } } - @Valid - private Map mapOfEnumString = new HashMap<>(); + private Map mapOfEnumString = new HashMap<>(); - @Valid private Map directMap = new HashMap<>(); - @Valid private Map indirectMap = new HashMap<>(); public MapTest mapMapOfString(Map> mapMapOfString) { @@ -89,7 +85,6 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ - @Valid @ApiModelProperty(value = "") @JsonProperty("map_map_of_string") public Map> getMapMapOfString() { @@ -117,10 +112,9 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ - @ApiModelProperty(value = "") @JsonProperty("map_of_enum_string") - public Map getMapOfEnumString() { + public Map getMapOfEnumString() { return mapOfEnumString; } @@ -145,7 +139,6 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ - @ApiModelProperty(value = "") @JsonProperty("direct_map") public Map getDirectMap() { @@ -173,7 +166,6 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ - @ApiModelProperty(value = "") @JsonProperty("indirect_map") public Map getIndirectMap() { @@ -227,4 +219,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index b16370183e0a..0ecca046c869 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -33,8 +33,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; - @Valid - private Map map = new HashMap<>(); + private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { this.uuid = uuid; @@ -45,7 +44,6 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ - @Valid @ApiModelProperty(value = "") @JsonProperty("uuid") public UUID getUuid() { @@ -65,7 +63,6 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ - @Valid @ApiModelProperty(value = "") @JsonProperty("dateTime") public OffsetDateTime getDateTime() { @@ -93,10 +90,9 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ - @Valid @ApiModelProperty(value = "") @JsonProperty("map") - public Map getMap() { + public Map getMap() { return map; } @@ -145,4 +141,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Model200Response.java index 4922749da22c..6f4b8460e6f4 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Model200Response.java @@ -38,7 +38,6 @@ public Model200Response name(Integer name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public Integer getName() { @@ -58,7 +57,6 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @ApiModelProperty(value = "") @JsonProperty("class") public String getPropertyClass() { @@ -108,4 +106,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelApiResponse.java index 21244266ad17..31642652231b 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -39,7 +39,6 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @ApiModelProperty(value = "") @JsonProperty("code") public Integer getCode() { @@ -59,7 +58,6 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @ApiModelProperty(value = "") @JsonProperty("type") public String getType() { @@ -79,7 +77,6 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @ApiModelProperty(value = "") @JsonProperty("message") public String getMessage() { @@ -131,4 +128,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelList.java index d3d66db5c095..b9dc65977c53 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelList.java @@ -35,7 +35,6 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ - @ApiModelProperty(value = "") @JsonProperty("123-list") public String get123list() { @@ -83,4 +82,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelReturn.java index 2c8a25a4d85f..72d78cb7fc0b 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelReturn.java @@ -36,7 +36,6 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ - @ApiModelProperty(value = "") @JsonProperty("return") public Integer getReturn() { @@ -84,4 +83,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Name.java index 420c565a9955..f42d379c1083 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Name.java @@ -23,7 +23,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class Name { - private Integer name; + private @NotNull Integer name; private Integer snakeCase; @@ -51,10 +51,9 @@ public Name name(Integer name) { * Get name * @return name */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("name") - public Integer getName() { + public @NotNull Integer getName() { return name; } @@ -71,7 +70,6 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("snake_case") public Integer getSnakeCase() { @@ -91,7 +89,6 @@ public Name property(String property) { * Get property * @return property */ - @ApiModelProperty(value = "") @JsonProperty("property") public String getProperty() { @@ -111,7 +108,6 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("123Number") public Integer get123number() { @@ -165,4 +161,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/NullableMapProperty.java index cc44c57fdd1a..8a5f0b99081e 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/NullableMapProperty.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -27,11 +27,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class NullableMapProperty { - @Valid - private JsonNullable> languageValues = JsonNullable.>undefined(); + private JsonNullable> languageValues = JsonNullable.undefined(); - public NullableMapProperty languageValues(Map languageValues) { - this.languageValues = JsonNullable.of(languageValues); + public NullableMapProperty languageValues(JsonNullable> languageValues) { + this.languageValues = languageValues; return this; } @@ -47,7 +46,6 @@ public NullableMapProperty putLanguageValuesItem(String key, String languageValu * Get languageValues * @return languageValues */ - @ApiModelProperty(value = "") @JsonProperty("languageValues") public JsonNullable> getLanguageValues() { @@ -106,4 +104,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/NumberOnly.java index 69de58b11374..eb57c97846a2 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/NumberOnly.java @@ -34,7 +34,6 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("JustNumber") public BigDecimal getJustNumber() { @@ -82,4 +81,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Order.java index 48932f68f862..6b84d7a0c4b4 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Order.java @@ -71,7 +71,7 @@ public static StatusEnum fromValue(String value) { } } - private StatusEnum status; + private String status; private Boolean complete = false; @@ -84,7 +84,6 @@ public Order id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -104,7 +103,6 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @ApiModelProperty(value = "") @JsonProperty("petId") public Long getPetId() { @@ -124,7 +122,6 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @ApiModelProperty(value = "") @JsonProperty("quantity") public Integer getQuantity() { @@ -144,7 +141,6 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Valid @ApiModelProperty(value = "") @JsonProperty("shipDate") public OffsetDateTime getShipDate() { @@ -164,10 +160,9 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @ApiModelProperty(value = "Order Status") @JsonProperty("status") - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -184,7 +179,6 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @ApiModelProperty(value = "") @JsonProperty("complete") public Boolean getComplete() { @@ -242,4 +236,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterComposite.java index 2e78c0586cab..2bfc1db21bb2 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterComposite.java @@ -38,7 +38,6 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("my_number") public BigDecimal getMyNumber() { @@ -58,7 +57,6 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ - @ApiModelProperty(value = "") @JsonProperty("my_string") public String getMyString() { @@ -78,7 +76,6 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ - @ApiModelProperty(value = "") @JsonProperty("my_boolean") public Boolean getMyBoolean() { @@ -130,4 +127,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ParentWithNullable.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ParentWithNullable.java index 893ed74ce711..94f35cbaf971 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ParentWithNullable.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ParentWithNullable.java @@ -71,9 +71,9 @@ public static TypeEnum fromValue(String value) { } } - private TypeEnum type; + private String type; - private JsonNullable nullableProperty = JsonNullable.undefined(); + private JsonNullable nullableProperty = JsonNullable.undefined(); public ParentWithNullable type(TypeEnum type) { this.type = type; @@ -84,10 +84,9 @@ public ParentWithNullable type(TypeEnum type) { * Get type * @return type */ - @ApiModelProperty(value = "") @JsonProperty("type") - public TypeEnum getType() { + public String getType() { return type; } @@ -95,8 +94,8 @@ public void setType(TypeEnum type) { this.type = type; } - public ParentWithNullable nullableProperty(String nullableProperty) { - this.nullableProperty = JsonNullable.of(nullableProperty); + public ParentWithNullable nullableProperty(JsonNullable nullableProperty) { + this.nullableProperty = nullableProperty; return this; } @@ -104,7 +103,6 @@ public ParentWithNullable nullableProperty(String nullableProperty) { * Get nullableProperty * @return nullableProperty */ - @ApiModelProperty(value = "") @JsonProperty("nullableProperty") public JsonNullable getNullableProperty() { @@ -165,4 +163,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java index 67242095aeba..3ac00f4958c1 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java @@ -33,14 +33,12 @@ public class Pet { private Long id; - private Category category; + private @Valid Category category; - private String name; + private @NotNull String name; - @Valid - private Set photoUrls = new LinkedHashSet<>(); + private @NotNull Set photoUrls = new LinkedHashSet<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** @@ -81,7 +79,7 @@ public static StatusEnum fromValue(String value) { } @Deprecated - private StatusEnum status; + private String status; public Pet() { super(); @@ -104,7 +102,6 @@ public Pet id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -124,10 +121,9 @@ public Pet category(Category category) { * Get category * @return category */ - @Valid @ApiModelProperty(value = "") @JsonProperty("category") - public Category getCategory() { + public @Valid Category getCategory() { return category; } @@ -144,10 +140,9 @@ public Pet name(String name) { * Get name * @return name */ - @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -172,10 +167,9 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("photoUrls") - public Set getPhotoUrls() { + public @NotNull Set getPhotoUrls() { return photoUrls; } @@ -184,7 +178,7 @@ public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List<@Valid Tag> tags) { + public Pet tags(List tags) { this.tags = tags; return this; } @@ -201,14 +195,13 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Valid @ApiModelProperty(value = "") @JsonProperty("tags") public List<@Valid Tag> getTags() { return tags; } - public void setTags(List<@Valid Tag> tags) { + public void setTags(List tags) { this.tags = tags; } @@ -222,11 +215,10 @@ public Pet status(StatusEnum status) { * @return status * @deprecated */ - @ApiModelProperty(value = "pet status in the store") @JsonProperty("status") @Deprecated - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -285,4 +277,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 9388f3cfd29f..1eee9577a877 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -35,7 +35,6 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("bar") public String getBar() { @@ -55,7 +54,6 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ - @ApiModelProperty(value = "") @JsonProperty("baz") public String getBaz() { @@ -105,4 +103,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java index 68785baf943e..fc1f3861dbc7 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java @@ -39,7 +39,6 @@ public ResponseObjectWithDifferentFieldNames normalPropertyName(String normalPro * Get normalPropertyName * @return normalPropertyName */ - @ApiModelProperty(value = "") @JsonProperty("normalPropertyName") public String getNormalPropertyName() { @@ -59,7 +58,6 @@ public ResponseObjectWithDifferentFieldNames UPPER_CASE_PROPERTY_SNAKE(String UP * Get UPPER_CASE_PROPERTY_SNAKE * @return UPPER_CASE_PROPERTY_SNAKE */ - @ApiModelProperty(value = "") @JsonProperty("UPPER_CASE_PROPERTY_SNAKE") public String getUPPERCASEPROPERTYSNAKE() { @@ -79,7 +77,6 @@ public ResponseObjectWithDifferentFieldNames lowerCasePropertyDashes(String lowe * Get lowerCasePropertyDashes * @return lowerCasePropertyDashes */ - @ApiModelProperty(value = "") @JsonProperty("lower-case-property-dashes") public String getLowerCasePropertyDashes() { @@ -99,7 +96,6 @@ public ResponseObjectWithDifferentFieldNames propertyNameWithSpaces(String prope * Get propertyNameWithSpaces * @return propertyNameWithSpaces */ - @ApiModelProperty(value = "") @JsonProperty("property name with spaces") public String getPropertyNameWithSpaces() { @@ -153,4 +149,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/SpecialModelName.java index 7f751ef4aedc..ca744d5efe00 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/SpecialModelName.java @@ -35,7 +35,6 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ - @ApiModelProperty(value = "") @JsonProperty("$special[property.name]") public Long get$SpecialPropertyName() { @@ -83,4 +82,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Tag.java index 850c68911db4..d3778890e2d6 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Tag.java @@ -35,7 +35,6 @@ public Tag id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -55,7 +54,6 @@ public Tag name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -105,4 +103,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderDefault.java index 420967a01328..d5ce2f773c46 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -26,16 +26,15 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class TypeHolderDefault { - private String stringItem = "what"; + private @NotNull String stringItem = "what"; - private BigDecimal numberItem = new BigDecimal("1.234"); + private @NotNull BigDecimal numberItem = new BigDecimal("1.234"); - private Integer integerItem = -2; + private @NotNull Integer integerItem = -2; - private Boolean boolItem = true; + private @NotNull Boolean boolItem = true; - @Valid - private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); + private @NotNull List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); public TypeHolderDefault() { super(); @@ -61,10 +60,9 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("string_item") - public String getStringItem() { + public @NotNull String getStringItem() { return stringItem; } @@ -81,10 +79,9 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @NotNull @Valid @ApiModelProperty(required = true, value = "") @JsonProperty("number_item") - public BigDecimal getNumberItem() { + public @NotNull BigDecimal getNumberItem() { return numberItem; } @@ -101,10 +98,9 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("integer_item") - public Integer getIntegerItem() { + public @NotNull Integer getIntegerItem() { return integerItem; } @@ -121,10 +117,9 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("bool_item") - public Boolean getBoolItem() { + public @NotNull Boolean getBoolItem() { return boolItem; } @@ -149,10 +144,9 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("array_item") - public List getArrayItem() { + public @NotNull List getArrayItem() { return arrayItem; } @@ -205,4 +199,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderExample.java index 909dc1e7fe60..e9b3492a4684 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -26,18 +26,17 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class TypeHolderExample { - private String stringItem; + private @NotNull String stringItem; - private BigDecimal numberItem; + private @NotNull BigDecimal numberItem; - private Float floatItem; + private @NotNull Float floatItem; - private Integer integerItem; + private @NotNull Integer integerItem; - private Boolean boolItem; + private @NotNull Boolean boolItem; - @Valid - private List arrayItem = new ArrayList<>(); + private @NotNull List arrayItem = new ArrayList<>(); public TypeHolderExample() { super(); @@ -64,10 +63,9 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @NotNull @ApiModelProperty(example = "what", required = true, value = "") @JsonProperty("string_item") - public String getStringItem() { + public @NotNull String getStringItem() { return stringItem; } @@ -84,10 +82,9 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @NotNull @Valid @ApiModelProperty(example = "1.234", required = true, value = "") @JsonProperty("number_item") - public BigDecimal getNumberItem() { + public @NotNull BigDecimal getNumberItem() { return numberItem; } @@ -104,10 +101,9 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ - @NotNull @ApiModelProperty(example = "1.234", required = true, value = "") @JsonProperty("float_item") - public Float getFloatItem() { + public @NotNull Float getFloatItem() { return floatItem; } @@ -124,10 +120,9 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @NotNull @ApiModelProperty(example = "-2", required = true, value = "") @JsonProperty("integer_item") - public Integer getIntegerItem() { + public @NotNull Integer getIntegerItem() { return integerItem; } @@ -144,10 +139,9 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @NotNull @ApiModelProperty(example = "true", required = true, value = "") @JsonProperty("bool_item") - public Boolean getBoolItem() { + public @NotNull Boolean getBoolItem() { return boolItem; } @@ -172,10 +166,9 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @NotNull @ApiModelProperty(example = "[0,1,2,3]", required = true, value = "") @JsonProperty("array_item") - public List getArrayItem() { + public @NotNull List getArrayItem() { return arrayItem; } @@ -230,4 +223,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/User.java index e46b4e9e7907..2a1878ded5d2 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/User.java @@ -47,7 +47,6 @@ public User id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -67,7 +66,6 @@ public User username(String username) { * Get username * @return username */ - @ApiModelProperty(value = "") @JsonProperty("username") public String getUsername() { @@ -87,7 +85,6 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @ApiModelProperty(value = "") @JsonProperty("firstName") public String getFirstName() { @@ -107,7 +104,6 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @ApiModelProperty(value = "") @JsonProperty("lastName") public String getLastName() { @@ -127,7 +123,6 @@ public User email(String email) { * Get email * @return email */ - @ApiModelProperty(value = "") @JsonProperty("email") public String getEmail() { @@ -147,7 +142,6 @@ public User password(String password) { * Get password * @return password */ - @ApiModelProperty(value = "") @JsonProperty("password") public String getPassword() { @@ -167,7 +161,6 @@ public User phone(String phone) { * Get phone * @return phone */ - @ApiModelProperty(value = "") @JsonProperty("phone") public String getPhone() { @@ -187,7 +180,6 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @ApiModelProperty(value = "User Status") @JsonProperty("userStatus") public Integer getUserStatus() { @@ -249,4 +241,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/XmlItem.java index b7a622a0b99e..2e676eb62e75 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/XmlItem.java @@ -34,7 +34,6 @@ public class XmlItem { private Boolean attributeBoolean; - @Valid private List wrappedArray = new ArrayList<>(); private String nameString; @@ -45,10 +44,8 @@ public class XmlItem { private Boolean nameBoolean; - @Valid private List nameArray = new ArrayList<>(); - @Valid private List nameWrappedArray = new ArrayList<>(); private String prefixString; @@ -59,10 +56,8 @@ public class XmlItem { private Boolean prefixBoolean; - @Valid private List prefixArray = new ArrayList<>(); - @Valid private List prefixWrappedArray = new ArrayList<>(); private String namespaceString; @@ -73,10 +68,8 @@ public class XmlItem { private Boolean namespaceBoolean; - @Valid private List namespaceArray = new ArrayList<>(); - @Valid private List namespaceWrappedArray = new ArrayList<>(); private String prefixNsString; @@ -87,10 +80,8 @@ public class XmlItem { private Boolean prefixNsBoolean; - @Valid private List prefixNsArray = new ArrayList<>(); - @Valid private List prefixNsWrappedArray = new ArrayList<>(); public XmlItem attributeString(String attributeString) { @@ -102,7 +93,6 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("attribute_string") public String getAttributeString() { @@ -122,7 +112,6 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("attribute_number") public BigDecimal getAttributeNumber() { @@ -142,7 +131,6 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("attribute_integer") public Integer getAttributeInteger() { @@ -162,7 +150,6 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("attribute_boolean") public Boolean getAttributeBoolean() { @@ -190,7 +177,6 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("wrapped_array") public List getWrappedArray() { @@ -210,7 +196,6 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("name_string") public String getNameString() { @@ -230,7 +215,6 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("name_number") public BigDecimal getNameNumber() { @@ -250,7 +234,6 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("name_integer") public Integer getNameInteger() { @@ -270,7 +253,6 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("name_boolean") public Boolean getNameBoolean() { @@ -298,7 +280,6 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ - @ApiModelProperty(value = "") @JsonProperty("name_array") public List getNameArray() { @@ -326,7 +307,6 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("name_wrapped_array") public List getNameWrappedArray() { @@ -346,7 +326,6 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("prefix_string") public String getPrefixString() { @@ -366,7 +345,6 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("prefix_number") public BigDecimal getPrefixNumber() { @@ -386,7 +364,6 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_integer") public Integer getPrefixInteger() { @@ -406,7 +383,6 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("prefix_boolean") public Boolean getPrefixBoolean() { @@ -434,7 +410,6 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_array") public List getPrefixArray() { @@ -462,7 +437,6 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_wrapped_array") public List getPrefixWrappedArray() { @@ -482,7 +456,6 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("namespace_string") public String getNamespaceString() { @@ -502,7 +475,6 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("namespace_number") public BigDecimal getNamespaceNumber() { @@ -522,7 +494,6 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { @@ -542,7 +513,6 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("namespace_boolean") public Boolean getNamespaceBoolean() { @@ -570,7 +540,6 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ - @ApiModelProperty(value = "") @JsonProperty("namespace_array") public List getNamespaceArray() { @@ -598,7 +567,6 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("namespace_wrapped_array") public List getNamespaceWrappedArray() { @@ -618,7 +586,6 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("prefix_ns_string") public String getPrefixNsString() { @@ -638,7 +605,6 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("prefix_ns_number") public BigDecimal getPrefixNsNumber() { @@ -658,7 +624,6 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { @@ -678,7 +643,6 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("prefix_ns_boolean") public Boolean getPrefixNsBoolean() { @@ -706,7 +670,6 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_ns_array") public List getPrefixNsArray() { @@ -734,7 +697,6 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_ns_wrapped_array") public List getPrefixNsWrappedArray() { @@ -838,4 +800,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java index 8bb97620f117..b2bdefe2fb50 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -52,7 +52,7 @@ default AnotherFakeApiDelegate getDelegate() { ) default ResponseEntity call123testSpecialTags( - @ApiParam(value = "client model", required = true) @Valid @RequestBody Client client + @ApiParam(value = "client model", required = true) @RequestBody @NotNull @Valid Client client ) { return getDelegate().call123testSpecialTags(client); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java index 97113e366d57..a68b51dd3cd1 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java @@ -62,7 +62,7 @@ default FakeApiDelegate getDelegate() { ) default ResponseEntity createXmlItem( - @ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem + @ApiParam(value = "XmlItem Body", required = true) @RequestBody @NotNull @Valid XmlItem xmlItem ) { return getDelegate().createXmlItem(xmlItem); } @@ -93,7 +93,7 @@ default ResponseEntity createXmlItem( ) default ResponseEntity fakeOuterBooleanSerialize( - @ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body + @ApiParam(value = "Input boolean as post body") @RequestBody(required = false) Boolean body ) { return getDelegate().fakeOuterBooleanSerialize(body); } @@ -124,7 +124,7 @@ default ResponseEntity fakeOuterBooleanSerialize( ) default ResponseEntity fakeOuterCompositeSerialize( - @ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite outerComposite + @ApiParam(value = "Input composite as post body") @RequestBody(required = false) @Valid OuterComposite outerComposite ) { return getDelegate().fakeOuterCompositeSerialize(outerComposite); } @@ -155,7 +155,7 @@ default ResponseEntity fakeOuterCompositeSerialize( ) default ResponseEntity fakeOuterNumberSerialize( - @ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body + @ApiParam(value = "Input number as post body") @RequestBody(required = false) BigDecimal body ) { return getDelegate().fakeOuterNumberSerialize(body); } @@ -186,7 +186,7 @@ default ResponseEntity fakeOuterNumberSerialize( ) default ResponseEntity fakeOuterStringSerialize( - @ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body + @ApiParam(value = "Input string as post body") @RequestBody(required = false) String body ) { return getDelegate().fakeOuterStringSerialize(body); } @@ -215,7 +215,7 @@ default ResponseEntity fakeOuterStringSerialize( ) default ResponseEntity responseObjectDifferentNames( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") @NotNull Long petId ) { return getDelegate().responseObjectDifferentNames(petId); } @@ -244,7 +244,7 @@ default ResponseEntity responseObjectDiff ) default ResponseEntity testBodyWithFileSchema( - @ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass fileSchemaTestClass + @ApiParam(value = "", required = true) @RequestBody @NotNull @Valid FileSchemaTestClass fileSchemaTestClass ) { return getDelegate().testBodyWithFileSchema(fileSchemaTestClass); } @@ -273,8 +273,8 @@ default ResponseEntity testBodyWithFileSchema( ) default ResponseEntity testBodyWithQueryParams( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, - @ApiParam(value = "", required = true) @Valid @RequestBody User user + @ApiParam(value = "", required = true) @RequestParam(value = "query") @NotNull String query, + @ApiParam(value = "", required = true) @RequestBody @NotNull @Valid User user ) { return getDelegate().testBodyWithQueryParams(query, user); } @@ -305,7 +305,7 @@ default ResponseEntity testBodyWithQueryParams( ) default ResponseEntity testClientModel( - @ApiParam(value = "client model", required = true) @Valid @RequestBody Client client + @ApiParam(value = "client model", required = true) @RequestBody @NotNull @Valid Client client ) { return getDelegate().testClientModel(client); } @@ -352,20 +352,20 @@ default ResponseEntity testClientModel( ) default ResponseEntity testEndpointParameters( - @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "number", required = true) BigDecimal number, - @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "double", required = true) Double _double, - @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, - @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "byte", required = true) byte[] _byte, - @ApiParam(value = "None") @Valid @RequestParam(value = "integer", required = false) Integer integer, - @ApiParam(value = "None") @Valid @RequestParam(value = "int32", required = false) Integer int32, - @ApiParam(value = "None") @Valid @RequestParam(value = "int64", required = false) Long int64, - @ApiParam(value = "None") @Valid @RequestParam(value = "float", required = false) Float _float, - @ApiParam(value = "None") @Valid @RequestParam(value = "string", required = false) String string, + @ApiParam(value = "None", required = true) @RequestParam(value = "number") @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal number, + @ApiParam(value = "None", required = true) @RequestParam(value = "double") @NotNull @DecimalMin("67.8") @DecimalMax("123.4") Double _double, + @ApiParam(value = "None", required = true) @RequestParam(value = "pattern_without_delimiter") @NotNull @Pattern(regexp = "^[A-Z].*") String patternWithoutDelimiter, + @ApiParam(value = "None", required = true) @RequestParam(value = "byte") @NotNull byte[] _byte, + @ApiParam(value = "None") @RequestParam(value = "integer", required = false) @Min(10) @Max(100) Integer integer, + @ApiParam(value = "None") @RequestParam(value = "int32", required = false) @Min(20) @Max(200) Integer int32, + @ApiParam(value = "None") @RequestParam(value = "int64", required = false) Long int64, + @ApiParam(value = "None") @RequestParam(value = "float", required = false) @DecimalMax("987.6") Float _float, + @ApiParam(value = "None") @RequestParam(value = "string", required = false) @Pattern(regexp = "/[a-z]/i") String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @ApiParam(value = "None") @Valid @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, - @ApiParam(value = "None") @Valid @RequestParam(value = "password", required = false) String password, - @ApiParam(value = "None") @Valid @RequestParam(value = "callback", required = false) String paramCallback + @ApiParam(value = "None") @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @RequestParam(value = "password", required = false) @Size(min = 10, max = 64) String password, + @ApiParam(value = "None") @RequestParam(value = "callback", required = false) String paramCallback ) { return getDelegate().testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); } @@ -403,14 +403,14 @@ default ResponseEntity testEndpointParameters( ) default ResponseEntity testEnumParameters( - @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, - @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, - @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, - @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, - @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString + @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestParam(value = "enum_form_string", required = false) String enumFormString ) { return getDelegate().testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } @@ -443,12 +443,12 @@ default ResponseEntity testEnumParameters( ) default ResponseEntity testGroupParameters( - @NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @ApiParam(value = "Required String in group parameters", required = true) @RequestParam(value = "required_string_group") @NotNull Integer requiredStringGroup, @NotNull @ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, - @NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, - @ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup, + @ApiParam(value = "Required Integer in group parameters", required = true) @RequestParam(value = "required_int64_group") @NotNull Long requiredInt64Group, + @ApiParam(value = "String in group parameters") @RequestParam(value = "string_group", required = false) Integer stringGroup, @ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup, - @ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + @ApiParam(value = "Integer in group parameters") @RequestParam(value = "int64_group", required = false) Long int64Group ) { return getDelegate().testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); } @@ -477,7 +477,7 @@ default ResponseEntity testGroupParameters( ) default ResponseEntity testInlineAdditionalProperties( - @ApiParam(value = "request body", required = true) @Valid @RequestBody Map requestBody + @ApiParam(value = "request body", required = true) @RequestBody @NotNull Map requestBody ) { return getDelegate().testInlineAdditionalProperties(requestBody); } @@ -507,8 +507,8 @@ default ResponseEntity testInlineAdditionalProperties( ) default ResponseEntity testJsonFormData( - @ApiParam(value = "field1", required = true) @Valid @RequestParam(value = "param", required = true) String param, - @ApiParam(value = "field2", required = true) @Valid @RequestParam(value = "param2", required = true) String param2 + @ApiParam(value = "field1", required = true) @RequestParam(value = "param") @NotNull String param, + @ApiParam(value = "field2", required = true) @RequestParam(value = "param2") @NotNull String param2 ) { return getDelegate().testJsonFormData(param, param2); } @@ -537,7 +537,7 @@ default ResponseEntity testJsonFormData( ) default ResponseEntity testNullable( - @ApiParam(value = "request body", required = true) @Valid @RequestBody ChildWithNullable childWithNullable + @ApiParam(value = "request body", required = true) @RequestBody @NotNull @Valid ChildWithNullable childWithNullable ) { return getDelegate().testNullable(childWithNullable); } @@ -568,10 +568,10 @@ default ResponseEntity testNullable( ) default ResponseEntity testQueryParameterCollectionFormat( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + @ApiParam(value = "", required = true) @RequestParam(value = "pipe") @NotNull List pipe, + @ApiParam(value = "", required = true) @RequestParam(value = "http") @NotNull List http, + @ApiParam(value = "", required = true) @RequestParam(value = "url") @NotNull List url, + @ApiParam(value = "", required = true) @RequestParam(value = "context") @NotNull List context ) { return getDelegate().testQueryParameterCollectionFormat(pipe, http, url, context); } @@ -639,9 +639,9 @@ default ResponseEntity testWithResultExample( ) default ResponseEntity uploadFileWithRequiredFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, - @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, - @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") @NotNull Long petId, + @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile") MultipartFile requiredFile, + @ApiParam(value = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata ) { return getDelegate().uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java index b37b0d70c217..42abdb2c28b5 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -237,14 +237,14 @@ default ResponseEntity testEndpointParameters(BigDecimal number, * or Not found (status code 404) * @see FakeApi#testEnumParameters */ - default ResponseEntity testEnumParameters(List enumHeaderStringArray, - String enumHeaderString, - List enumQueryStringArray, - String enumQueryString, - Integer enumQueryInteger, - Double enumQueryDouble, - List enumFormStringArray, - String enumFormString) { + default ResponseEntity testEnumParameters(List enumHeaderStringArray, + EnumHeaderStringEnum enumHeaderString, + List enumQueryStringArray, + EnumQueryStringEnum enumQueryString, + EnumQueryIntegerEnum enumQueryInteger, + EnumQueryDoubleEnum enumQueryDouble, + List enumFormStringArray, + EnumFormStringEnum enumFormString) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 6e2af4ca2728..c23cdf6a6b52 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -55,7 +55,7 @@ default FakeClassnameTestApiDelegate getDelegate() { ) default ResponseEntity testClassname( - @ApiParam(value = "client model", required = true) @Valid @RequestBody Client client + @ApiParam(value = "client model", required = true) @RequestBody @NotNull @Valid Client client ) { return getDelegate().testClassname(client); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java index e7799a01dea5..874129164bb2 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java @@ -60,7 +60,7 @@ default PetApiDelegate getDelegate() { ) default ResponseEntity addPet( - @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet pet ) { return getDelegate().addPet(pet); } @@ -97,7 +97,7 @@ default ResponseEntity addPet( ) default ResponseEntity deletePet( - @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") @NotNull Long petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey ) { return getDelegate().deletePet(petId, apiKey); @@ -118,7 +118,7 @@ default ResponseEntity deletePet( nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, - responseContainer = "List", + responseContainer = "array", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @@ -127,7 +127,7 @@ default ResponseEntity deletePet( } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "array"), @ApiResponse(code = 400, message = "Invalid status value") }) @RequestMapping( @@ -137,7 +137,7 @@ default ResponseEntity deletePet( ) default ResponseEntity> findPetsByStatus( - @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status + @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @RequestParam(value = "status") @NotNull List status ) { return getDelegate().findPetsByStatus(status); } @@ -159,7 +159,7 @@ default ResponseEntity> findPetsByStatus( nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, - responseContainer = "Set", + responseContainer = "set", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @@ -168,7 +168,7 @@ default ResponseEntity> findPetsByStatus( } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "Set"), + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "set"), @ApiResponse(code = 400, message = "Invalid tag value") }) @RequestMapping( @@ -178,7 +178,7 @@ default ResponseEntity> findPetsByStatus( ) default ResponseEntity> findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags + @ApiParam(value = "Tags to filter by", required = true) @RequestParam(value = "tags") @NotNull Set tags ) { return getDelegate().findPetsByTags(tags); } @@ -215,7 +215,7 @@ default ResponseEntity> findPetsByTags( ) default ResponseEntity getPetById( - @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") @NotNull Long petId ) { return getDelegate().getPetById(petId); } @@ -256,7 +256,7 @@ default ResponseEntity getPetById( ) default ResponseEntity updatePet( - @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet pet ) { return getDelegate().updatePet(pet); } @@ -293,9 +293,9 @@ default ResponseEntity updatePet( ) default ResponseEntity updatePetWithForm( - @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, - @ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, - @ApiParam(value = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status + @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") @NotNull Long petId, + @ApiParam(value = "Updated name of the pet") @RequestParam(value = "name", required = false) String name, + @ApiParam(value = "Updated status of the pet") @RequestParam(value = "status", required = false) String status ) { return getDelegate().updatePetWithForm(petId, name, status); } @@ -334,8 +334,8 @@ default ResponseEntity updatePetWithForm( ) default ResponseEntity uploadFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, - @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") @NotNull Long petId, + @ApiParam(value = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) { return getDelegate().uploadFile(petId, additionalMetadata, file); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApiDelegate.java index a30221d94724..bd31f7057d3c 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -66,7 +66,7 @@ default ResponseEntity deletePet(Long petId, * or Invalid status value (status code 400) * @see PetApi#findPetsByStatus */ - default ResponseEntity> findPetsByStatus(List status) { + default ResponseEntity> findPetsByStatus(List status) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java index b3cec0630d07..4ea4bf5437fa 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java @@ -52,7 +52,7 @@ default StoreApiDelegate getDelegate() { ) default ResponseEntity deleteOrder( - @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") @NotNull String orderId ) { return getDelegate().deleteOrder(orderId); } @@ -70,13 +70,13 @@ default ResponseEntity deleteOrder( nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, - responseContainer = "Map", + responseContainer = "map", authorizations = { @Authorization(value = "api_key") } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "map") }) @RequestMapping( method = RequestMethod.GET, @@ -119,7 +119,7 @@ default ResponseEntity> getInventory( ) default ResponseEntity getOrderById( - @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") @NotNull @Min(1L) @Max(5L) Long orderId ) { return getDelegate().getOrderById(orderId); } @@ -152,7 +152,7 @@ default ResponseEntity getOrderById( ) default ResponseEntity placeOrder( - @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order + @ApiParam(value = "order placed for purchasing the pet", required = true) @RequestBody @NotNull @Valid Order order ) { return getDelegate().placeOrder(order); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java index ac7e7d67ed3c..1822fa503cb0 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java @@ -51,7 +51,7 @@ default UserApiDelegate getDelegate() { ) default ResponseEntity createUser( - @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User user + @ApiParam(value = "Created user object", required = true) @RequestBody @NotNull @Valid User user ) { return getDelegate().createUser(user); } @@ -80,7 +80,7 @@ default ResponseEntity createUser( ) default ResponseEntity createUsersWithArrayInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + @ApiParam(value = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> user ) { return getDelegate().createUsersWithArrayInput(user); } @@ -109,7 +109,7 @@ default ResponseEntity createUsersWithArrayInput( ) default ResponseEntity createUsersWithListInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + @ApiParam(value = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> user ) { return getDelegate().createUsersWithListInput(user); } @@ -139,7 +139,7 @@ default ResponseEntity createUsersWithListInput( ) default ResponseEntity deleteUser( - @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") @NotNull String username ) { return getDelegate().deleteUser(username); } @@ -173,7 +173,7 @@ default ResponseEntity deleteUser( ) default ResponseEntity getUserByName( - @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") @NotNull String username ) { return getDelegate().getUserByName(username); } @@ -206,8 +206,8 @@ default ResponseEntity getUserByName( ) default ResponseEntity loginUser( - @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, - @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + @ApiParam(value = "The user name for login", required = true) @RequestParam(value = "username") @NotNull String username, + @ApiParam(value = "The password for login in clear text", required = true) @RequestParam(value = "password") @NotNull String password ) { return getDelegate().loginUser(username, password); } @@ -266,8 +266,8 @@ default ResponseEntity logoutUser( ) default ResponseEntity updateUser( - @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, - @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User user + @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") @NotNull String username, + @ApiParam(value = "Updated user object", required = true) @RequestBody @NotNull @Valid User user ) { return getDelegate().updateUser(username, user); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApiDelegate.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApiDelegate.java index dd48a55ef65a..176522acd979 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApiDelegate.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApiDelegate.java @@ -47,7 +47,7 @@ default ResponseEntity createUser(User user) { * @return successful operation (status code 200) * @see UserApi#createUsersWithArrayInput */ - default ResponseEntity createUsersWithArrayInput(List<@Valid User> user) { + default ResponseEntity createUsersWithArrayInput(List user) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -60,7 +60,7 @@ default ResponseEntity createUsersWithArrayInput(List<@Valid User> user) { * @return successful operation (status code 200) * @see UserApi#createUsersWithListInput */ - default ResponseEntity createUsersWithListInput(List<@Valid User> user) { + default ResponseEntity createUsersWithListInput(List user) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index cf57def58490..291e57234974 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -37,7 +37,6 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index dc535ab3e476..f3b2cfe986ca 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -38,7 +38,6 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -126,4 +125,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 4d4bef3fde91..79708a257b1e 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -37,7 +37,6 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 4b872401a006..c4e2810100bb 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -29,33 +29,25 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class AdditionalPropertiesClass { - @Valid private Map mapString = new HashMap<>(); - @Valid private Map mapNumber = new HashMap<>(); - @Valid private Map mapInteger = new HashMap<>(); - @Valid private Map mapBoolean = new HashMap<>(); - @Valid private Map> mapArrayInteger = new HashMap<>(); - @Valid private Map> mapArrayAnytype = new HashMap<>(); - @Valid private Map> mapMapString = new HashMap<>(); - @Valid private Map> mapMapAnytype = new HashMap<>(); private Object anytype1; - private JsonNullable anytype2 = JsonNullable.undefined(); + private JsonNullable anytype2 = JsonNullable.of(null); private Object anytype3; @@ -76,7 +68,6 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ - @ApiModelProperty(value = "") @JsonProperty("map_string") public Map getMapString() { @@ -104,7 +95,6 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("map_number") public Map getMapNumber() { @@ -132,7 +122,6 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ - @ApiModelProperty(value = "") @JsonProperty("map_integer") public Map getMapInteger() { @@ -160,7 +149,6 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ - @ApiModelProperty(value = "") @JsonProperty("map_boolean") public Map getMapBoolean() { @@ -188,7 +176,6 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { @@ -216,7 +203,6 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ - @Valid @ApiModelProperty(value = "") @JsonProperty("map_array_anytype") public Map> getMapArrayAnytype() { @@ -244,7 +230,6 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { @@ -272,7 +257,6 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { @@ -292,7 +276,6 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ - @ApiModelProperty(value = "") @JsonProperty("anytype_1") public Object getAnytype1() { @@ -303,8 +286,8 @@ public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; } - public AdditionalPropertiesClass anytype2(Object anytype2) { - this.anytype2 = JsonNullable.of(anytype2); + public AdditionalPropertiesClass anytype2(JsonNullable anytype2) { + this.anytype2 = anytype2; return this; } @@ -312,7 +295,6 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ - @ApiModelProperty(value = "") @JsonProperty("anytype_2") public JsonNullable getAnytype2() { @@ -332,7 +314,6 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ - @ApiModelProperty(value = "") @JsonProperty("anytype_3") public Object getAnytype3() { @@ -411,4 +392,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index e8e32dcd7fa9..f12948a1c898 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -37,7 +37,6 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 50fa525424d3..f31c0d0cd9b2 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -38,7 +38,6 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -126,4 +125,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index b2ca3bf5cb02..98e9b7b1a12a 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -38,7 +38,6 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -126,4 +125,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 7e085a44c93d..822b5e79b89f 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -37,7 +37,6 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Animal.java index 5d5fcd5dc18a..d9908d33fa2f 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Animal.java @@ -36,7 +36,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class Animal { - private String className; + private @NotNull String className; private String color = "red"; @@ -60,10 +60,9 @@ public Animal className(String className) { * Get className * @return className */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("className") - public String getClassName() { + public @NotNull String getClassName() { return className; } @@ -80,7 +79,6 @@ public Animal color(String color) { * Get color * @return color */ - @ApiModelProperty(value = "") @JsonProperty("color") public String getColor() { @@ -130,4 +128,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 621c01be49ce..249d0bc72466 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnly { - @Valid private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { @@ -46,7 +45,6 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("ArrayArrayNumber") public List> getArrayArrayNumber() { @@ -94,4 +92,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 3f519bbb9baa..58b3ee1a3bcf 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayOfNumberOnly { - @Valid private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnly arrayNumber(List arrayNumber) { @@ -46,7 +45,6 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("ArrayNumber") public List getArrayNumber() { @@ -94,4 +92,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayTest.java index 382556e65bd6..20402ebb213f 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayTest.java @@ -26,13 +26,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayTest { - @Valid private List arrayOfString = new ArrayList<>(); - @Valid private List> arrayArrayOfInteger = new ArrayList<>(); - @Valid private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTest arrayOfString(List arrayOfString) { @@ -52,7 +49,6 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ - @ApiModelProperty(value = "") @JsonProperty("array_of_string") public List getArrayOfString() { @@ -80,7 +76,6 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ - @Valid @ApiModelProperty(value = "") @JsonProperty("array_array_of_integer") public List> getArrayArrayOfInteger() { @@ -91,12 +86,12 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } - public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) { + public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { if (this.arrayArrayOfModel == null) { this.arrayArrayOfModel = new ArrayList<>(); } @@ -108,14 +103,13 @@ public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayO * Get arrayArrayOfModel * @return arrayArrayOfModel */ - @Valid @ApiModelProperty(value = "") @JsonProperty("array_array_of_model") public List> getArrayArrayOfModel() { return arrayArrayOfModel; } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { + public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } @@ -160,4 +154,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCat.java index 4e7739fe3ab2..c9bbc0145339 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCat.java @@ -67,7 +67,7 @@ public static KindEnum fromValue(String value) { } } - private KindEnum kind; + private String kind; public BigCat() { super(); @@ -89,10 +89,9 @@ public BigCat kind(KindEnum kind) { * Get kind * @return kind */ - @ApiModelProperty(value = "") @JsonProperty("kind") - public KindEnum getKind() { + public String getKind() { return kind; } @@ -154,4 +153,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Capitalization.java index d6e8a694cf85..f9226321c070 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Capitalization.java @@ -43,7 +43,6 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ - @ApiModelProperty(value = "") @JsonProperty("smallCamel") public String getSmallCamel() { @@ -63,7 +62,6 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ - @ApiModelProperty(value = "") @JsonProperty("CapitalCamel") public String getCapitalCamel() { @@ -83,7 +81,6 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ - @ApiModelProperty(value = "") @JsonProperty("small_Snake") public String getSmallSnake() { @@ -103,7 +100,6 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ - @ApiModelProperty(value = "") @JsonProperty("Capital_Snake") public String getCapitalSnake() { @@ -123,7 +119,6 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ - @ApiModelProperty(value = "") @JsonProperty("SCA_ETH_Flow_Points") public String getScAETHFlowPoints() { @@ -143,7 +138,6 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ - @ApiModelProperty(value = "Name of the pet ") @JsonProperty("ATT_NAME") public String getATTNAME() { @@ -201,4 +195,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Cat.java index d8932f6402ef..1bf1e602454d 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Cat.java @@ -57,7 +57,6 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ - @ApiModelProperty(value = "") @JsonProperty("declawed") public Boolean getDeclawed() { @@ -117,4 +116,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Category.java index a7d5b6e5916d..04e9b386ebbe 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Category.java @@ -24,7 +24,7 @@ public class Category { private Long id; - private String name = "default-name"; + private @NotNull String name = "default-name"; public Category() { super(); @@ -46,7 +46,6 @@ public Category id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -66,10 +65,9 @@ public Category name(String name) { * Get name * @return name */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -116,4 +114,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ChildWithNullable.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ChildWithNullable.java index 2609d3eb0201..4738e7f310b9 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ChildWithNullable.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ChildWithNullable.java @@ -41,7 +41,6 @@ public ChildWithNullable otherProperty(String otherProperty) { * Get otherProperty * @return otherProperty */ - @ApiModelProperty(value = "") @JsonProperty("otherProperty") public String getOtherProperty() { @@ -58,7 +57,7 @@ public ChildWithNullable type(TypeEnum type) { return this; } - public ChildWithNullable nullableProperty(String nullableProperty) { + public ChildWithNullable nullableProperty(JsonNullable nullableProperty) { super.nullableProperty(nullableProperty); return this; } @@ -112,4 +111,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ClassModel.java index 56aeaf340f38..508e179a1a9e 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ClassModel.java @@ -34,7 +34,6 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @ApiModelProperty(value = "") @JsonProperty("_class") public String getPropertyClass() { @@ -82,4 +81,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Client.java index 23491ea29e60..0463c48505d8 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Client.java @@ -33,7 +33,6 @@ public Client client(String client) { * Get client * @return client */ - @ApiModelProperty(value = "") @JsonProperty("client") public String getClient() { @@ -81,4 +80,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ContainerDefaultValue.java index c446f8d55e8a..33befb6282cb 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ContainerDefaultValue.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -27,17 +27,13 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ContainerDefaultValue { - @Valid - private JsonNullable> nullableArray = JsonNullable.>undefined(); + private JsonNullable> nullableArray = JsonNullable.undefined(); - @Valid - private JsonNullable> nullableRequiredArray = JsonNullable.>undefined(); + private JsonNullable> nullableRequiredArray = JsonNullable.undefined(); - @Valid - private List requiredArray = new ArrayList<>(); + private @NotNull List requiredArray = new ArrayList<>(); - @Valid - private JsonNullable> nullableArrayWithDefault = JsonNullable.>undefined(); + private JsonNullable> nullableArrayWithDefault = JsonNullable.of(new ArrayList<>(Arrays.asList("foo", "bar"))); public ContainerDefaultValue() { super(); @@ -46,13 +42,13 @@ public ContainerDefaultValue() { /** * Constructor with only required parameters */ - public ContainerDefaultValue(List nullableRequiredArray, List requiredArray) { - this.nullableRequiredArray = JsonNullable.of(nullableRequiredArray); + public ContainerDefaultValue(JsonNullable> nullableRequiredArray, List requiredArray) { + this.nullableRequiredArray = nullableRequiredArray; this.requiredArray = requiredArray; } - public ContainerDefaultValue nullableArray(List nullableArray) { - this.nullableArray = JsonNullable.of(nullableArray); + public ContainerDefaultValue nullableArray(JsonNullable> nullableArray) { + this.nullableArray = nullableArray; return this; } @@ -68,7 +64,6 @@ public ContainerDefaultValue addNullableArrayItem(String nullableArrayItem) { * Get nullableArray * @return nullableArray */ - @ApiModelProperty(value = "") @JsonProperty("nullable_array") public JsonNullable> getNullableArray() { @@ -79,8 +74,8 @@ public void setNullableArray(JsonNullable> nullableArray) { this.nullableArray = nullableArray; } - public ContainerDefaultValue nullableRequiredArray(List nullableRequiredArray) { - this.nullableRequiredArray = JsonNullable.of(nullableRequiredArray); + public ContainerDefaultValue nullableRequiredArray(JsonNullable> nullableRequiredArray) { + this.nullableRequiredArray = nullableRequiredArray; return this; } @@ -96,7 +91,6 @@ public ContainerDefaultValue addNullableRequiredArrayItem(String nullableRequire * Get nullableRequiredArray * @return nullableRequiredArray */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("nullable_required_array") public JsonNullable> getNullableRequiredArray() { @@ -124,10 +118,9 @@ public ContainerDefaultValue addRequiredArrayItem(String requiredArrayItem) { * Get requiredArray * @return requiredArray */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("required_array") - public List getRequiredArray() { + public @NotNull List getRequiredArray() { return requiredArray; } @@ -135,8 +128,8 @@ public void setRequiredArray(List requiredArray) { this.requiredArray = requiredArray; } - public ContainerDefaultValue nullableArrayWithDefault(List nullableArrayWithDefault) { - this.nullableArrayWithDefault = JsonNullable.of(nullableArrayWithDefault); + public ContainerDefaultValue nullableArrayWithDefault(JsonNullable> nullableArrayWithDefault) { + this.nullableArrayWithDefault = nullableArrayWithDefault; return this; } @@ -152,7 +145,6 @@ public ContainerDefaultValue addNullableArrayWithDefaultItem(String nullableArra * Get nullableArrayWithDefault * @return nullableArrayWithDefault */ - @ApiModelProperty(value = "") @JsonProperty("nullable_array_with_default") public JsonNullable> getNullableArrayWithDefault() { @@ -217,4 +209,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Dog.java index bef3e5409a8e..d4656db2ef88 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Dog.java @@ -49,7 +49,6 @@ public Dog breed(String breed) { * Get breed * @return breed */ - @ApiModelProperty(value = "") @JsonProperty("breed") public String getBreed() { @@ -109,4 +108,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumArrays.java index 5bed35014d25..4a80b3b0ffe9 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumArrays.java @@ -61,7 +61,7 @@ public static JustSymbolEnum fromValue(String value) { } } - private JustSymbolEnum justSymbol; + private String justSymbol; /** * Gets or Sets arrayEnum @@ -98,8 +98,7 @@ public static ArrayEnumEnum fromValue(String value) { } } - @Valid - private List arrayEnum = new ArrayList<>(); + private List arrayEnum = new ArrayList<>(); public EnumArrays justSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; @@ -110,10 +109,9 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ - @ApiModelProperty(value = "") @JsonProperty("just_symbol") - public JustSymbolEnum getJustSymbol() { + public String getJustSymbol() { return justSymbol; } @@ -138,10 +136,9 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ - @ApiModelProperty(value = "") @JsonProperty("array_enum") - public List getArrayEnum() { + public List getArrayEnum() { return arrayEnum; } @@ -188,4 +185,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumTest.java index 2865d76ab8bf..8e3d8978857c 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumTest.java @@ -63,7 +63,7 @@ public static EnumStringEnum fromValue(String value) { } } - private EnumStringEnum enumString; + private String enumString; /** * Gets or Sets enumStringRequired @@ -102,7 +102,7 @@ public static EnumStringRequiredEnum fromValue(String value) { } } - private EnumStringRequiredEnum enumStringRequired; + private @NotNull String enumStringRequired; /** * Gets or Sets enumInteger @@ -139,7 +139,7 @@ public static EnumIntegerEnum fromValue(Integer value) { } } - private EnumIntegerEnum enumInteger; + private Integer enumInteger; /** * Gets or Sets enumNumber @@ -176,7 +176,7 @@ public static EnumNumberEnum fromValue(Double value) { } } - private EnumNumberEnum enumNumber; + private Double enumNumber; private OuterEnum outerEnum; @@ -200,10 +200,9 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ - @ApiModelProperty(value = "") @JsonProperty("enum_string") - public EnumStringEnum getEnumString() { + public String getEnumString() { return enumString; } @@ -220,10 +219,9 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("enum_string_required") - public EnumStringRequiredEnum getEnumStringRequired() { + public @NotNull String getEnumStringRequired() { return enumStringRequired; } @@ -240,10 +238,9 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ - @ApiModelProperty(value = "") @JsonProperty("enum_integer") - public EnumIntegerEnum getEnumInteger() { + public Integer getEnumInteger() { return enumInteger; } @@ -260,10 +257,9 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ - @ApiModelProperty(value = "") @JsonProperty("enum_number") - public EnumNumberEnum getEnumNumber() { + public Double getEnumNumber() { return enumNumber; } @@ -280,7 +276,6 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ - @Valid @ApiModelProperty(value = "") @JsonProperty("outerEnum") public OuterEnum getOuterEnum() { @@ -336,4 +331,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/File.java index 6e16961c2d2f..cd9f95a6f91c 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/File.java @@ -34,7 +34,6 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ - @ApiModelProperty(value = "Test capitalization") @JsonProperty("sourceURI") public String getSourceURI() { @@ -82,4 +81,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 9a40dbd168af..0c2d51df5822 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -26,9 +26,8 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class FileSchemaTestClass { - private File file; + private @Valid File file; - @Valid private List<@Valid File> files = new ArrayList<>(); public FileSchemaTestClass file(File file) { @@ -40,10 +39,9 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ - @Valid @ApiModelProperty(value = "") @JsonProperty("file") - public File getFile() { + public @Valid File getFile() { return file; } @@ -51,7 +49,7 @@ public void setFile(File file) { this.file = file; } - public FileSchemaTestClass files(List<@Valid File> files) { + public FileSchemaTestClass files(List files) { this.files = files; return this; } @@ -68,14 +66,13 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ - @Valid @ApiModelProperty(value = "") @JsonProperty("files") public List<@Valid File> getFiles() { return files; } - public void setFiles(List<@Valid File> files) { + public void setFiles(List files) { this.files = files; } @@ -118,4 +115,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FormatTest.java index fda969ad06d3..fa150f1fa069 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FormatTest.java @@ -30,33 +30,33 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class FormatTest { - private Integer integer; + private @Min(10) @Max(100) Integer integer; - private Integer int32; + private @Min(20) @Max(200) Integer int32; private Long int64; - private BigDecimal number; + private @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal number; - private Float _float; + private @DecimalMin("54.3") @DecimalMax("987.6") Float _float; - private Double _double; + private @DecimalMin("67.8") @DecimalMax("123.4") Double _double; - private String string; + private @Pattern(regexp = "/[a-z]/i") String string; - private byte[] _byte; + private @NotNull byte[] _byte; private org.springframework.core.io.Resource binary; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) - private LocalDate date; + private @NotNull LocalDate date; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; private UUID uuid; - private String password; + private @NotNull @Size(min = 10, max = 64) String password; private BigDecimal bigDecimal; @@ -85,10 +85,9 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ - @Min(10) @Max(100) @ApiModelProperty(value = "") @JsonProperty("integer") - public Integer getInteger() { + public @Min(10) @Max(100) Integer getInteger() { return integer; } @@ -107,10 +106,9 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ - @Min(20) @Max(200) @ApiModelProperty(value = "") @JsonProperty("int32") - public Integer getInt32() { + public @Min(20) @Max(200) Integer getInt32() { return int32; } @@ -127,7 +125,6 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ - @ApiModelProperty(value = "") @JsonProperty("int64") public Long getInt64() { @@ -149,10 +146,9 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ - @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(required = true, value = "") @JsonProperty("number") - public BigDecimal getNumber() { + public @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal getNumber() { return number; } @@ -171,10 +167,9 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ - @DecimalMin("54.3") @DecimalMax("987.6") @ApiModelProperty(value = "") @JsonProperty("float") - public Float getFloat() { + public @DecimalMin("54.3") @DecimalMax("987.6") Float getFloat() { return _float; } @@ -193,10 +188,9 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ - @DecimalMin("67.8") @DecimalMax("123.4") @ApiModelProperty(value = "") @JsonProperty("double") - public Double getDouble() { + public @DecimalMin("67.8") @DecimalMax("123.4") Double getDouble() { return _double; } @@ -213,10 +207,9 @@ public FormatTest string(String string) { * Get string * @return string */ - @Pattern(regexp = "/[a-z]/i") @ApiModelProperty(value = "") @JsonProperty("string") - public String getString() { + public @Pattern(regexp = "/[a-z]/i") String getString() { return string; } @@ -233,10 +226,9 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("byte") - public byte[] getByte() { + public @NotNull byte[] getByte() { return _byte; } @@ -253,7 +245,6 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ - @Valid @ApiModelProperty(value = "") @JsonProperty("binary") public org.springframework.core.io.Resource getBinary() { @@ -273,10 +264,9 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ - @NotNull @Valid @ApiModelProperty(required = true, value = "") @JsonProperty("date") - public LocalDate getDate() { + public @NotNull LocalDate getDate() { return date; } @@ -293,7 +283,6 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ - @Valid @ApiModelProperty(value = "") @JsonProperty("dateTime") public OffsetDateTime getDateTime() { @@ -313,7 +302,6 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ - @Valid @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") @JsonProperty("uuid") public UUID getUuid() { @@ -333,10 +321,9 @@ public FormatTest password(String password) { * Get password * @return password */ - @NotNull @Size(min = 10, max = 64) @ApiModelProperty(required = true, value = "") @JsonProperty("password") - public String getPassword() { + public @NotNull @Size(min = 10, max = 64) String getPassword() { return password; } @@ -353,7 +340,6 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ - @Valid @ApiModelProperty(value = "") @JsonProperty("BigDecimal") public BigDecimal getBigDecimal() { @@ -427,4 +413,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 27ea04eaa86c..628772ab47fe 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -37,7 +37,6 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("bar") public String getBar() { @@ -57,7 +56,6 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("foo") public String getFoo() { @@ -107,4 +105,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MapTest.java index bd3eea6e64df..a060e9d647a7 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MapTest.java @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class MapTest { - @Valid private Map> mapMapOfString = new HashMap<>(); /** @@ -63,13 +62,10 @@ public static InnerEnum fromValue(String value) { } } - @Valid - private Map mapOfEnumString = new HashMap<>(); + private Map mapOfEnumString = new HashMap<>(); - @Valid private Map directMap = new HashMap<>(); - @Valid private Map indirectMap = new HashMap<>(); public MapTest mapMapOfString(Map> mapMapOfString) { @@ -89,7 +85,6 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ - @Valid @ApiModelProperty(value = "") @JsonProperty("map_map_of_string") public Map> getMapMapOfString() { @@ -117,10 +112,9 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ - @ApiModelProperty(value = "") @JsonProperty("map_of_enum_string") - public Map getMapOfEnumString() { + public Map getMapOfEnumString() { return mapOfEnumString; } @@ -145,7 +139,6 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ - @ApiModelProperty(value = "") @JsonProperty("direct_map") public Map getDirectMap() { @@ -173,7 +166,6 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ - @ApiModelProperty(value = "") @JsonProperty("indirect_map") public Map getIndirectMap() { @@ -227,4 +219,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index b16370183e0a..0ecca046c869 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -33,8 +33,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; - @Valid - private Map map = new HashMap<>(); + private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { this.uuid = uuid; @@ -45,7 +44,6 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ - @Valid @ApiModelProperty(value = "") @JsonProperty("uuid") public UUID getUuid() { @@ -65,7 +63,6 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ - @Valid @ApiModelProperty(value = "") @JsonProperty("dateTime") public OffsetDateTime getDateTime() { @@ -93,10 +90,9 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ - @Valid @ApiModelProperty(value = "") @JsonProperty("map") - public Map getMap() { + public Map getMap() { return map; } @@ -145,4 +141,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Model200Response.java index 4922749da22c..6f4b8460e6f4 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Model200Response.java @@ -38,7 +38,6 @@ public Model200Response name(Integer name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public Integer getName() { @@ -58,7 +57,6 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @ApiModelProperty(value = "") @JsonProperty("class") public String getPropertyClass() { @@ -108,4 +106,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelApiResponse.java index 21244266ad17..31642652231b 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -39,7 +39,6 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @ApiModelProperty(value = "") @JsonProperty("code") public Integer getCode() { @@ -59,7 +58,6 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @ApiModelProperty(value = "") @JsonProperty("type") public String getType() { @@ -79,7 +77,6 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @ApiModelProperty(value = "") @JsonProperty("message") public String getMessage() { @@ -131,4 +128,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelList.java index d3d66db5c095..b9dc65977c53 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelList.java @@ -35,7 +35,6 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ - @ApiModelProperty(value = "") @JsonProperty("123-list") public String get123list() { @@ -83,4 +82,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelReturn.java index 2c8a25a4d85f..72d78cb7fc0b 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelReturn.java @@ -36,7 +36,6 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ - @ApiModelProperty(value = "") @JsonProperty("return") public Integer getReturn() { @@ -84,4 +83,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Name.java index 420c565a9955..f42d379c1083 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Name.java @@ -23,7 +23,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class Name { - private Integer name; + private @NotNull Integer name; private Integer snakeCase; @@ -51,10 +51,9 @@ public Name name(Integer name) { * Get name * @return name */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("name") - public Integer getName() { + public @NotNull Integer getName() { return name; } @@ -71,7 +70,6 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("snake_case") public Integer getSnakeCase() { @@ -91,7 +89,6 @@ public Name property(String property) { * Get property * @return property */ - @ApiModelProperty(value = "") @JsonProperty("property") public String getProperty() { @@ -111,7 +108,6 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("123Number") public Integer get123number() { @@ -165,4 +161,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/NullableMapProperty.java index cc44c57fdd1a..8a5f0b99081e 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/NullableMapProperty.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -27,11 +27,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class NullableMapProperty { - @Valid - private JsonNullable> languageValues = JsonNullable.>undefined(); + private JsonNullable> languageValues = JsonNullable.undefined(); - public NullableMapProperty languageValues(Map languageValues) { - this.languageValues = JsonNullable.of(languageValues); + public NullableMapProperty languageValues(JsonNullable> languageValues) { + this.languageValues = languageValues; return this; } @@ -47,7 +46,6 @@ public NullableMapProperty putLanguageValuesItem(String key, String languageValu * Get languageValues * @return languageValues */ - @ApiModelProperty(value = "") @JsonProperty("languageValues") public JsonNullable> getLanguageValues() { @@ -106,4 +104,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/NumberOnly.java index 69de58b11374..eb57c97846a2 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/NumberOnly.java @@ -34,7 +34,6 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("JustNumber") public BigDecimal getJustNumber() { @@ -82,4 +81,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Order.java index 48932f68f862..6b84d7a0c4b4 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Order.java @@ -71,7 +71,7 @@ public static StatusEnum fromValue(String value) { } } - private StatusEnum status; + private String status; private Boolean complete = false; @@ -84,7 +84,6 @@ public Order id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -104,7 +103,6 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @ApiModelProperty(value = "") @JsonProperty("petId") public Long getPetId() { @@ -124,7 +122,6 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @ApiModelProperty(value = "") @JsonProperty("quantity") public Integer getQuantity() { @@ -144,7 +141,6 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Valid @ApiModelProperty(value = "") @JsonProperty("shipDate") public OffsetDateTime getShipDate() { @@ -164,10 +160,9 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @ApiModelProperty(value = "Order Status") @JsonProperty("status") - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -184,7 +179,6 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @ApiModelProperty(value = "") @JsonProperty("complete") public Boolean getComplete() { @@ -242,4 +236,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterComposite.java index 2e78c0586cab..2bfc1db21bb2 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterComposite.java @@ -38,7 +38,6 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("my_number") public BigDecimal getMyNumber() { @@ -58,7 +57,6 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ - @ApiModelProperty(value = "") @JsonProperty("my_string") public String getMyString() { @@ -78,7 +76,6 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ - @ApiModelProperty(value = "") @JsonProperty("my_boolean") public Boolean getMyBoolean() { @@ -130,4 +127,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ParentWithNullable.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ParentWithNullable.java index 893ed74ce711..94f35cbaf971 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ParentWithNullable.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ParentWithNullable.java @@ -71,9 +71,9 @@ public static TypeEnum fromValue(String value) { } } - private TypeEnum type; + private String type; - private JsonNullable nullableProperty = JsonNullable.undefined(); + private JsonNullable nullableProperty = JsonNullable.undefined(); public ParentWithNullable type(TypeEnum type) { this.type = type; @@ -84,10 +84,9 @@ public ParentWithNullable type(TypeEnum type) { * Get type * @return type */ - @ApiModelProperty(value = "") @JsonProperty("type") - public TypeEnum getType() { + public String getType() { return type; } @@ -95,8 +94,8 @@ public void setType(TypeEnum type) { this.type = type; } - public ParentWithNullable nullableProperty(String nullableProperty) { - this.nullableProperty = JsonNullable.of(nullableProperty); + public ParentWithNullable nullableProperty(JsonNullable nullableProperty) { + this.nullableProperty = nullableProperty; return this; } @@ -104,7 +103,6 @@ public ParentWithNullable nullableProperty(String nullableProperty) { * Get nullableProperty * @return nullableProperty */ - @ApiModelProperty(value = "") @JsonProperty("nullableProperty") public JsonNullable getNullableProperty() { @@ -165,4 +163,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java index 67242095aeba..3ac00f4958c1 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java @@ -33,14 +33,12 @@ public class Pet { private Long id; - private Category category; + private @Valid Category category; - private String name; + private @NotNull String name; - @Valid - private Set photoUrls = new LinkedHashSet<>(); + private @NotNull Set photoUrls = new LinkedHashSet<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** @@ -81,7 +79,7 @@ public static StatusEnum fromValue(String value) { } @Deprecated - private StatusEnum status; + private String status; public Pet() { super(); @@ -104,7 +102,6 @@ public Pet id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -124,10 +121,9 @@ public Pet category(Category category) { * Get category * @return category */ - @Valid @ApiModelProperty(value = "") @JsonProperty("category") - public Category getCategory() { + public @Valid Category getCategory() { return category; } @@ -144,10 +140,9 @@ public Pet name(String name) { * Get name * @return name */ - @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -172,10 +167,9 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("photoUrls") - public Set getPhotoUrls() { + public @NotNull Set getPhotoUrls() { return photoUrls; } @@ -184,7 +178,7 @@ public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List<@Valid Tag> tags) { + public Pet tags(List tags) { this.tags = tags; return this; } @@ -201,14 +195,13 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Valid @ApiModelProperty(value = "") @JsonProperty("tags") public List<@Valid Tag> getTags() { return tags; } - public void setTags(List<@Valid Tag> tags) { + public void setTags(List tags) { this.tags = tags; } @@ -222,11 +215,10 @@ public Pet status(StatusEnum status) { * @return status * @deprecated */ - @ApiModelProperty(value = "pet status in the store") @JsonProperty("status") @Deprecated - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -285,4 +277,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 9388f3cfd29f..1eee9577a877 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -35,7 +35,6 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("bar") public String getBar() { @@ -55,7 +54,6 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ - @ApiModelProperty(value = "") @JsonProperty("baz") public String getBaz() { @@ -105,4 +103,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java index 68785baf943e..fc1f3861dbc7 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java @@ -39,7 +39,6 @@ public ResponseObjectWithDifferentFieldNames normalPropertyName(String normalPro * Get normalPropertyName * @return normalPropertyName */ - @ApiModelProperty(value = "") @JsonProperty("normalPropertyName") public String getNormalPropertyName() { @@ -59,7 +58,6 @@ public ResponseObjectWithDifferentFieldNames UPPER_CASE_PROPERTY_SNAKE(String UP * Get UPPER_CASE_PROPERTY_SNAKE * @return UPPER_CASE_PROPERTY_SNAKE */ - @ApiModelProperty(value = "") @JsonProperty("UPPER_CASE_PROPERTY_SNAKE") public String getUPPERCASEPROPERTYSNAKE() { @@ -79,7 +77,6 @@ public ResponseObjectWithDifferentFieldNames lowerCasePropertyDashes(String lowe * Get lowerCasePropertyDashes * @return lowerCasePropertyDashes */ - @ApiModelProperty(value = "") @JsonProperty("lower-case-property-dashes") public String getLowerCasePropertyDashes() { @@ -99,7 +96,6 @@ public ResponseObjectWithDifferentFieldNames propertyNameWithSpaces(String prope * Get propertyNameWithSpaces * @return propertyNameWithSpaces */ - @ApiModelProperty(value = "") @JsonProperty("property name with spaces") public String getPropertyNameWithSpaces() { @@ -153,4 +149,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/SpecialModelName.java index 7f751ef4aedc..ca744d5efe00 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/SpecialModelName.java @@ -35,7 +35,6 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ - @ApiModelProperty(value = "") @JsonProperty("$special[property.name]") public Long get$SpecialPropertyName() { @@ -83,4 +82,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Tag.java index 850c68911db4..d3778890e2d6 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Tag.java @@ -35,7 +35,6 @@ public Tag id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -55,7 +54,6 @@ public Tag name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -105,4 +103,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java index 420967a01328..d5ce2f773c46 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -26,16 +26,15 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class TypeHolderDefault { - private String stringItem = "what"; + private @NotNull String stringItem = "what"; - private BigDecimal numberItem = new BigDecimal("1.234"); + private @NotNull BigDecimal numberItem = new BigDecimal("1.234"); - private Integer integerItem = -2; + private @NotNull Integer integerItem = -2; - private Boolean boolItem = true; + private @NotNull Boolean boolItem = true; - @Valid - private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); + private @NotNull List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); public TypeHolderDefault() { super(); @@ -61,10 +60,9 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("string_item") - public String getStringItem() { + public @NotNull String getStringItem() { return stringItem; } @@ -81,10 +79,9 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @NotNull @Valid @ApiModelProperty(required = true, value = "") @JsonProperty("number_item") - public BigDecimal getNumberItem() { + public @NotNull BigDecimal getNumberItem() { return numberItem; } @@ -101,10 +98,9 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("integer_item") - public Integer getIntegerItem() { + public @NotNull Integer getIntegerItem() { return integerItem; } @@ -121,10 +117,9 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("bool_item") - public Boolean getBoolItem() { + public @NotNull Boolean getBoolItem() { return boolItem; } @@ -149,10 +144,9 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("array_item") - public List getArrayItem() { + public @NotNull List getArrayItem() { return arrayItem; } @@ -205,4 +199,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderExample.java index 909dc1e7fe60..e9b3492a4684 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -26,18 +26,17 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class TypeHolderExample { - private String stringItem; + private @NotNull String stringItem; - private BigDecimal numberItem; + private @NotNull BigDecimal numberItem; - private Float floatItem; + private @NotNull Float floatItem; - private Integer integerItem; + private @NotNull Integer integerItem; - private Boolean boolItem; + private @NotNull Boolean boolItem; - @Valid - private List arrayItem = new ArrayList<>(); + private @NotNull List arrayItem = new ArrayList<>(); public TypeHolderExample() { super(); @@ -64,10 +63,9 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @NotNull @ApiModelProperty(example = "what", required = true, value = "") @JsonProperty("string_item") - public String getStringItem() { + public @NotNull String getStringItem() { return stringItem; } @@ -84,10 +82,9 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @NotNull @Valid @ApiModelProperty(example = "1.234", required = true, value = "") @JsonProperty("number_item") - public BigDecimal getNumberItem() { + public @NotNull BigDecimal getNumberItem() { return numberItem; } @@ -104,10 +101,9 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ - @NotNull @ApiModelProperty(example = "1.234", required = true, value = "") @JsonProperty("float_item") - public Float getFloatItem() { + public @NotNull Float getFloatItem() { return floatItem; } @@ -124,10 +120,9 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @NotNull @ApiModelProperty(example = "-2", required = true, value = "") @JsonProperty("integer_item") - public Integer getIntegerItem() { + public @NotNull Integer getIntegerItem() { return integerItem; } @@ -144,10 +139,9 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @NotNull @ApiModelProperty(example = "true", required = true, value = "") @JsonProperty("bool_item") - public Boolean getBoolItem() { + public @NotNull Boolean getBoolItem() { return boolItem; } @@ -172,10 +166,9 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @NotNull @ApiModelProperty(example = "[0,1,2,3]", required = true, value = "") @JsonProperty("array_item") - public List getArrayItem() { + public @NotNull List getArrayItem() { return arrayItem; } @@ -230,4 +223,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/User.java index e46b4e9e7907..2a1878ded5d2 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/User.java @@ -47,7 +47,6 @@ public User id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -67,7 +66,6 @@ public User username(String username) { * Get username * @return username */ - @ApiModelProperty(value = "") @JsonProperty("username") public String getUsername() { @@ -87,7 +85,6 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @ApiModelProperty(value = "") @JsonProperty("firstName") public String getFirstName() { @@ -107,7 +104,6 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @ApiModelProperty(value = "") @JsonProperty("lastName") public String getLastName() { @@ -127,7 +123,6 @@ public User email(String email) { * Get email * @return email */ - @ApiModelProperty(value = "") @JsonProperty("email") public String getEmail() { @@ -147,7 +142,6 @@ public User password(String password) { * Get password * @return password */ - @ApiModelProperty(value = "") @JsonProperty("password") public String getPassword() { @@ -167,7 +161,6 @@ public User phone(String phone) { * Get phone * @return phone */ - @ApiModelProperty(value = "") @JsonProperty("phone") public String getPhone() { @@ -187,7 +180,6 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @ApiModelProperty(value = "User Status") @JsonProperty("userStatus") public Integer getUserStatus() { @@ -249,4 +241,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/XmlItem.java index b7a622a0b99e..2e676eb62e75 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/XmlItem.java @@ -34,7 +34,6 @@ public class XmlItem { private Boolean attributeBoolean; - @Valid private List wrappedArray = new ArrayList<>(); private String nameString; @@ -45,10 +44,8 @@ public class XmlItem { private Boolean nameBoolean; - @Valid private List nameArray = new ArrayList<>(); - @Valid private List nameWrappedArray = new ArrayList<>(); private String prefixString; @@ -59,10 +56,8 @@ public class XmlItem { private Boolean prefixBoolean; - @Valid private List prefixArray = new ArrayList<>(); - @Valid private List prefixWrappedArray = new ArrayList<>(); private String namespaceString; @@ -73,10 +68,8 @@ public class XmlItem { private Boolean namespaceBoolean; - @Valid private List namespaceArray = new ArrayList<>(); - @Valid private List namespaceWrappedArray = new ArrayList<>(); private String prefixNsString; @@ -87,10 +80,8 @@ public class XmlItem { private Boolean prefixNsBoolean; - @Valid private List prefixNsArray = new ArrayList<>(); - @Valid private List prefixNsWrappedArray = new ArrayList<>(); public XmlItem attributeString(String attributeString) { @@ -102,7 +93,6 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("attribute_string") public String getAttributeString() { @@ -122,7 +112,6 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("attribute_number") public BigDecimal getAttributeNumber() { @@ -142,7 +131,6 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("attribute_integer") public Integer getAttributeInteger() { @@ -162,7 +150,6 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("attribute_boolean") public Boolean getAttributeBoolean() { @@ -190,7 +177,6 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("wrapped_array") public List getWrappedArray() { @@ -210,7 +196,6 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("name_string") public String getNameString() { @@ -230,7 +215,6 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("name_number") public BigDecimal getNameNumber() { @@ -250,7 +234,6 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("name_integer") public Integer getNameInteger() { @@ -270,7 +253,6 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("name_boolean") public Boolean getNameBoolean() { @@ -298,7 +280,6 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ - @ApiModelProperty(value = "") @JsonProperty("name_array") public List getNameArray() { @@ -326,7 +307,6 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("name_wrapped_array") public List getNameWrappedArray() { @@ -346,7 +326,6 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("prefix_string") public String getPrefixString() { @@ -366,7 +345,6 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("prefix_number") public BigDecimal getPrefixNumber() { @@ -386,7 +364,6 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_integer") public Integer getPrefixInteger() { @@ -406,7 +383,6 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("prefix_boolean") public Boolean getPrefixBoolean() { @@ -434,7 +410,6 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_array") public List getPrefixArray() { @@ -462,7 +437,6 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_wrapped_array") public List getPrefixWrappedArray() { @@ -482,7 +456,6 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("namespace_string") public String getNamespaceString() { @@ -502,7 +475,6 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("namespace_number") public BigDecimal getNamespaceNumber() { @@ -522,7 +494,6 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { @@ -542,7 +513,6 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("namespace_boolean") public Boolean getNamespaceBoolean() { @@ -570,7 +540,6 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ - @ApiModelProperty(value = "") @JsonProperty("namespace_array") public List getNamespaceArray() { @@ -598,7 +567,6 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("namespace_wrapped_array") public List getNamespaceWrappedArray() { @@ -618,7 +586,6 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("prefix_ns_string") public String getPrefixNsString() { @@ -638,7 +605,6 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("prefix_ns_number") public BigDecimal getPrefixNsNumber() { @@ -658,7 +624,6 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { @@ -678,7 +643,6 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("prefix_ns_boolean") public Boolean getPrefixNsBoolean() { @@ -706,7 +670,6 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_ns_array") public List getPrefixNsArray() { @@ -734,7 +697,6 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_ns_wrapped_array") public List getPrefixNsWrappedArray() { @@ -838,4 +800,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/PetApi.java index 9002b5c73a6d..7b3b5689e7af 100644 --- a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/PetApi.java @@ -62,7 +62,7 @@ default PetApiDelegate getDelegate() { @ResponseStatus(HttpStatus.OK) default Pet addPet( - @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet pet ) { return getDelegate().addPet(pet); } @@ -98,7 +98,7 @@ default Pet addPet( @ResponseStatus(HttpStatus.BAD_REQUEST) default void deletePet( - @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") @NotNull Long petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey ) { getDelegate().deletePet(petId, apiKey); @@ -119,7 +119,7 @@ default void deletePet( nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, - responseContainer = "List", + responseContainer = "array", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "read:pets", description = "read your pets") @@ -127,7 +127,7 @@ default void deletePet( } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "array"), @ApiResponse(code = 400, message = "Invalid status value") }) @RequestMapping( @@ -138,7 +138,7 @@ default void deletePet( @ResponseStatus(HttpStatus.OK) default List findPetsByStatus( - @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) @Deprecated List status + @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @RequestParam(value = "status") @Deprecated @NotNull List status ) { return getDelegate().findPetsByStatus(status); } @@ -160,7 +160,7 @@ default List findPetsByStatus( nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, - responseContainer = "List", + responseContainer = "array", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "read:pets", description = "read your pets") @@ -168,7 +168,7 @@ default List findPetsByStatus( } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "array"), @ApiResponse(code = 400, message = "Invalid tag value") }) @RequestMapping( @@ -179,7 +179,7 @@ default List findPetsByStatus( @ResponseStatus(HttpStatus.OK) default List findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags + @ApiParam(value = "Tags to filter by", required = true) @RequestParam(value = "tags") @NotNull List tags ) { return getDelegate().findPetsByTags(tags); } @@ -217,7 +217,7 @@ default List findPetsByTags( @ResponseStatus(HttpStatus.OK) default Pet getPetById( - @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") @NotNull Long petId ) { return getDelegate().getPetById(petId); } @@ -263,7 +263,7 @@ default Pet getPetById( @ResponseStatus(HttpStatus.OK) default Pet updatePet( - @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet pet ) { return getDelegate().updatePet(pet); } @@ -301,9 +301,9 @@ default Pet updatePet( @ResponseStatus(HttpStatus.METHOD_NOT_ALLOWED) default void updatePetWithForm( - @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, - @ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, - @ApiParam(value = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status + @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") @NotNull Long petId, + @ApiParam(value = "Updated name of the pet") @RequestParam(value = "name", required = false) String name, + @ApiParam(value = "Updated status of the pet") @RequestParam(value = "status", required = false) String status ) { getDelegate().updatePetWithForm(petId, name, status); } @@ -343,8 +343,8 @@ default void updatePetWithForm( @ResponseStatus(HttpStatus.OK) default ModelApiResponse uploadFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, - @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") @NotNull Long petId, + @ApiParam(value = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) { return getDelegate().uploadFile(petId, additionalMetadata, file); diff --git a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/PetApiDelegate.java index 30e921d6f9f6..11270020add6 100644 --- a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -77,7 +77,7 @@ default void deletePet(Long petId, * or Invalid status value (status code 400) * @see PetApi#findPetsByStatus */ - default List findPetsByStatus(List status) { + default List findPetsByStatus(List status) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/StoreApi.java index 26f7200eb859..b8f2d795ad66 100644 --- a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/StoreApi.java @@ -53,7 +53,7 @@ default StoreApiDelegate getDelegate() { @ResponseStatus(HttpStatus.BAD_REQUEST) default void deleteOrder( - @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") String orderId + @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") @NotNull String orderId ) { getDelegate().deleteOrder(orderId); } @@ -71,13 +71,13 @@ default void deleteOrder( nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, - responseContainer = "Map", + responseContainer = "map", authorizations = { @Authorization(value = "api_key") } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "map") }) @RequestMapping( method = RequestMethod.GET, @@ -122,7 +122,7 @@ default Map getInventory( @ResponseStatus(HttpStatus.OK) default Order getOrderById( - @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") Long orderId + @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") @NotNull @Min(1L) @Max(5L) Long orderId ) { return getDelegate().getOrderById(orderId); } @@ -156,7 +156,7 @@ default Order getOrderById( @ResponseStatus(HttpStatus.OK) default Order placeOrder( - @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order + @ApiParam(value = "order placed for purchasing the pet", required = true) @RequestBody @NotNull @Valid Order order ) { return getDelegate().placeOrder(order); } diff --git a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/UserApi.java index baddab805f8b..ed63240c3615 100644 --- a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/UserApi.java @@ -55,7 +55,7 @@ default UserApiDelegate getDelegate() { @ResponseStatus(HttpStatus.OK) default void createUser( - @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User user + @ApiParam(value = "Created user object", required = true) @RequestBody @NotNull @Valid User user ) { getDelegate().createUser(user); } @@ -88,7 +88,7 @@ default void createUser( @ResponseStatus(HttpStatus.OK) default void createUsersWithArrayInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + @ApiParam(value = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> user ) { getDelegate().createUsersWithArrayInput(user); } @@ -121,7 +121,7 @@ default void createUsersWithArrayInput( @ResponseStatus(HttpStatus.OK) default void createUsersWithListInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + @ApiParam(value = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> user ) { getDelegate().createUsersWithListInput(user); } @@ -155,7 +155,7 @@ default void createUsersWithListInput( @ResponseStatus(HttpStatus.BAD_REQUEST) default void deleteUser( - @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") @NotNull String username ) { getDelegate().deleteUser(username); } @@ -190,7 +190,7 @@ default void deleteUser( @ResponseStatus(HttpStatus.OK) default User getUserByName( - @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") @NotNull String username ) { return getDelegate().getUserByName(username); } @@ -224,8 +224,8 @@ default User getUserByName( @ResponseStatus(HttpStatus.OK) default String loginUser( - @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, - @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + @ApiParam(value = "The user name for login", required = true) @RequestParam(value = "username") @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String username, + @ApiParam(value = "The password for login in clear text", required = true) @RequestParam(value = "password") @NotNull String password ) { return getDelegate().loginUser(username, password); } @@ -292,8 +292,8 @@ default void logoutUser( @ResponseStatus(HttpStatus.BAD_REQUEST) default void updateUser( - @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, - @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User user + @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") @NotNull String username, + @ApiParam(value = "Updated user object", required = true) @RequestBody @NotNull @Valid User user ) { getDelegate().updateUser(username, user); } diff --git a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/UserApiDelegate.java b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/UserApiDelegate.java index 17cf924f2342..f9c3c05b6f6c 100644 --- a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/UserApiDelegate.java +++ b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/UserApiDelegate.java @@ -46,7 +46,7 @@ default void createUser(User user) { * @return successful operation (status code 200) * @see UserApi#createUsersWithArrayInput */ - default void createUsersWithArrayInput(List<@Valid User> user) { + default void createUsersWithArrayInput(List user) { throw new IllegalArgumentException("Not implemented"); } @@ -59,7 +59,7 @@ default void createUsersWithArrayInput(List<@Valid User> user) { * @return successful operation (status code 200) * @see UserApi#createUsersWithListInput */ - default void createUsersWithListInput(List<@Valid User> user) { + default void createUsersWithListInput(List user) { throw new IllegalArgumentException("Not implemented"); } diff --git a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/model/Category.java index c111d7098b6c..4c3f2e10974f 100644 --- a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/model/Category.java @@ -25,7 +25,7 @@ public class Category { private Long id; - private String name; + private @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String name; public Category id(Long id) { this.id = id; @@ -36,7 +36,6 @@ public Category id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -56,10 +55,9 @@ public Category name(String name) { * Get name * @return name */ - @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @ApiModelProperty(value = "") @JsonProperty("name") - public String getName() { + public @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String getName() { return name; } @@ -106,4 +104,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/model/ModelApiResponse.java index 26bff480bd2e..ebff2e113b53 100644 --- a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -40,7 +40,6 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @ApiModelProperty(value = "") @JsonProperty("code") public Integer getCode() { @@ -60,7 +59,6 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @ApiModelProperty(value = "") @JsonProperty("type") public String getType() { @@ -80,7 +78,6 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @ApiModelProperty(value = "") @JsonProperty("message") public String getMessage() { @@ -132,4 +129,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/model/Order.java index 7f2afea000ca..1a5e36de756f 100644 --- a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/model/Order.java @@ -72,7 +72,7 @@ public static StatusEnum fromValue(String value) { } } - private StatusEnum status; + private String status; private Boolean complete = false; @@ -85,7 +85,6 @@ public Order id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -105,7 +104,6 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @ApiModelProperty(value = "") @JsonProperty("petId") public Long getPetId() { @@ -125,7 +123,6 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @ApiModelProperty(value = "") @JsonProperty("quantity") public Integer getQuantity() { @@ -145,7 +142,6 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Valid @ApiModelProperty(value = "") @JsonProperty("shipDate") public OffsetDateTime getShipDate() { @@ -165,10 +161,9 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @ApiModelProperty(value = "Order Status") @JsonProperty("status") - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -185,7 +180,6 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @ApiModelProperty(value = "") @JsonProperty("complete") public Boolean getComplete() { @@ -243,4 +237,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/model/Pet.java index 9f754f06e053..b79b9d52f849 100644 --- a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/model/Pet.java @@ -31,14 +31,12 @@ public class Pet { private Long id; - private Category category; + private @Valid Category category; - private String name; + private @NotNull String name; - @Valid - private List photoUrls = new ArrayList<>(); + private @NotNull List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** @@ -79,7 +77,7 @@ public static StatusEnum fromValue(String value) { } @Deprecated - private StatusEnum status; + private String status; public Pet() { super(); @@ -102,7 +100,6 @@ public Pet id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -122,10 +119,9 @@ public Pet category(Category category) { * Get category * @return category */ - @Valid @ApiModelProperty(value = "") @JsonProperty("category") - public Category getCategory() { + public @Valid Category getCategory() { return category; } @@ -142,10 +138,9 @@ public Pet name(String name) { * Get name * @return name */ - @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -170,10 +165,9 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("photoUrls") - public List getPhotoUrls() { + public @NotNull List getPhotoUrls() { return photoUrls; } @@ -181,7 +175,7 @@ public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List<@Valid Tag> tags) { + public Pet tags(List tags) { this.tags = tags; return this; } @@ -198,14 +192,13 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Valid @ApiModelProperty(value = "") @JsonProperty("tags") public List<@Valid Tag> getTags() { return tags; } - public void setTags(List<@Valid Tag> tags) { + public void setTags(List tags) { this.tags = tags; } @@ -219,11 +212,10 @@ public Pet status(StatusEnum status) { * @return status * @deprecated */ - @ApiModelProperty(value = "pet status in the store") @JsonProperty("status") @Deprecated - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -282,4 +274,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/model/Tag.java index ad381537546e..c049d8369909 100644 --- a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/model/Tag.java @@ -36,7 +36,6 @@ public Tag id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -56,7 +55,6 @@ public Tag name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -106,4 +104,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/model/User.java index e3db6d80260e..5a700b967918 100644 --- a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/model/User.java @@ -48,7 +48,6 @@ public User id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -68,7 +67,6 @@ public User username(String username) { * Get username * @return username */ - @ApiModelProperty(value = "") @JsonProperty("username") public String getUsername() { @@ -88,7 +86,6 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @ApiModelProperty(value = "") @JsonProperty("firstName") public String getFirstName() { @@ -108,7 +105,6 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @ApiModelProperty(value = "") @JsonProperty("lastName") public String getLastName() { @@ -128,7 +124,6 @@ public User email(String email) { * Get email * @return email */ - @ApiModelProperty(value = "") @JsonProperty("email") public String getEmail() { @@ -148,7 +143,6 @@ public User password(String password) { * Get password * @return password */ - @ApiModelProperty(value = "") @JsonProperty("password") public String getPassword() { @@ -168,7 +162,6 @@ public User phone(String phone) { * Get phone * @return phone */ - @ApiModelProperty(value = "") @JsonProperty("phone") public String getPhone() { @@ -188,7 +181,6 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @ApiModelProperty(value = "User Status") @JsonProperty("userStatus") public Integer getUserStatus() { @@ -250,4 +242,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java index 8bb97620f117..b2bdefe2fb50 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -52,7 +52,7 @@ default AnotherFakeApiDelegate getDelegate() { ) default ResponseEntity call123testSpecialTags( - @ApiParam(value = "client model", required = true) @Valid @RequestBody Client client + @ApiParam(value = "client model", required = true) @RequestBody @NotNull @Valid Client client ) { return getDelegate().call123testSpecialTags(client); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java index 97113e366d57..a68b51dd3cd1 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java @@ -62,7 +62,7 @@ default FakeApiDelegate getDelegate() { ) default ResponseEntity createXmlItem( - @ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem + @ApiParam(value = "XmlItem Body", required = true) @RequestBody @NotNull @Valid XmlItem xmlItem ) { return getDelegate().createXmlItem(xmlItem); } @@ -93,7 +93,7 @@ default ResponseEntity createXmlItem( ) default ResponseEntity fakeOuterBooleanSerialize( - @ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body + @ApiParam(value = "Input boolean as post body") @RequestBody(required = false) Boolean body ) { return getDelegate().fakeOuterBooleanSerialize(body); } @@ -124,7 +124,7 @@ default ResponseEntity fakeOuterBooleanSerialize( ) default ResponseEntity fakeOuterCompositeSerialize( - @ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite outerComposite + @ApiParam(value = "Input composite as post body") @RequestBody(required = false) @Valid OuterComposite outerComposite ) { return getDelegate().fakeOuterCompositeSerialize(outerComposite); } @@ -155,7 +155,7 @@ default ResponseEntity fakeOuterCompositeSerialize( ) default ResponseEntity fakeOuterNumberSerialize( - @ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body + @ApiParam(value = "Input number as post body") @RequestBody(required = false) BigDecimal body ) { return getDelegate().fakeOuterNumberSerialize(body); } @@ -186,7 +186,7 @@ default ResponseEntity fakeOuterNumberSerialize( ) default ResponseEntity fakeOuterStringSerialize( - @ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body + @ApiParam(value = "Input string as post body") @RequestBody(required = false) String body ) { return getDelegate().fakeOuterStringSerialize(body); } @@ -215,7 +215,7 @@ default ResponseEntity fakeOuterStringSerialize( ) default ResponseEntity responseObjectDifferentNames( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") @NotNull Long petId ) { return getDelegate().responseObjectDifferentNames(petId); } @@ -244,7 +244,7 @@ default ResponseEntity responseObjectDiff ) default ResponseEntity testBodyWithFileSchema( - @ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass fileSchemaTestClass + @ApiParam(value = "", required = true) @RequestBody @NotNull @Valid FileSchemaTestClass fileSchemaTestClass ) { return getDelegate().testBodyWithFileSchema(fileSchemaTestClass); } @@ -273,8 +273,8 @@ default ResponseEntity testBodyWithFileSchema( ) default ResponseEntity testBodyWithQueryParams( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, - @ApiParam(value = "", required = true) @Valid @RequestBody User user + @ApiParam(value = "", required = true) @RequestParam(value = "query") @NotNull String query, + @ApiParam(value = "", required = true) @RequestBody @NotNull @Valid User user ) { return getDelegate().testBodyWithQueryParams(query, user); } @@ -305,7 +305,7 @@ default ResponseEntity testBodyWithQueryParams( ) default ResponseEntity testClientModel( - @ApiParam(value = "client model", required = true) @Valid @RequestBody Client client + @ApiParam(value = "client model", required = true) @RequestBody @NotNull @Valid Client client ) { return getDelegate().testClientModel(client); } @@ -352,20 +352,20 @@ default ResponseEntity testClientModel( ) default ResponseEntity testEndpointParameters( - @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "number", required = true) BigDecimal number, - @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "double", required = true) Double _double, - @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, - @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "byte", required = true) byte[] _byte, - @ApiParam(value = "None") @Valid @RequestParam(value = "integer", required = false) Integer integer, - @ApiParam(value = "None") @Valid @RequestParam(value = "int32", required = false) Integer int32, - @ApiParam(value = "None") @Valid @RequestParam(value = "int64", required = false) Long int64, - @ApiParam(value = "None") @Valid @RequestParam(value = "float", required = false) Float _float, - @ApiParam(value = "None") @Valid @RequestParam(value = "string", required = false) String string, + @ApiParam(value = "None", required = true) @RequestParam(value = "number") @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal number, + @ApiParam(value = "None", required = true) @RequestParam(value = "double") @NotNull @DecimalMin("67.8") @DecimalMax("123.4") Double _double, + @ApiParam(value = "None", required = true) @RequestParam(value = "pattern_without_delimiter") @NotNull @Pattern(regexp = "^[A-Z].*") String patternWithoutDelimiter, + @ApiParam(value = "None", required = true) @RequestParam(value = "byte") @NotNull byte[] _byte, + @ApiParam(value = "None") @RequestParam(value = "integer", required = false) @Min(10) @Max(100) Integer integer, + @ApiParam(value = "None") @RequestParam(value = "int32", required = false) @Min(20) @Max(200) Integer int32, + @ApiParam(value = "None") @RequestParam(value = "int64", required = false) Long int64, + @ApiParam(value = "None") @RequestParam(value = "float", required = false) @DecimalMax("987.6") Float _float, + @ApiParam(value = "None") @RequestParam(value = "string", required = false) @Pattern(regexp = "/[a-z]/i") String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @ApiParam(value = "None") @Valid @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, - @ApiParam(value = "None") @Valid @RequestParam(value = "password", required = false) String password, - @ApiParam(value = "None") @Valid @RequestParam(value = "callback", required = false) String paramCallback + @ApiParam(value = "None") @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @RequestParam(value = "password", required = false) @Size(min = 10, max = 64) String password, + @ApiParam(value = "None") @RequestParam(value = "callback", required = false) String paramCallback ) { return getDelegate().testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); } @@ -403,14 +403,14 @@ default ResponseEntity testEndpointParameters( ) default ResponseEntity testEnumParameters( - @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, - @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, - @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, - @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, - @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString + @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestParam(value = "enum_form_string", required = false) String enumFormString ) { return getDelegate().testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } @@ -443,12 +443,12 @@ default ResponseEntity testEnumParameters( ) default ResponseEntity testGroupParameters( - @NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @ApiParam(value = "Required String in group parameters", required = true) @RequestParam(value = "required_string_group") @NotNull Integer requiredStringGroup, @NotNull @ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, - @NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, - @ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup, + @ApiParam(value = "Required Integer in group parameters", required = true) @RequestParam(value = "required_int64_group") @NotNull Long requiredInt64Group, + @ApiParam(value = "String in group parameters") @RequestParam(value = "string_group", required = false) Integer stringGroup, @ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup, - @ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + @ApiParam(value = "Integer in group parameters") @RequestParam(value = "int64_group", required = false) Long int64Group ) { return getDelegate().testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); } @@ -477,7 +477,7 @@ default ResponseEntity testGroupParameters( ) default ResponseEntity testInlineAdditionalProperties( - @ApiParam(value = "request body", required = true) @Valid @RequestBody Map requestBody + @ApiParam(value = "request body", required = true) @RequestBody @NotNull Map requestBody ) { return getDelegate().testInlineAdditionalProperties(requestBody); } @@ -507,8 +507,8 @@ default ResponseEntity testInlineAdditionalProperties( ) default ResponseEntity testJsonFormData( - @ApiParam(value = "field1", required = true) @Valid @RequestParam(value = "param", required = true) String param, - @ApiParam(value = "field2", required = true) @Valid @RequestParam(value = "param2", required = true) String param2 + @ApiParam(value = "field1", required = true) @RequestParam(value = "param") @NotNull String param, + @ApiParam(value = "field2", required = true) @RequestParam(value = "param2") @NotNull String param2 ) { return getDelegate().testJsonFormData(param, param2); } @@ -537,7 +537,7 @@ default ResponseEntity testJsonFormData( ) default ResponseEntity testNullable( - @ApiParam(value = "request body", required = true) @Valid @RequestBody ChildWithNullable childWithNullable + @ApiParam(value = "request body", required = true) @RequestBody @NotNull @Valid ChildWithNullable childWithNullable ) { return getDelegate().testNullable(childWithNullable); } @@ -568,10 +568,10 @@ default ResponseEntity testNullable( ) default ResponseEntity testQueryParameterCollectionFormat( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + @ApiParam(value = "", required = true) @RequestParam(value = "pipe") @NotNull List pipe, + @ApiParam(value = "", required = true) @RequestParam(value = "http") @NotNull List http, + @ApiParam(value = "", required = true) @RequestParam(value = "url") @NotNull List url, + @ApiParam(value = "", required = true) @RequestParam(value = "context") @NotNull List context ) { return getDelegate().testQueryParameterCollectionFormat(pipe, http, url, context); } @@ -639,9 +639,9 @@ default ResponseEntity testWithResultExample( ) default ResponseEntity uploadFileWithRequiredFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, - @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, - @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") @NotNull Long petId, + @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile") MultipartFile requiredFile, + @ApiParam(value = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata ) { return getDelegate().uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java index b37b0d70c217..42abdb2c28b5 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -237,14 +237,14 @@ default ResponseEntity testEndpointParameters(BigDecimal number, * or Not found (status code 404) * @see FakeApi#testEnumParameters */ - default ResponseEntity testEnumParameters(List enumHeaderStringArray, - String enumHeaderString, - List enumQueryStringArray, - String enumQueryString, - Integer enumQueryInteger, - Double enumQueryDouble, - List enumFormStringArray, - String enumFormString) { + default ResponseEntity testEnumParameters(List enumHeaderStringArray, + EnumHeaderStringEnum enumHeaderString, + List enumQueryStringArray, + EnumQueryStringEnum enumQueryString, + EnumQueryIntegerEnum enumQueryInteger, + EnumQueryDoubleEnum enumQueryDouble, + List enumFormStringArray, + EnumFormStringEnum enumFormString) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 6e2af4ca2728..c23cdf6a6b52 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -55,7 +55,7 @@ default FakeClassnameTestApiDelegate getDelegate() { ) default ResponseEntity testClassname( - @ApiParam(value = "client model", required = true) @Valid @RequestBody Client client + @ApiParam(value = "client model", required = true) @RequestBody @NotNull @Valid Client client ) { return getDelegate().testClassname(client); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java index e7799a01dea5..874129164bb2 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java @@ -60,7 +60,7 @@ default PetApiDelegate getDelegate() { ) default ResponseEntity addPet( - @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet pet ) { return getDelegate().addPet(pet); } @@ -97,7 +97,7 @@ default ResponseEntity addPet( ) default ResponseEntity deletePet( - @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") @NotNull Long petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey ) { return getDelegate().deletePet(petId, apiKey); @@ -118,7 +118,7 @@ default ResponseEntity deletePet( nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, - responseContainer = "List", + responseContainer = "array", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @@ -127,7 +127,7 @@ default ResponseEntity deletePet( } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "array"), @ApiResponse(code = 400, message = "Invalid status value") }) @RequestMapping( @@ -137,7 +137,7 @@ default ResponseEntity deletePet( ) default ResponseEntity> findPetsByStatus( - @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status + @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @RequestParam(value = "status") @NotNull List status ) { return getDelegate().findPetsByStatus(status); } @@ -159,7 +159,7 @@ default ResponseEntity> findPetsByStatus( nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, - responseContainer = "Set", + responseContainer = "set", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @@ -168,7 +168,7 @@ default ResponseEntity> findPetsByStatus( } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "Set"), + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "set"), @ApiResponse(code = 400, message = "Invalid tag value") }) @RequestMapping( @@ -178,7 +178,7 @@ default ResponseEntity> findPetsByStatus( ) default ResponseEntity> findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags + @ApiParam(value = "Tags to filter by", required = true) @RequestParam(value = "tags") @NotNull Set tags ) { return getDelegate().findPetsByTags(tags); } @@ -215,7 +215,7 @@ default ResponseEntity> findPetsByTags( ) default ResponseEntity getPetById( - @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") @NotNull Long petId ) { return getDelegate().getPetById(petId); } @@ -256,7 +256,7 @@ default ResponseEntity getPetById( ) default ResponseEntity updatePet( - @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet pet ) { return getDelegate().updatePet(pet); } @@ -293,9 +293,9 @@ default ResponseEntity updatePet( ) default ResponseEntity updatePetWithForm( - @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, - @ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, - @ApiParam(value = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status + @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") @NotNull Long petId, + @ApiParam(value = "Updated name of the pet") @RequestParam(value = "name", required = false) String name, + @ApiParam(value = "Updated status of the pet") @RequestParam(value = "status", required = false) String status ) { return getDelegate().updatePetWithForm(petId, name, status); } @@ -334,8 +334,8 @@ default ResponseEntity updatePetWithForm( ) default ResponseEntity uploadFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, - @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") @NotNull Long petId, + @ApiParam(value = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) { return getDelegate().uploadFile(petId, additionalMetadata, file); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java index a30221d94724..bd31f7057d3c 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -66,7 +66,7 @@ default ResponseEntity deletePet(Long petId, * or Invalid status value (status code 400) * @see PetApi#findPetsByStatus */ - default ResponseEntity> findPetsByStatus(List status) { + default ResponseEntity> findPetsByStatus(List status) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java index b3cec0630d07..4ea4bf5437fa 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java @@ -52,7 +52,7 @@ default StoreApiDelegate getDelegate() { ) default ResponseEntity deleteOrder( - @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") @NotNull String orderId ) { return getDelegate().deleteOrder(orderId); } @@ -70,13 +70,13 @@ default ResponseEntity deleteOrder( nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, - responseContainer = "Map", + responseContainer = "map", authorizations = { @Authorization(value = "api_key") } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "map") }) @RequestMapping( method = RequestMethod.GET, @@ -119,7 +119,7 @@ default ResponseEntity> getInventory( ) default ResponseEntity getOrderById( - @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") @NotNull @Min(1L) @Max(5L) Long orderId ) { return getDelegate().getOrderById(orderId); } @@ -152,7 +152,7 @@ default ResponseEntity getOrderById( ) default ResponseEntity placeOrder( - @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order + @ApiParam(value = "order placed for purchasing the pet", required = true) @RequestBody @NotNull @Valid Order order ) { return getDelegate().placeOrder(order); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java index ac7e7d67ed3c..1822fa503cb0 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java @@ -51,7 +51,7 @@ default UserApiDelegate getDelegate() { ) default ResponseEntity createUser( - @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User user + @ApiParam(value = "Created user object", required = true) @RequestBody @NotNull @Valid User user ) { return getDelegate().createUser(user); } @@ -80,7 +80,7 @@ default ResponseEntity createUser( ) default ResponseEntity createUsersWithArrayInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + @ApiParam(value = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> user ) { return getDelegate().createUsersWithArrayInput(user); } @@ -109,7 +109,7 @@ default ResponseEntity createUsersWithArrayInput( ) default ResponseEntity createUsersWithListInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + @ApiParam(value = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> user ) { return getDelegate().createUsersWithListInput(user); } @@ -139,7 +139,7 @@ default ResponseEntity createUsersWithListInput( ) default ResponseEntity deleteUser( - @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") @NotNull String username ) { return getDelegate().deleteUser(username); } @@ -173,7 +173,7 @@ default ResponseEntity deleteUser( ) default ResponseEntity getUserByName( - @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") @NotNull String username ) { return getDelegate().getUserByName(username); } @@ -206,8 +206,8 @@ default ResponseEntity getUserByName( ) default ResponseEntity loginUser( - @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, - @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + @ApiParam(value = "The user name for login", required = true) @RequestParam(value = "username") @NotNull String username, + @ApiParam(value = "The password for login in clear text", required = true) @RequestParam(value = "password") @NotNull String password ) { return getDelegate().loginUser(username, password); } @@ -266,8 +266,8 @@ default ResponseEntity logoutUser( ) default ResponseEntity updateUser( - @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, - @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User user + @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") @NotNull String username, + @ApiParam(value = "Updated user object", required = true) @RequestBody @NotNull @Valid User user ) { return getDelegate().updateUser(username, user); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java index dd48a55ef65a..176522acd979 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java @@ -47,7 +47,7 @@ default ResponseEntity createUser(User user) { * @return successful operation (status code 200) * @see UserApi#createUsersWithArrayInput */ - default ResponseEntity createUsersWithArrayInput(List<@Valid User> user) { + default ResponseEntity createUsersWithArrayInput(List user) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -60,7 +60,7 @@ default ResponseEntity createUsersWithArrayInput(List<@Valid User> user) { * @return successful operation (status code 200) * @see UserApi#createUsersWithListInput */ - default ResponseEntity createUsersWithListInput(List<@Valid User> user) { + default ResponseEntity createUsersWithListInput(List user) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index b5124aadf1c7..bfdfb29af816 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -36,7 +36,7 @@ public AdditionalPropertiesAnyType() { * Constructor with all args parameters */ public AdditionalPropertiesAnyType(String name) { - this.name = name; + this.name = name; } public AdditionalPropertiesAnyType name(String name) { @@ -48,7 +48,6 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -136,4 +135,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 98130f8adde1..e4e940a6b1e6 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -37,7 +37,7 @@ public AdditionalPropertiesArray() { * Constructor with all args parameters */ public AdditionalPropertiesArray(String name) { - this.name = name; + this.name = name; } public AdditionalPropertiesArray name(String name) { @@ -49,7 +49,6 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -137,4 +136,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 16c4d3b65b51..d1605fec7d57 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -36,7 +36,7 @@ public AdditionalPropertiesBoolean() { * Constructor with all args parameters */ public AdditionalPropertiesBoolean(String name) { - this.name = name; + this.name = name; } public AdditionalPropertiesBoolean name(String name) { @@ -48,7 +48,6 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -136,4 +135,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index b23241788a81..28279400271f 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -29,33 +29,25 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class AdditionalPropertiesClass { - @Valid private Map mapString = new HashMap<>(); - @Valid private Map mapNumber = new HashMap<>(); - @Valid private Map mapInteger = new HashMap<>(); - @Valid private Map mapBoolean = new HashMap<>(); - @Valid private Map> mapArrayInteger = new HashMap<>(); - @Valid private Map> mapArrayAnytype = new HashMap<>(); - @Valid private Map> mapMapString = new HashMap<>(); - @Valid private Map> mapMapAnytype = new HashMap<>(); private Object anytype1; - private JsonNullable anytype2 = JsonNullable.undefined(); + private JsonNullable anytype2 = JsonNullable.of(null); private Object anytype3; @@ -66,18 +58,18 @@ public AdditionalPropertiesClass() { /** * Constructor with all args parameters */ - public AdditionalPropertiesClass(Map mapString, Map mapNumber, Map mapInteger, Map mapBoolean, Map> mapArrayInteger, Map> mapArrayAnytype, Map> mapMapString, Map> mapMapAnytype, Object anytype1, Object anytype2, Object anytype3) { - this.mapString = mapString; - this.mapNumber = mapNumber; - this.mapInteger = mapInteger; - this.mapBoolean = mapBoolean; - this.mapArrayInteger = mapArrayInteger; - this.mapArrayAnytype = mapArrayAnytype; - this.mapMapString = mapMapString; - this.mapMapAnytype = mapMapAnytype; - this.anytype1 = anytype1; - this.anytype2 = JsonNullable.of(anytype2); - this.anytype3 = anytype3; + public AdditionalPropertiesClass(Map mapString, Map mapNumber, Map mapInteger, Map mapBoolean, Map> mapArrayInteger, Map> mapArrayAnytype, Map> mapMapString, Map> mapMapAnytype, Object anytype1, JsonNullable anytype2, Object anytype3) { + this.mapString = mapString; + this.mapNumber = mapNumber; + this.mapInteger = mapInteger; + this.mapBoolean = mapBoolean; + this.mapArrayInteger = mapArrayInteger; + this.mapArrayAnytype = mapArrayAnytype; + this.mapMapString = mapMapString; + this.mapMapAnytype = mapMapAnytype; + this.anytype1 = anytype1; + this.anytype2 = anytype2; + this.anytype3 = anytype3; } public AdditionalPropertiesClass mapString(Map mapString) { @@ -97,7 +89,6 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ - @ApiModelProperty(value = "") @JsonProperty("map_string") public Map getMapString() { @@ -125,7 +116,6 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("map_number") public Map getMapNumber() { @@ -153,7 +143,6 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ - @ApiModelProperty(value = "") @JsonProperty("map_integer") public Map getMapInteger() { @@ -181,7 +170,6 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ - @ApiModelProperty(value = "") @JsonProperty("map_boolean") public Map getMapBoolean() { @@ -209,7 +197,6 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { @@ -237,7 +224,6 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ - @Valid @ApiModelProperty(value = "") @JsonProperty("map_array_anytype") public Map> getMapArrayAnytype() { @@ -265,7 +251,6 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { @@ -293,7 +278,6 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { @@ -313,7 +297,6 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ - @ApiModelProperty(value = "") @JsonProperty("anytype_1") public Object getAnytype1() { @@ -324,8 +307,8 @@ public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; } - public AdditionalPropertiesClass anytype2(Object anytype2) { - this.anytype2 = JsonNullable.of(anytype2); + public AdditionalPropertiesClass anytype2(JsonNullable anytype2) { + this.anytype2 = anytype2; return this; } @@ -333,7 +316,6 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ - @ApiModelProperty(value = "") @JsonProperty("anytype_2") public JsonNullable getAnytype2() { @@ -353,7 +335,6 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ - @ApiModelProperty(value = "") @JsonProperty("anytype_3") public Object getAnytype3() { @@ -432,4 +413,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 886091da9994..91a5c29eb71b 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -36,7 +36,7 @@ public AdditionalPropertiesInteger() { * Constructor with all args parameters */ public AdditionalPropertiesInteger(String name) { - this.name = name; + this.name = name; } public AdditionalPropertiesInteger name(String name) { @@ -48,7 +48,6 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -136,4 +135,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 899e21653cf2..53600446b6f1 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -37,7 +37,7 @@ public AdditionalPropertiesNumber() { * Constructor with all args parameters */ public AdditionalPropertiesNumber(String name) { - this.name = name; + this.name = name; } public AdditionalPropertiesNumber name(String name) { @@ -49,7 +49,6 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -137,4 +136,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 3ffc83a893d8..e2f682258a01 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -37,7 +37,7 @@ public AdditionalPropertiesObject() { * Constructor with all args parameters */ public AdditionalPropertiesObject(String name) { - this.name = name; + this.name = name; } public AdditionalPropertiesObject name(String name) { @@ -49,7 +49,6 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -137,4 +136,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 4507946a911f..5de3e0e0fb68 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -36,7 +36,7 @@ public AdditionalPropertiesString() { * Constructor with all args parameters */ public AdditionalPropertiesString(String name) { - this.name = name; + this.name = name; } public AdditionalPropertiesString name(String name) { @@ -48,7 +48,6 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -136,4 +135,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java index 828aac9ba011..1a4a21c7fbf5 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java @@ -36,7 +36,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class Animal { - private String className; + private @NotNull String className; private String color = "red"; @@ -55,8 +55,8 @@ public Animal(String className) { * Constructor with all args parameters */ public Animal(String className, String color) { - this.className = className; - this.color = color; + this.className = className; + this.color = color; } public Animal className(String className) { @@ -68,10 +68,9 @@ public Animal className(String className) { * Get className * @return className */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("className") - public String getClassName() { + public @NotNull String getClassName() { return className; } @@ -88,7 +87,6 @@ public Animal color(String color) { * Get color * @return color */ - @ApiModelProperty(value = "") @JsonProperty("color") public String getColor() { @@ -138,4 +136,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 12176b1765e7..3717bab7c477 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnly { - @Valid private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnly() { @@ -37,7 +36,7 @@ public ArrayOfArrayOfNumberOnly() { * Constructor with all args parameters */ public ArrayOfArrayOfNumberOnly(List> arrayArrayNumber) { - this.arrayArrayNumber = arrayArrayNumber; + this.arrayArrayNumber = arrayArrayNumber; } public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { @@ -57,7 +56,6 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("ArrayArrayNumber") public List> getArrayArrayNumber() { @@ -105,4 +103,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index c78c78e25581..3335418da38b 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayOfNumberOnly { - @Valid private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnly() { @@ -37,7 +36,7 @@ public ArrayOfNumberOnly() { * Constructor with all args parameters */ public ArrayOfNumberOnly(List arrayNumber) { - this.arrayNumber = arrayNumber; + this.arrayNumber = arrayNumber; } public ArrayOfNumberOnly arrayNumber(List arrayNumber) { @@ -57,7 +56,6 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("ArrayNumber") public List getArrayNumber() { @@ -105,4 +103,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java index b02fdb3c238b..a74604768676 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java @@ -26,13 +26,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayTest { - @Valid private List arrayOfString = new ArrayList<>(); - @Valid private List> arrayArrayOfInteger = new ArrayList<>(); - @Valid private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTest() { @@ -42,10 +39,10 @@ public ArrayTest() { /** * Constructor with all args parameters */ - public ArrayTest(List arrayOfString, List> arrayArrayOfInteger, List> arrayArrayOfModel) { - this.arrayOfString = arrayOfString; - this.arrayArrayOfInteger = arrayArrayOfInteger; - this.arrayArrayOfModel = arrayArrayOfModel; + public ArrayTest(List arrayOfString, List> arrayArrayOfInteger, List> arrayArrayOfModel) { + this.arrayOfString = arrayOfString; + this.arrayArrayOfInteger = arrayArrayOfInteger; + this.arrayArrayOfModel = arrayArrayOfModel; } public ArrayTest arrayOfString(List arrayOfString) { @@ -65,7 +62,6 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ - @ApiModelProperty(value = "") @JsonProperty("array_of_string") public List getArrayOfString() { @@ -93,7 +89,6 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ - @Valid @ApiModelProperty(value = "") @JsonProperty("array_array_of_integer") public List> getArrayArrayOfInteger() { @@ -104,12 +99,12 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } - public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) { + public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { if (this.arrayArrayOfModel == null) { this.arrayArrayOfModel = new ArrayList<>(); } @@ -121,14 +116,13 @@ public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayO * Get arrayArrayOfModel * @return arrayArrayOfModel */ - @Valid @ApiModelProperty(value = "") @JsonProperty("array_array_of_model") public List> getArrayArrayOfModel() { return arrayArrayOfModel; } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { + public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } @@ -173,4 +167,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java index 8066bde979db..936fca0c1445 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java @@ -67,7 +67,7 @@ public static KindEnum fromValue(String value) { } } - private KindEnum kind; + private String kind; public BigCat() { super(); @@ -84,8 +84,8 @@ public BigCat(String className) { * Constructor with all args parameters */ public BigCat(KindEnum kind, Boolean declawed, String className, String color) { - super(declawed, className, color); - this.kind = kind; + super(declawed, className, color); + this.kind = kind; } public BigCat kind(KindEnum kind) { @@ -97,10 +97,9 @@ public BigCat kind(KindEnum kind) { * Get kind * @return kind */ - @ApiModelProperty(value = "") @JsonProperty("kind") - public KindEnum getKind() { + public String getKind() { return kind; } @@ -162,4 +161,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Capitalization.java index b6715490a0db..b355c6afae6e 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Capitalization.java @@ -42,12 +42,12 @@ public Capitalization() { * Constructor with all args parameters */ public Capitalization(String smallCamel, String capitalCamel, String smallSnake, String capitalSnake, String scAETHFlowPoints, String ATT_NAME) { - this.smallCamel = smallCamel; - this.capitalCamel = capitalCamel; - this.smallSnake = smallSnake; - this.capitalSnake = capitalSnake; - this.scAETHFlowPoints = scAETHFlowPoints; - this.ATT_NAME = ATT_NAME; + this.smallCamel = smallCamel; + this.capitalCamel = capitalCamel; + this.smallSnake = smallSnake; + this.capitalSnake = capitalSnake; + this.scAETHFlowPoints = scAETHFlowPoints; + this.ATT_NAME = ATT_NAME; } public Capitalization smallCamel(String smallCamel) { @@ -59,7 +59,6 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ - @ApiModelProperty(value = "") @JsonProperty("smallCamel") public String getSmallCamel() { @@ -79,7 +78,6 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ - @ApiModelProperty(value = "") @JsonProperty("CapitalCamel") public String getCapitalCamel() { @@ -99,7 +97,6 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ - @ApiModelProperty(value = "") @JsonProperty("small_Snake") public String getSmallSnake() { @@ -119,7 +116,6 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ - @ApiModelProperty(value = "") @JsonProperty("Capital_Snake") public String getCapitalSnake() { @@ -139,7 +135,6 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ - @ApiModelProperty(value = "") @JsonProperty("SCA_ETH_Flow_Points") public String getScAETHFlowPoints() { @@ -159,7 +154,6 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ - @ApiModelProperty(value = "Name of the pet ") @JsonProperty("ATT_NAME") public String getATTNAME() { @@ -217,4 +211,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java index dfacc4e55265..9d97bb2786b8 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java @@ -52,8 +52,8 @@ public Cat(String className) { * Constructor with all args parameters */ public Cat(Boolean declawed, String className, String color) { - super(className, color); - this.declawed = declawed; + super(className, color); + this.declawed = declawed; } public Cat declawed(Boolean declawed) { @@ -65,7 +65,6 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ - @ApiModelProperty(value = "") @JsonProperty("declawed") public Boolean getDeclawed() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java index dd4285b052ab..63857243c5ba 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java @@ -24,7 +24,7 @@ public class Category { private Long id; - private String name = "default-name"; + private @NotNull String name = "default-name"; public Category() { super(); @@ -41,8 +41,8 @@ public Category(String name) { * Constructor with all args parameters */ public Category(Long id, String name) { - this.id = id; - this.name = name; + this.id = id; + this.name = name; } public Category id(Long id) { @@ -54,7 +54,6 @@ public Category id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -74,10 +73,9 @@ public Category name(String name) { * Get name * @return name */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -124,4 +122,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ChildWithNullable.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ChildWithNullable.java index 3c688d2e59f4..256ff2069c2e 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ChildWithNullable.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ChildWithNullable.java @@ -39,9 +39,9 @@ public ChildWithNullable() { /** * Constructor with all args parameters */ - public ChildWithNullable(String otherProperty, TypeEnum type, String nullableProperty) { - super(type, nullableProperty); - this.otherProperty = otherProperty; + public ChildWithNullable(String otherProperty, TypeEnum type, JsonNullable nullableProperty) { + super(type, nullableProperty); + this.otherProperty = otherProperty; } public ChildWithNullable otherProperty(String otherProperty) { @@ -53,7 +53,6 @@ public ChildWithNullable otherProperty(String otherProperty) { * Get otherProperty * @return otherProperty */ - @ApiModelProperty(value = "") @JsonProperty("otherProperty") public String getOtherProperty() { @@ -70,7 +69,7 @@ public ChildWithNullable type(TypeEnum type) { return this; } - public ChildWithNullable nullableProperty(String nullableProperty) { + public ChildWithNullable nullableProperty(JsonNullable nullableProperty) { super.nullableProperty(nullableProperty); return this; } @@ -124,4 +123,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ClassModel.java index a463062b4203..953572088a77 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ClassModel.java @@ -33,7 +33,7 @@ public ClassModel() { * Constructor with all args parameters */ public ClassModel(String propertyClass) { - this.propertyClass = propertyClass; + this.propertyClass = propertyClass; } public ClassModel propertyClass(String propertyClass) { @@ -45,7 +45,6 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @ApiModelProperty(value = "") @JsonProperty("_class") public String getPropertyClass() { @@ -93,4 +92,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Client.java index 0d6e021a2617..ae3bfa810628 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Client.java @@ -32,7 +32,7 @@ public Client() { * Constructor with all args parameters */ public Client(String client) { - this.client = client; + this.client = client; } public Client client(String client) { @@ -44,7 +44,6 @@ public Client client(String client) { * Get client * @return client */ - @ApiModelProperty(value = "") @JsonProperty("client") public String getClient() { @@ -92,4 +91,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ContainerDefaultValue.java index 00235a87d16a..7aac31f65790 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ContainerDefaultValue.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -27,17 +27,13 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ContainerDefaultValue { - @Valid - private JsonNullable> nullableArray = JsonNullable.>undefined(); + private JsonNullable> nullableArray = JsonNullable.undefined(); - @Valid - private JsonNullable> nullableRequiredArray = JsonNullable.>undefined(); + private JsonNullable> nullableRequiredArray = JsonNullable.undefined(); - @Valid - private List requiredArray = new ArrayList<>(); + private @NotNull List requiredArray = new ArrayList<>(); - @Valid - private JsonNullable> nullableArrayWithDefault = JsonNullable.>undefined(); + private JsonNullable> nullableArrayWithDefault = JsonNullable.of(new ArrayList<>(Arrays.asList("foo", "bar"))); public ContainerDefaultValue() { super(); @@ -46,23 +42,23 @@ public ContainerDefaultValue() { /** * Constructor with only required parameters */ - public ContainerDefaultValue(List nullableRequiredArray, List requiredArray) { - this.nullableRequiredArray = JsonNullable.of(nullableRequiredArray); + public ContainerDefaultValue(JsonNullable> nullableRequiredArray, List requiredArray) { + this.nullableRequiredArray = nullableRequiredArray; this.requiredArray = requiredArray; } /** * Constructor with all args parameters */ - public ContainerDefaultValue(List nullableArray, List nullableRequiredArray, List requiredArray, List nullableArrayWithDefault) { - this.nullableArray = JsonNullable.of(nullableArray); - this.nullableRequiredArray = JsonNullable.of(nullableRequiredArray); - this.requiredArray = requiredArray; - this.nullableArrayWithDefault = JsonNullable.of(nullableArrayWithDefault); + public ContainerDefaultValue(JsonNullable> nullableArray, JsonNullable> nullableRequiredArray, List requiredArray, JsonNullable> nullableArrayWithDefault) { + this.nullableArray = nullableArray; + this.nullableRequiredArray = nullableRequiredArray; + this.requiredArray = requiredArray; + this.nullableArrayWithDefault = nullableArrayWithDefault; } - public ContainerDefaultValue nullableArray(List nullableArray) { - this.nullableArray = JsonNullable.of(nullableArray); + public ContainerDefaultValue nullableArray(JsonNullable> nullableArray) { + this.nullableArray = nullableArray; return this; } @@ -78,7 +74,6 @@ public ContainerDefaultValue addNullableArrayItem(String nullableArrayItem) { * Get nullableArray * @return nullableArray */ - @ApiModelProperty(value = "") @JsonProperty("nullable_array") public JsonNullable> getNullableArray() { @@ -89,8 +84,8 @@ public void setNullableArray(JsonNullable> nullableArray) { this.nullableArray = nullableArray; } - public ContainerDefaultValue nullableRequiredArray(List nullableRequiredArray) { - this.nullableRequiredArray = JsonNullable.of(nullableRequiredArray); + public ContainerDefaultValue nullableRequiredArray(JsonNullable> nullableRequiredArray) { + this.nullableRequiredArray = nullableRequiredArray; return this; } @@ -106,7 +101,6 @@ public ContainerDefaultValue addNullableRequiredArrayItem(String nullableRequire * Get nullableRequiredArray * @return nullableRequiredArray */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("nullable_required_array") public JsonNullable> getNullableRequiredArray() { @@ -134,10 +128,9 @@ public ContainerDefaultValue addRequiredArrayItem(String requiredArrayItem) { * Get requiredArray * @return requiredArray */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("required_array") - public List getRequiredArray() { + public @NotNull List getRequiredArray() { return requiredArray; } @@ -145,8 +138,8 @@ public void setRequiredArray(List requiredArray) { this.requiredArray = requiredArray; } - public ContainerDefaultValue nullableArrayWithDefault(List nullableArrayWithDefault) { - this.nullableArrayWithDefault = JsonNullable.of(nullableArrayWithDefault); + public ContainerDefaultValue nullableArrayWithDefault(JsonNullable> nullableArrayWithDefault) { + this.nullableArrayWithDefault = nullableArrayWithDefault; return this; } @@ -162,7 +155,6 @@ public ContainerDefaultValue addNullableArrayWithDefaultItem(String nullableArra * Get nullableArrayWithDefault * @return nullableArrayWithDefault */ - @ApiModelProperty(value = "") @JsonProperty("nullable_array_with_default") public JsonNullable> getNullableArrayWithDefault() { @@ -227,4 +219,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java index 7027b95f53c0..4671356fa87a 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java @@ -44,8 +44,8 @@ public Dog(String className) { * Constructor with all args parameters */ public Dog(String breed, String className, String color) { - super(className, color); - this.breed = breed; + super(className, color); + this.breed = breed; } public Dog breed(String breed) { @@ -57,7 +57,6 @@ public Dog breed(String breed) { * Get breed * @return breed */ - @ApiModelProperty(value = "") @JsonProperty("breed") public String getBreed() { @@ -117,4 +116,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java index 81282b785a79..dda25970a3bb 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java @@ -61,7 +61,7 @@ public static JustSymbolEnum fromValue(String value) { } } - private JustSymbolEnum justSymbol; + private String justSymbol; /** * Gets or Sets arrayEnum @@ -98,8 +98,7 @@ public static ArrayEnumEnum fromValue(String value) { } } - @Valid - private List arrayEnum = new ArrayList<>(); + private List arrayEnum = new ArrayList<>(); public EnumArrays() { super(); @@ -109,8 +108,8 @@ public EnumArrays() { * Constructor with all args parameters */ public EnumArrays(JustSymbolEnum justSymbol, List arrayEnum) { - this.justSymbol = justSymbol; - this.arrayEnum = arrayEnum; + this.justSymbol = justSymbol; + this.arrayEnum = arrayEnum; } public EnumArrays justSymbol(JustSymbolEnum justSymbol) { @@ -122,10 +121,9 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ - @ApiModelProperty(value = "") @JsonProperty("just_symbol") - public JustSymbolEnum getJustSymbol() { + public String getJustSymbol() { return justSymbol; } @@ -150,10 +148,9 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ - @ApiModelProperty(value = "") @JsonProperty("array_enum") - public List getArrayEnum() { + public List getArrayEnum() { return arrayEnum; } @@ -200,4 +197,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java index e2004b7027e5..15f862469833 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java @@ -63,7 +63,7 @@ public static EnumStringEnum fromValue(String value) { } } - private EnumStringEnum enumString; + private String enumString; /** * Gets or Sets enumStringRequired @@ -102,7 +102,7 @@ public static EnumStringRequiredEnum fromValue(String value) { } } - private EnumStringRequiredEnum enumStringRequired; + private @NotNull String enumStringRequired; /** * Gets or Sets enumInteger @@ -139,7 +139,7 @@ public static EnumIntegerEnum fromValue(Integer value) { } } - private EnumIntegerEnum enumInteger; + private Integer enumInteger; /** * Gets or Sets enumNumber @@ -176,7 +176,7 @@ public static EnumNumberEnum fromValue(Double value) { } } - private EnumNumberEnum enumNumber; + private Double enumNumber; private OuterEnum outerEnum; @@ -195,11 +195,11 @@ public EnumTest(EnumStringRequiredEnum enumStringRequired) { * Constructor with all args parameters */ public EnumTest(EnumStringEnum enumString, EnumStringRequiredEnum enumStringRequired, EnumIntegerEnum enumInteger, EnumNumberEnum enumNumber, OuterEnum outerEnum) { - this.enumString = enumString; - this.enumStringRequired = enumStringRequired; - this.enumInteger = enumInteger; - this.enumNumber = enumNumber; - this.outerEnum = outerEnum; + this.enumString = enumString; + this.enumStringRequired = enumStringRequired; + this.enumInteger = enumInteger; + this.enumNumber = enumNumber; + this.outerEnum = outerEnum; } public EnumTest enumString(EnumStringEnum enumString) { @@ -211,10 +211,9 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ - @ApiModelProperty(value = "") @JsonProperty("enum_string") - public EnumStringEnum getEnumString() { + public String getEnumString() { return enumString; } @@ -231,10 +230,9 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("enum_string_required") - public EnumStringRequiredEnum getEnumStringRequired() { + public @NotNull String getEnumStringRequired() { return enumStringRequired; } @@ -251,10 +249,9 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ - @ApiModelProperty(value = "") @JsonProperty("enum_integer") - public EnumIntegerEnum getEnumInteger() { + public Integer getEnumInteger() { return enumInteger; } @@ -271,10 +268,9 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ - @ApiModelProperty(value = "") @JsonProperty("enum_number") - public EnumNumberEnum getEnumNumber() { + public Double getEnumNumber() { return enumNumber; } @@ -291,7 +287,6 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ - @Valid @ApiModelProperty(value = "") @JsonProperty("outerEnum") public OuterEnum getOuterEnum() { @@ -347,4 +342,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/File.java index acebdef92acc..b4812bc7ff5f 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/File.java @@ -33,7 +33,7 @@ public File() { * Constructor with all args parameters */ public File(String sourceURI) { - this.sourceURI = sourceURI; + this.sourceURI = sourceURI; } public File sourceURI(String sourceURI) { @@ -45,7 +45,6 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ - @ApiModelProperty(value = "Test capitalization") @JsonProperty("sourceURI") public String getSourceURI() { @@ -93,4 +92,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 12228a45d0c1..c0727d668e4a 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -26,9 +26,8 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class FileSchemaTestClass { - private File file; + private @Valid File file; - @Valid private List<@Valid File> files = new ArrayList<>(); public FileSchemaTestClass() { @@ -38,9 +37,9 @@ public FileSchemaTestClass() { /** * Constructor with all args parameters */ - public FileSchemaTestClass(File file, List<@Valid File> files) { - this.file = file; - this.files = files; + public FileSchemaTestClass(File file, List files) { + this.file = file; + this.files = files; } public FileSchemaTestClass file(File file) { @@ -52,10 +51,9 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ - @Valid @ApiModelProperty(value = "") @JsonProperty("file") - public File getFile() { + public @Valid File getFile() { return file; } @@ -63,7 +61,7 @@ public void setFile(File file) { this.file = file; } - public FileSchemaTestClass files(List<@Valid File> files) { + public FileSchemaTestClass files(List files) { this.files = files; return this; } @@ -80,14 +78,13 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ - @Valid @ApiModelProperty(value = "") @JsonProperty("files") public List<@Valid File> getFiles() { return files; } - public void setFiles(List<@Valid File> files) { + public void setFiles(List files) { this.files = files; } @@ -130,4 +127,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java index c5f9f6576553..9fc19966fc33 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java @@ -30,33 +30,33 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class FormatTest { - private Integer integer; + private @Min(10) @Max(100) Integer integer; - private Integer int32; + private @Min(20) @Max(200) Integer int32; private Long int64; - private BigDecimal number; + private @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal number; - private Float _float; + private @DecimalMin("54.3") @DecimalMax("987.6") Float _float; - private Double _double; + private @DecimalMin("67.8") @DecimalMax("123.4") Double _double; - private String string; + private @Pattern(regexp = "/[a-z]/i") String string; - private byte[] _byte; + private @NotNull byte[] _byte; private org.springframework.core.io.Resource binary; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) - private LocalDate date; + private @NotNull LocalDate date; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; private UUID uuid; - private String password; + private @NotNull @Size(min = 10, max = 64) String password; private BigDecimal bigDecimal; @@ -78,20 +78,20 @@ public FormatTest(BigDecimal number, byte[] _byte, LocalDate date, String passwo * Constructor with all args parameters */ public FormatTest(Integer integer, Integer int32, Long int64, BigDecimal number, Float _float, Double _double, String string, byte[] _byte, org.springframework.core.io.Resource binary, LocalDate date, OffsetDateTime dateTime, UUID uuid, String password, BigDecimal bigDecimal) { - this.integer = integer; - this.int32 = int32; - this.int64 = int64; - this.number = number; - this._float = _float; - this._double = _double; - this.string = string; - this._byte = _byte; - this.binary = binary; - this.date = date; - this.dateTime = dateTime; - this.uuid = uuid; - this.password = password; - this.bigDecimal = bigDecimal; + this.integer = integer; + this.int32 = int32; + this.int64 = int64; + this.number = number; + this._float = _float; + this._double = _double; + this.string = string; + this._byte = _byte; + this.binary = binary; + this.date = date; + this.dateTime = dateTime; + this.uuid = uuid; + this.password = password; + this.bigDecimal = bigDecimal; } public FormatTest integer(Integer integer) { @@ -105,10 +105,9 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ - @Min(10) @Max(100) @ApiModelProperty(value = "") @JsonProperty("integer") - public Integer getInteger() { + public @Min(10) @Max(100) Integer getInteger() { return integer; } @@ -127,10 +126,9 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ - @Min(20) @Max(200) @ApiModelProperty(value = "") @JsonProperty("int32") - public Integer getInt32() { + public @Min(20) @Max(200) Integer getInt32() { return int32; } @@ -147,7 +145,6 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ - @ApiModelProperty(value = "") @JsonProperty("int64") public Long getInt64() { @@ -169,10 +166,9 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ - @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(required = true, value = "") @JsonProperty("number") - public BigDecimal getNumber() { + public @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal getNumber() { return number; } @@ -191,10 +187,9 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ - @DecimalMin("54.3") @DecimalMax("987.6") @ApiModelProperty(value = "") @JsonProperty("float") - public Float getFloat() { + public @DecimalMin("54.3") @DecimalMax("987.6") Float getFloat() { return _float; } @@ -213,10 +208,9 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ - @DecimalMin("67.8") @DecimalMax("123.4") @ApiModelProperty(value = "") @JsonProperty("double") - public Double getDouble() { + public @DecimalMin("67.8") @DecimalMax("123.4") Double getDouble() { return _double; } @@ -233,10 +227,9 @@ public FormatTest string(String string) { * Get string * @return string */ - @Pattern(regexp = "/[a-z]/i") @ApiModelProperty(value = "") @JsonProperty("string") - public String getString() { + public @Pattern(regexp = "/[a-z]/i") String getString() { return string; } @@ -253,10 +246,9 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("byte") - public byte[] getByte() { + public @NotNull byte[] getByte() { return _byte; } @@ -273,7 +265,6 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ - @Valid @ApiModelProperty(value = "") @JsonProperty("binary") public org.springframework.core.io.Resource getBinary() { @@ -293,10 +284,9 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ - @NotNull @Valid @ApiModelProperty(required = true, value = "") @JsonProperty("date") - public LocalDate getDate() { + public @NotNull LocalDate getDate() { return date; } @@ -313,7 +303,6 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ - @Valid @ApiModelProperty(value = "") @JsonProperty("dateTime") public OffsetDateTime getDateTime() { @@ -333,7 +322,6 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ - @Valid @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") @JsonProperty("uuid") public UUID getUuid() { @@ -353,10 +341,9 @@ public FormatTest password(String password) { * Get password * @return password */ - @NotNull @Size(min = 10, max = 64) @ApiModelProperty(required = true, value = "") @JsonProperty("password") - public String getPassword() { + public @NotNull @Size(min = 10, max = 64) String getPassword() { return password; } @@ -373,7 +360,6 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ - @Valid @ApiModelProperty(value = "") @JsonProperty("BigDecimal") public BigDecimal getBigDecimal() { @@ -447,4 +433,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 4a57b7ba5b94..e1c88046ae9f 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -36,8 +36,8 @@ public HasOnlyReadOnly() { * Constructor with all args parameters */ public HasOnlyReadOnly(String bar, String foo) { - this.bar = bar; - this.foo = foo; + this.bar = bar; + this.foo = foo; } public HasOnlyReadOnly bar(String bar) { @@ -49,7 +49,6 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("bar") public String getBar() { @@ -69,7 +68,6 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("foo") public String getFoo() { @@ -119,4 +117,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java index 60f27aad0cff..2d55fc9c69d2 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class MapTest { - @Valid private Map> mapMapOfString = new HashMap<>(); /** @@ -63,13 +62,10 @@ public static InnerEnum fromValue(String value) { } } - @Valid - private Map mapOfEnumString = new HashMap<>(); + private Map mapOfEnumString = new HashMap<>(); - @Valid private Map directMap = new HashMap<>(); - @Valid private Map indirectMap = new HashMap<>(); public MapTest() { @@ -80,10 +76,10 @@ public MapTest() { * Constructor with all args parameters */ public MapTest(Map> mapMapOfString, Map mapOfEnumString, Map directMap, Map indirectMap) { - this.mapMapOfString = mapMapOfString; - this.mapOfEnumString = mapOfEnumString; - this.directMap = directMap; - this.indirectMap = indirectMap; + this.mapMapOfString = mapMapOfString; + this.mapOfEnumString = mapOfEnumString; + this.directMap = directMap; + this.indirectMap = indirectMap; } public MapTest mapMapOfString(Map> mapMapOfString) { @@ -103,7 +99,6 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ - @Valid @ApiModelProperty(value = "") @JsonProperty("map_map_of_string") public Map> getMapMapOfString() { @@ -131,10 +126,9 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ - @ApiModelProperty(value = "") @JsonProperty("map_of_enum_string") - public Map getMapOfEnumString() { + public Map getMapOfEnumString() { return mapOfEnumString; } @@ -159,7 +153,6 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ - @ApiModelProperty(value = "") @JsonProperty("direct_map") public Map getDirectMap() { @@ -187,7 +180,6 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ - @ApiModelProperty(value = "") @JsonProperty("indirect_map") public Map getIndirectMap() { @@ -241,4 +233,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index c539b122bc92..1ab3af0c1e9e 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -33,8 +33,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; - @Valid - private Map map = new HashMap<>(); + private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClass() { super(); @@ -44,9 +43,9 @@ public MixedPropertiesAndAdditionalPropertiesClass() { * Constructor with all args parameters */ public MixedPropertiesAndAdditionalPropertiesClass(UUID uuid, OffsetDateTime dateTime, Map map) { - this.uuid = uuid; - this.dateTime = dateTime; - this.map = map; + this.uuid = uuid; + this.dateTime = dateTime; + this.map = map; } public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { @@ -58,7 +57,6 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ - @Valid @ApiModelProperty(value = "") @JsonProperty("uuid") public UUID getUuid() { @@ -78,7 +76,6 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ - @Valid @ApiModelProperty(value = "") @JsonProperty("dateTime") public OffsetDateTime getDateTime() { @@ -106,10 +103,9 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ - @Valid @ApiModelProperty(value = "") @JsonProperty("map") - public Map getMap() { + public Map getMap() { return map; } @@ -158,4 +154,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Model200Response.java index ea1e158058b0..a57ac2e0cb3e 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Model200Response.java @@ -37,8 +37,8 @@ public Model200Response() { * Constructor with all args parameters */ public Model200Response(Integer name, String propertyClass) { - this.name = name; - this.propertyClass = propertyClass; + this.name = name; + this.propertyClass = propertyClass; } public Model200Response name(Integer name) { @@ -50,7 +50,6 @@ public Model200Response name(Integer name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public Integer getName() { @@ -70,7 +69,6 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @ApiModelProperty(value = "") @JsonProperty("class") public String getPropertyClass() { @@ -120,4 +118,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelApiResponse.java index 0102e28487ab..0d08c9abe61d 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -38,9 +38,9 @@ public ModelApiResponse() { * Constructor with all args parameters */ public ModelApiResponse(Integer code, String type, String message) { - this.code = code; - this.type = type; - this.message = message; + this.code = code; + this.type = type; + this.message = message; } public ModelApiResponse code(Integer code) { @@ -52,7 +52,6 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @ApiModelProperty(value = "") @JsonProperty("code") public Integer getCode() { @@ -72,7 +71,6 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @ApiModelProperty(value = "") @JsonProperty("type") public String getType() { @@ -92,7 +90,6 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @ApiModelProperty(value = "") @JsonProperty("message") public String getMessage() { @@ -144,4 +141,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelList.java index ff5ac7f959ee..ccdb485ab7d2 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelList.java @@ -34,7 +34,7 @@ public ModelList() { * Constructor with all args parameters */ public ModelList(String _123list) { - this._123list = _123list; + this._123list = _123list; } public ModelList _123list(String _123list) { @@ -46,7 +46,6 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ - @ApiModelProperty(value = "") @JsonProperty("123-list") public String get123list() { @@ -94,4 +93,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelReturn.java index bd9e8763cde2..a2c09891a4ee 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelReturn.java @@ -35,7 +35,7 @@ public ModelReturn() { * Constructor with all args parameters */ public ModelReturn(Integer _return) { - this._return = _return; + this._return = _return; } public ModelReturn _return(Integer _return) { @@ -47,7 +47,6 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ - @ApiModelProperty(value = "") @JsonProperty("return") public Integer getReturn() { @@ -95,4 +94,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java index 517a26efd545..0133be96d6b4 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java @@ -23,7 +23,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class Name { - private Integer name; + private @NotNull Integer name; private Integer snakeCase; @@ -46,10 +46,10 @@ public Name(Integer name) { * Constructor with all args parameters */ public Name(Integer name, Integer snakeCase, String property, Integer _123number) { - this.name = name; - this.snakeCase = snakeCase; - this.property = property; - this._123number = _123number; + this.name = name; + this.snakeCase = snakeCase; + this.property = property; + this._123number = _123number; } public Name name(Integer name) { @@ -61,10 +61,9 @@ public Name name(Integer name) { * Get name * @return name */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("name") - public Integer getName() { + public @NotNull Integer getName() { return name; } @@ -81,7 +80,6 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("snake_case") public Integer getSnakeCase() { @@ -101,7 +99,6 @@ public Name property(String property) { * Get property * @return property */ - @ApiModelProperty(value = "") @JsonProperty("property") public String getProperty() { @@ -121,7 +118,6 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("123Number") public Integer get123number() { @@ -175,4 +171,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NullableMapProperty.java index 41c951cead92..6c07634fef5b 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NullableMapProperty.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -27,8 +27,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class NullableMapProperty { - @Valid - private JsonNullable> languageValues = JsonNullable.>undefined(); + private JsonNullable> languageValues = JsonNullable.undefined(); public NullableMapProperty() { super(); @@ -37,12 +36,12 @@ public NullableMapProperty() { /** * Constructor with all args parameters */ - public NullableMapProperty(Map languageValues) { - this.languageValues = JsonNullable.of(languageValues); + public NullableMapProperty(JsonNullable> languageValues) { + this.languageValues = languageValues; } - public NullableMapProperty languageValues(Map languageValues) { - this.languageValues = JsonNullable.of(languageValues); + public NullableMapProperty languageValues(JsonNullable> languageValues) { + this.languageValues = languageValues; return this; } @@ -58,7 +57,6 @@ public NullableMapProperty putLanguageValuesItem(String key, String languageValu * Get languageValues * @return languageValues */ - @ApiModelProperty(value = "") @JsonProperty("languageValues") public JsonNullable> getLanguageValues() { @@ -117,4 +115,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NumberOnly.java index 805c7fc01390..8a072c5be7b2 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NumberOnly.java @@ -33,7 +33,7 @@ public NumberOnly() { * Constructor with all args parameters */ public NumberOnly(BigDecimal justNumber) { - this.justNumber = justNumber; + this.justNumber = justNumber; } public NumberOnly justNumber(BigDecimal justNumber) { @@ -45,7 +45,6 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("JustNumber") public BigDecimal getJustNumber() { @@ -93,4 +92,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java index 9fa08f08183a..f1d23976ea73 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java @@ -71,7 +71,7 @@ public static StatusEnum fromValue(String value) { } } - private StatusEnum status; + private String status; private Boolean complete = false; @@ -83,12 +83,12 @@ public Order() { * Constructor with all args parameters */ public Order(Long id, Long petId, Integer quantity, OffsetDateTime shipDate, StatusEnum status, Boolean complete) { - this.id = id; - this.petId = petId; - this.quantity = quantity; - this.shipDate = shipDate; - this.status = status; - this.complete = complete; + this.id = id; + this.petId = petId; + this.quantity = quantity; + this.shipDate = shipDate; + this.status = status; + this.complete = complete; } public Order id(Long id) { @@ -100,7 +100,6 @@ public Order id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -120,7 +119,6 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @ApiModelProperty(value = "") @JsonProperty("petId") public Long getPetId() { @@ -140,7 +138,6 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @ApiModelProperty(value = "") @JsonProperty("quantity") public Integer getQuantity() { @@ -160,7 +157,6 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Valid @ApiModelProperty(value = "") @JsonProperty("shipDate") public OffsetDateTime getShipDate() { @@ -180,10 +176,9 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @ApiModelProperty(value = "Order Status") @JsonProperty("status") - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -200,7 +195,6 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @ApiModelProperty(value = "") @JsonProperty("complete") public Boolean getComplete() { @@ -258,4 +252,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java index c12e1c763282..a2b93fe45fcd 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java @@ -37,9 +37,9 @@ public OuterComposite() { * Constructor with all args parameters */ public OuterComposite(BigDecimal myNumber, String myString, Boolean myBoolean) { - this.myNumber = myNumber; - this.myString = myString; - this.myBoolean = myBoolean; + this.myNumber = myNumber; + this.myString = myString; + this.myBoolean = myBoolean; } public OuterComposite myNumber(BigDecimal myNumber) { @@ -51,7 +51,6 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("my_number") public BigDecimal getMyNumber() { @@ -71,7 +70,6 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ - @ApiModelProperty(value = "") @JsonProperty("my_string") public String getMyString() { @@ -91,7 +89,6 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ - @ApiModelProperty(value = "") @JsonProperty("my_boolean") public Boolean getMyBoolean() { @@ -143,4 +140,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ParentWithNullable.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ParentWithNullable.java index eb2929fc31bf..58dad82571aa 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ParentWithNullable.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ParentWithNullable.java @@ -71,9 +71,9 @@ public static TypeEnum fromValue(String value) { } } - private TypeEnum type; + private String type; - private JsonNullable nullableProperty = JsonNullable.undefined(); + private JsonNullable nullableProperty = JsonNullable.undefined(); public ParentWithNullable() { super(); @@ -82,9 +82,9 @@ public ParentWithNullable() { /** * Constructor with all args parameters */ - public ParentWithNullable(TypeEnum type, String nullableProperty) { - this.type = type; - this.nullableProperty = JsonNullable.of(nullableProperty); + public ParentWithNullable(TypeEnum type, JsonNullable nullableProperty) { + this.type = type; + this.nullableProperty = nullableProperty; } public ParentWithNullable type(TypeEnum type) { @@ -96,10 +96,9 @@ public ParentWithNullable type(TypeEnum type) { * Get type * @return type */ - @ApiModelProperty(value = "") @JsonProperty("type") - public TypeEnum getType() { + public String getType() { return type; } @@ -107,8 +106,8 @@ public void setType(TypeEnum type) { this.type = type; } - public ParentWithNullable nullableProperty(String nullableProperty) { - this.nullableProperty = JsonNullable.of(nullableProperty); + public ParentWithNullable nullableProperty(JsonNullable nullableProperty) { + this.nullableProperty = nullableProperty; return this; } @@ -116,7 +115,6 @@ public ParentWithNullable nullableProperty(String nullableProperty) { * Get nullableProperty * @return nullableProperty */ - @ApiModelProperty(value = "") @JsonProperty("nullableProperty") public JsonNullable getNullableProperty() { @@ -177,4 +175,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java index 845a4b0e8e29..56c3efe81af1 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java @@ -33,14 +33,12 @@ public class Pet { private Long id; - private Category category; + private @Valid Category category; - private String name; + private @NotNull String name; - @Valid - private Set photoUrls = new LinkedHashSet<>(); + private @NotNull Set photoUrls = new LinkedHashSet<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** @@ -81,7 +79,7 @@ public static StatusEnum fromValue(String value) { } @Deprecated - private StatusEnum status; + private String status; public Pet() { super(); @@ -98,13 +96,13 @@ public Pet(String name, Set photoUrls) { /** * Constructor with all args parameters */ - public Pet(Long id, Category category, String name, Set photoUrls, List<@Valid Tag> tags, StatusEnum status) { - this.id = id; - this.category = category; - this.name = name; - this.photoUrls = photoUrls; - this.tags = tags; - this.status = status; + public Pet(Long id, Category category, String name, Set photoUrls, List tags, StatusEnum status) { + this.id = id; + this.category = category; + this.name = name; + this.photoUrls = photoUrls; + this.tags = tags; + this.status = status; } public Pet id(Long id) { @@ -116,7 +114,6 @@ public Pet id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -136,10 +133,9 @@ public Pet category(Category category) { * Get category * @return category */ - @Valid @ApiModelProperty(value = "") @JsonProperty("category") - public Category getCategory() { + public @Valid Category getCategory() { return category; } @@ -156,10 +152,9 @@ public Pet name(String name) { * Get name * @return name */ - @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -184,10 +179,9 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("photoUrls") - public Set getPhotoUrls() { + public @NotNull Set getPhotoUrls() { return photoUrls; } @@ -196,7 +190,7 @@ public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List<@Valid Tag> tags) { + public Pet tags(List tags) { this.tags = tags; return this; } @@ -213,14 +207,13 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Valid @ApiModelProperty(value = "") @JsonProperty("tags") public List<@Valid Tag> getTags() { return tags; } - public void setTags(List<@Valid Tag> tags) { + public void setTags(List tags) { this.tags = tags; } @@ -234,11 +227,10 @@ public Pet status(StatusEnum status) { * @return status * @deprecated */ - @ApiModelProperty(value = "pet status in the store") @JsonProperty("status") @Deprecated - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -297,4 +289,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 50f53508d42c..4a0ffd8c3681 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -34,8 +34,8 @@ public ReadOnlyFirst() { * Constructor with all args parameters */ public ReadOnlyFirst(String bar, String baz) { - this.bar = bar; - this.baz = baz; + this.bar = bar; + this.baz = baz; } public ReadOnlyFirst bar(String bar) { @@ -47,7 +47,6 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("bar") public String getBar() { @@ -67,7 +66,6 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ - @ApiModelProperty(value = "") @JsonProperty("baz") public String getBaz() { @@ -117,4 +115,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java index 4d986af3ff14..8581d6448937 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java @@ -38,10 +38,10 @@ public ResponseObjectWithDifferentFieldNames() { * Constructor with all args parameters */ public ResponseObjectWithDifferentFieldNames(String normalPropertyName, String UPPER_CASE_PROPERTY_SNAKE, String lowerCasePropertyDashes, String propertyNameWithSpaces) { - this.normalPropertyName = normalPropertyName; - this.UPPER_CASE_PROPERTY_SNAKE = UPPER_CASE_PROPERTY_SNAKE; - this.lowerCasePropertyDashes = lowerCasePropertyDashes; - this.propertyNameWithSpaces = propertyNameWithSpaces; + this.normalPropertyName = normalPropertyName; + this.UPPER_CASE_PROPERTY_SNAKE = UPPER_CASE_PROPERTY_SNAKE; + this.lowerCasePropertyDashes = lowerCasePropertyDashes; + this.propertyNameWithSpaces = propertyNameWithSpaces; } public ResponseObjectWithDifferentFieldNames normalPropertyName(String normalPropertyName) { @@ -53,7 +53,6 @@ public ResponseObjectWithDifferentFieldNames normalPropertyName(String normalPro * Get normalPropertyName * @return normalPropertyName */ - @ApiModelProperty(value = "") @JsonProperty("normalPropertyName") public String getNormalPropertyName() { @@ -73,7 +72,6 @@ public ResponseObjectWithDifferentFieldNames UPPER_CASE_PROPERTY_SNAKE(String UP * Get UPPER_CASE_PROPERTY_SNAKE * @return UPPER_CASE_PROPERTY_SNAKE */ - @ApiModelProperty(value = "") @JsonProperty("UPPER_CASE_PROPERTY_SNAKE") public String getUPPERCASEPROPERTYSNAKE() { @@ -93,7 +91,6 @@ public ResponseObjectWithDifferentFieldNames lowerCasePropertyDashes(String lowe * Get lowerCasePropertyDashes * @return lowerCasePropertyDashes */ - @ApiModelProperty(value = "") @JsonProperty("lower-case-property-dashes") public String getLowerCasePropertyDashes() { @@ -113,7 +110,6 @@ public ResponseObjectWithDifferentFieldNames propertyNameWithSpaces(String prope * Get propertyNameWithSpaces * @return propertyNameWithSpaces */ - @ApiModelProperty(value = "") @JsonProperty("property name with spaces") public String getPropertyNameWithSpaces() { @@ -167,4 +163,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/SpecialModelName.java index 77c30fa2369f..ebf91eb20c4b 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/SpecialModelName.java @@ -34,7 +34,7 @@ public SpecialModelName() { * Constructor with all args parameters */ public SpecialModelName(Long $specialPropertyName) { - this.$specialPropertyName = $specialPropertyName; + this.$specialPropertyName = $specialPropertyName; } public SpecialModelName $specialPropertyName(Long $specialPropertyName) { @@ -46,7 +46,6 @@ public SpecialModelName(Long $specialPropertyName) { * Get $specialPropertyName * @return $specialPropertyName */ - @ApiModelProperty(value = "") @JsonProperty("$special[property.name]") public Long get$SpecialPropertyName() { @@ -94,4 +93,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Tag.java index 3e2ab775ff38..e5dd11daa47c 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Tag.java @@ -34,8 +34,8 @@ public Tag() { * Constructor with all args parameters */ public Tag(Long id, String name) { - this.id = id; - this.name = name; + this.id = id; + this.name = name; } public Tag id(Long id) { @@ -47,7 +47,6 @@ public Tag id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -67,7 +66,6 @@ public Tag name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -117,4 +115,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java index 5c3ff0cf2b9a..bfff7de9a8a8 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -26,16 +26,15 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class TypeHolderDefault { - private String stringItem = "what"; + private @NotNull String stringItem = "what"; - private BigDecimal numberItem = new BigDecimal("1.234"); + private @NotNull BigDecimal numberItem = new BigDecimal("1.234"); - private Integer integerItem = -2; + private @NotNull Integer integerItem = -2; - private Boolean boolItem = true; + private @NotNull Boolean boolItem = true; - @Valid - private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); + private @NotNull List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); public TypeHolderDefault() { super(); @@ -61,10 +60,9 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("string_item") - public String getStringItem() { + public @NotNull String getStringItem() { return stringItem; } @@ -81,10 +79,9 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @NotNull @Valid @ApiModelProperty(required = true, value = "") @JsonProperty("number_item") - public BigDecimal getNumberItem() { + public @NotNull BigDecimal getNumberItem() { return numberItem; } @@ -101,10 +98,9 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("integer_item") - public Integer getIntegerItem() { + public @NotNull Integer getIntegerItem() { return integerItem; } @@ -121,10 +117,9 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("bool_item") - public Boolean getBoolItem() { + public @NotNull Boolean getBoolItem() { return boolItem; } @@ -149,10 +144,9 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("array_item") - public List getArrayItem() { + public @NotNull List getArrayItem() { return arrayItem; } @@ -205,4 +199,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java index 96ac357e6475..b33060bf6208 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -26,18 +26,17 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class TypeHolderExample { - private String stringItem; + private @NotNull String stringItem; - private BigDecimal numberItem; + private @NotNull BigDecimal numberItem; - private Float floatItem; + private @NotNull Float floatItem; - private Integer integerItem; + private @NotNull Integer integerItem; - private Boolean boolItem; + private @NotNull Boolean boolItem; - @Valid - private List arrayItem = new ArrayList<>(); + private @NotNull List arrayItem = new ArrayList<>(); public TypeHolderExample() { super(); @@ -64,10 +63,9 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @NotNull @ApiModelProperty(example = "what", required = true, value = "") @JsonProperty("string_item") - public String getStringItem() { + public @NotNull String getStringItem() { return stringItem; } @@ -84,10 +82,9 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @NotNull @Valid @ApiModelProperty(example = "1.234", required = true, value = "") @JsonProperty("number_item") - public BigDecimal getNumberItem() { + public @NotNull BigDecimal getNumberItem() { return numberItem; } @@ -104,10 +101,9 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ - @NotNull @ApiModelProperty(example = "1.234", required = true, value = "") @JsonProperty("float_item") - public Float getFloatItem() { + public @NotNull Float getFloatItem() { return floatItem; } @@ -124,10 +120,9 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @NotNull @ApiModelProperty(example = "-2", required = true, value = "") @JsonProperty("integer_item") - public Integer getIntegerItem() { + public @NotNull Integer getIntegerItem() { return integerItem; } @@ -144,10 +139,9 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @NotNull @ApiModelProperty(example = "true", required = true, value = "") @JsonProperty("bool_item") - public Boolean getBoolItem() { + public @NotNull Boolean getBoolItem() { return boolItem; } @@ -172,10 +166,9 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @NotNull @ApiModelProperty(example = "[0,1,2,3]", required = true, value = "") @JsonProperty("array_item") - public List getArrayItem() { + public @NotNull List getArrayItem() { return arrayItem; } @@ -230,4 +223,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/User.java index 2143f7a4f3dd..eb2628ae5484 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/User.java @@ -46,14 +46,14 @@ public User() { * Constructor with all args parameters */ public User(Long id, String username, String firstName, String lastName, String email, String password, String phone, Integer userStatus) { - this.id = id; - this.username = username; - this.firstName = firstName; - this.lastName = lastName; - this.email = email; - this.password = password; - this.phone = phone; - this.userStatus = userStatus; + this.id = id; + this.username = username; + this.firstName = firstName; + this.lastName = lastName; + this.email = email; + this.password = password; + this.phone = phone; + this.userStatus = userStatus; } public User id(Long id) { @@ -65,7 +65,6 @@ public User id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -85,7 +84,6 @@ public User username(String username) { * Get username * @return username */ - @ApiModelProperty(value = "") @JsonProperty("username") public String getUsername() { @@ -105,7 +103,6 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @ApiModelProperty(value = "") @JsonProperty("firstName") public String getFirstName() { @@ -125,7 +122,6 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @ApiModelProperty(value = "") @JsonProperty("lastName") public String getLastName() { @@ -145,7 +141,6 @@ public User email(String email) { * Get email * @return email */ - @ApiModelProperty(value = "") @JsonProperty("email") public String getEmail() { @@ -165,7 +160,6 @@ public User password(String password) { * Get password * @return password */ - @ApiModelProperty(value = "") @JsonProperty("password") public String getPassword() { @@ -185,7 +179,6 @@ public User phone(String phone) { * Get phone * @return phone */ - @ApiModelProperty(value = "") @JsonProperty("phone") public String getPhone() { @@ -205,7 +198,6 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @ApiModelProperty(value = "User Status") @JsonProperty("userStatus") public Integer getUserStatus() { @@ -267,4 +259,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java index c380ce793370..e79b30379241 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java @@ -34,7 +34,6 @@ public class XmlItem { private Boolean attributeBoolean; - @Valid private List wrappedArray = new ArrayList<>(); private String nameString; @@ -45,10 +44,8 @@ public class XmlItem { private Boolean nameBoolean; - @Valid private List nameArray = new ArrayList<>(); - @Valid private List nameWrappedArray = new ArrayList<>(); private String prefixString; @@ -59,10 +56,8 @@ public class XmlItem { private Boolean prefixBoolean; - @Valid private List prefixArray = new ArrayList<>(); - @Valid private List prefixWrappedArray = new ArrayList<>(); private String namespaceString; @@ -73,10 +68,8 @@ public class XmlItem { private Boolean namespaceBoolean; - @Valid private List namespaceArray = new ArrayList<>(); - @Valid private List namespaceWrappedArray = new ArrayList<>(); private String prefixNsString; @@ -87,10 +80,8 @@ public class XmlItem { private Boolean prefixNsBoolean; - @Valid private List prefixNsArray = new ArrayList<>(); - @Valid private List prefixNsWrappedArray = new ArrayList<>(); public XmlItem() { @@ -101,35 +92,35 @@ public XmlItem() { * Constructor with all args parameters */ public XmlItem(String attributeString, BigDecimal attributeNumber, Integer attributeInteger, Boolean attributeBoolean, List wrappedArray, String nameString, BigDecimal nameNumber, Integer nameInteger, Boolean nameBoolean, List nameArray, List nameWrappedArray, String prefixString, BigDecimal prefixNumber, Integer prefixInteger, Boolean prefixBoolean, List prefixArray, List prefixWrappedArray, String namespaceString, BigDecimal namespaceNumber, Integer namespaceInteger, Boolean namespaceBoolean, List namespaceArray, List namespaceWrappedArray, String prefixNsString, BigDecimal prefixNsNumber, Integer prefixNsInteger, Boolean prefixNsBoolean, List prefixNsArray, List prefixNsWrappedArray) { - this.attributeString = attributeString; - this.attributeNumber = attributeNumber; - this.attributeInteger = attributeInteger; - this.attributeBoolean = attributeBoolean; - this.wrappedArray = wrappedArray; - this.nameString = nameString; - this.nameNumber = nameNumber; - this.nameInteger = nameInteger; - this.nameBoolean = nameBoolean; - this.nameArray = nameArray; - this.nameWrappedArray = nameWrappedArray; - this.prefixString = prefixString; - this.prefixNumber = prefixNumber; - this.prefixInteger = prefixInteger; - this.prefixBoolean = prefixBoolean; - this.prefixArray = prefixArray; - this.prefixWrappedArray = prefixWrappedArray; - this.namespaceString = namespaceString; - this.namespaceNumber = namespaceNumber; - this.namespaceInteger = namespaceInteger; - this.namespaceBoolean = namespaceBoolean; - this.namespaceArray = namespaceArray; - this.namespaceWrappedArray = namespaceWrappedArray; - this.prefixNsString = prefixNsString; - this.prefixNsNumber = prefixNsNumber; - this.prefixNsInteger = prefixNsInteger; - this.prefixNsBoolean = prefixNsBoolean; - this.prefixNsArray = prefixNsArray; - this.prefixNsWrappedArray = prefixNsWrappedArray; + this.attributeString = attributeString; + this.attributeNumber = attributeNumber; + this.attributeInteger = attributeInteger; + this.attributeBoolean = attributeBoolean; + this.wrappedArray = wrappedArray; + this.nameString = nameString; + this.nameNumber = nameNumber; + this.nameInteger = nameInteger; + this.nameBoolean = nameBoolean; + this.nameArray = nameArray; + this.nameWrappedArray = nameWrappedArray; + this.prefixString = prefixString; + this.prefixNumber = prefixNumber; + this.prefixInteger = prefixInteger; + this.prefixBoolean = prefixBoolean; + this.prefixArray = prefixArray; + this.prefixWrappedArray = prefixWrappedArray; + this.namespaceString = namespaceString; + this.namespaceNumber = namespaceNumber; + this.namespaceInteger = namespaceInteger; + this.namespaceBoolean = namespaceBoolean; + this.namespaceArray = namespaceArray; + this.namespaceWrappedArray = namespaceWrappedArray; + this.prefixNsString = prefixNsString; + this.prefixNsNumber = prefixNsNumber; + this.prefixNsInteger = prefixNsInteger; + this.prefixNsBoolean = prefixNsBoolean; + this.prefixNsArray = prefixNsArray; + this.prefixNsWrappedArray = prefixNsWrappedArray; } public XmlItem attributeString(String attributeString) { @@ -141,7 +132,6 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("attribute_string") public String getAttributeString() { @@ -161,7 +151,6 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("attribute_number") public BigDecimal getAttributeNumber() { @@ -181,7 +170,6 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("attribute_integer") public Integer getAttributeInteger() { @@ -201,7 +189,6 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("attribute_boolean") public Boolean getAttributeBoolean() { @@ -229,7 +216,6 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("wrapped_array") public List getWrappedArray() { @@ -249,7 +235,6 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("name_string") public String getNameString() { @@ -269,7 +254,6 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("name_number") public BigDecimal getNameNumber() { @@ -289,7 +273,6 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("name_integer") public Integer getNameInteger() { @@ -309,7 +292,6 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("name_boolean") public Boolean getNameBoolean() { @@ -337,7 +319,6 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ - @ApiModelProperty(value = "") @JsonProperty("name_array") public List getNameArray() { @@ -365,7 +346,6 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("name_wrapped_array") public List getNameWrappedArray() { @@ -385,7 +365,6 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("prefix_string") public String getPrefixString() { @@ -405,7 +384,6 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("prefix_number") public BigDecimal getPrefixNumber() { @@ -425,7 +403,6 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_integer") public Integer getPrefixInteger() { @@ -445,7 +422,6 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("prefix_boolean") public Boolean getPrefixBoolean() { @@ -473,7 +449,6 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_array") public List getPrefixArray() { @@ -501,7 +476,6 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_wrapped_array") public List getPrefixWrappedArray() { @@ -521,7 +495,6 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("namespace_string") public String getNamespaceString() { @@ -541,7 +514,6 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("namespace_number") public BigDecimal getNamespaceNumber() { @@ -561,7 +533,6 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { @@ -581,7 +552,6 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("namespace_boolean") public Boolean getNamespaceBoolean() { @@ -609,7 +579,6 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ - @ApiModelProperty(value = "") @JsonProperty("namespace_array") public List getNamespaceArray() { @@ -637,7 +606,6 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("namespace_wrapped_array") public List getNamespaceWrappedArray() { @@ -657,7 +625,6 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("prefix_ns_string") public String getPrefixNsString() { @@ -677,7 +644,6 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("prefix_ns_number") public BigDecimal getPrefixNsNumber() { @@ -697,7 +663,6 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { @@ -717,7 +682,6 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("prefix_ns_boolean") public Boolean getPrefixNsBoolean() { @@ -745,7 +709,6 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_ns_array") public List getPrefixNsArray() { @@ -773,7 +736,6 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_ns_wrapped_array") public List getPrefixNsWrappedArray() { @@ -877,4 +839,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-file-delegate-optional/src/main/java/org/openapitools/api/DummyApi.java b/samples/server/petstore/springboot-file-delegate-optional/src/main/java/org/openapitools/api/DummyApi.java index 22425d1bbd9b..b860c08cfe4c 100644 --- a/samples/server/petstore/springboot-file-delegate-optional/src/main/java/org/openapitools/api/DummyApi.java +++ b/samples/server/petstore/springboot-file-delegate-optional/src/main/java/org/openapitools/api/DummyApi.java @@ -58,7 +58,7 @@ default DummyApiDelegate getDelegate() { ) default ResponseEntity uploadFile( - @Parameter(name = "body", description = "") @Valid @RequestBody(required = false) Optional body + @Parameter(name = "body", description = "") @RequestBody(required = false) Optional body ) { return getDelegate().uploadFile(body); } diff --git a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/PetApi.java index b40ada501417..568ecafb554c 100644 --- a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/PetApi.java @@ -46,7 +46,7 @@ default Optional getRequest() { ) default ResponseEntity addPet( - @Valid @RequestBody Pet pet + @RequestBody @NotNull @Valid Pet pet ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -80,7 +80,7 @@ default ResponseEntity addPet( ) default ResponseEntity deletePet( - @PathVariable("petId") Long petId + @PathVariable("petId") @NotNull Long petId ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -102,7 +102,7 @@ default ResponseEntity deletePet( ) default ResponseEntity> findPetsByStatus( - @NotNull @Valid @RequestParam(value = "status", required = true) @Deprecated List status + @RequestParam(value = "status") @Deprecated @NotNull List status ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -140,7 +140,7 @@ default ResponseEntity> findPetsByStatus( ) default ResponseEntity> findPetsByTags( - @NotNull @Valid @RequestParam(value = "tags", required = true) List tags + @RequestParam(value = "tags") @NotNull List tags ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -177,7 +177,7 @@ default ResponseEntity> findPetsByTags( ) default ResponseEntity getPetById( - @PathVariable("petId") Long petId + @PathVariable("petId") @NotNull Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -218,7 +218,7 @@ default ResponseEntity getPetById( ) default ResponseEntity updatePet( - @Valid @RequestBody Pet pet + @RequestBody @NotNull @Valid Pet pet ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -255,9 +255,9 @@ default ResponseEntity updatePet( ) default ResponseEntity updatePetWithForm( - @PathVariable("petId") Long petId, - @Valid @RequestParam(value = "name", required = false) String name, - @Valid @RequestParam(value = "status", required = false) String status + @PathVariable("petId") @NotNull Long petId, + @RequestParam(value = "name", required = false) String name, + @RequestParam(value = "status", required = false) String status ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -281,8 +281,8 @@ default ResponseEntity updatePetWithForm( ) default ResponseEntity uploadFile( - @PathVariable("petId") Long petId, - @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, + @PathVariable("petId") @NotNull Long petId, + @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @RequestPart(value = "file", required = false) MultipartFile file ) { getRequest().ifPresent(request -> { diff --git a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/StoreApi.java index 1414e5554575..0b52c50a8142 100644 --- a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/StoreApi.java @@ -44,7 +44,7 @@ default Optional getRequest() { ) default ResponseEntity deleteOrder( - @PathVariable("orderId") String orderId + @PathVariable("orderId") @NotNull String orderId ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -87,7 +87,7 @@ default ResponseEntity> getInventory( ) default ResponseEntity getOrderById( - @Min(1L) @Max(5L) @PathVariable("orderId") Long orderId + @PathVariable("orderId") @NotNull @Min(1L) @Max(5L) Long orderId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -124,7 +124,7 @@ default ResponseEntity getOrderById( ) default ResponseEntity placeOrder( - @Valid @RequestBody Order order + @RequestBody @NotNull @Valid Order order ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/UserApi.java index 8acdcb00ccc1..9789fc58ba18 100644 --- a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/UserApi.java @@ -44,7 +44,7 @@ default Optional getRequest() { ) default ResponseEntity createUser( - @Valid @RequestBody User user + @RequestBody @NotNull @Valid User user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -65,7 +65,7 @@ default ResponseEntity createUser( ) default ResponseEntity createUsersWithArrayInput( - @Valid @RequestBody List<@Valid User> user + @RequestBody @NotNull List<@Valid User> user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -86,7 +86,7 @@ default ResponseEntity createUsersWithArrayInput( ) default ResponseEntity createUsersWithListInput( - @Valid @RequestBody List<@Valid User> user + @RequestBody @NotNull List<@Valid User> user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -107,7 +107,7 @@ default ResponseEntity createUsersWithListInput( ) default ResponseEntity deleteUser( - @PathVariable("username") String username + @PathVariable("username") @NotNull String username ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -130,7 +130,7 @@ default ResponseEntity deleteUser( ) default ResponseEntity getUserByName( - @PathVariable("username") String username + @PathVariable("username") @NotNull String username ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -167,8 +167,8 @@ default ResponseEntity getUserByName( ) default ResponseEntity loginUser( - @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @Valid @RequestParam(value = "username", required = true) String username, - @NotNull @Valid @RequestParam(value = "password", required = true) String password + @RequestParam(value = "username") @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String username, + @RequestParam(value = "password") @NotNull String password ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -210,8 +210,8 @@ default ResponseEntity logoutUser( ) default ResponseEntity updateUser( - @PathVariable("username") String username, - @Valid @RequestBody User user + @PathVariable("username") @NotNull String username, + @RequestBody @NotNull @Valid User user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/model/Category.java index 32bd7e47b43e..4220da323fbc 100644 --- a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/model/Category.java @@ -22,7 +22,7 @@ public class Category { private Long id; - private String name; + private @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String name; public Category id(Long id) { this.id = id; @@ -33,7 +33,6 @@ public Category id(Long id) { * Get id * @return id */ - @JsonProperty("id") public Long getId() { return id; @@ -52,9 +51,8 @@ public Category name(String name) { * Get name * @return name */ - @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @JsonProperty("name") - public String getName() { + public @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String getName() { return name; } @@ -101,4 +99,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/model/ModelApiResponse.java index c9ec1d423b80..d455b674a212 100644 --- a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -37,7 +37,6 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @JsonProperty("code") public Integer getCode() { return code; @@ -56,7 +55,6 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @JsonProperty("type") public String getType() { return type; @@ -75,7 +73,6 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @JsonProperty("message") public String getMessage() { return message; @@ -126,4 +123,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/model/Order.java index c6cc5ff4c7d0..e0516dfa70f2 100644 --- a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/model/Order.java @@ -69,7 +69,7 @@ public static StatusEnum fromValue(String value) { } } - private StatusEnum status; + private String status; private Boolean complete = false; @@ -82,7 +82,6 @@ public Order id(Long id) { * Get id * @return id */ - @JsonProperty("id") public Long getId() { return id; @@ -101,7 +100,6 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @JsonProperty("petId") public Long getPetId() { return petId; @@ -120,7 +118,6 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @JsonProperty("quantity") public Integer getQuantity() { return quantity; @@ -139,7 +136,6 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Valid @JsonProperty("shipDate") public OffsetDateTime getShipDate() { return shipDate; @@ -158,9 +154,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @JsonProperty("status") - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -177,7 +172,6 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @JsonProperty("complete") public Boolean getComplete() { return complete; @@ -234,4 +228,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/model/Pet.java index 4373541b9568..9d7b20e68ff2 100644 --- a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/model/Pet.java @@ -28,14 +28,12 @@ public class Pet { private Long id; - private Category category; + private @Valid Category category; - private String name; + private @NotNull String name; - @Valid - private List photoUrls = new ArrayList<>(); + private @NotNull List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** @@ -76,7 +74,7 @@ public static StatusEnum fromValue(String value) { } @Deprecated - private StatusEnum status; + private String status; public Pet() { super(); @@ -99,7 +97,6 @@ public Pet id(Long id) { * Get id * @return id */ - @JsonProperty("id") public Long getId() { return id; @@ -118,9 +115,8 @@ public Pet category(Category category) { * Get category * @return category */ - @Valid @JsonProperty("category") - public Category getCategory() { + public @Valid Category getCategory() { return category; } @@ -137,9 +133,8 @@ public Pet name(String name) { * Get name * @return name */ - @NotNull @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -164,9 +159,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @NotNull @JsonProperty("photoUrls") - public List getPhotoUrls() { + public @NotNull List getPhotoUrls() { return photoUrls; } @@ -174,7 +168,7 @@ public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List<@Valid Tag> tags) { + public Pet tags(List tags) { this.tags = tags; return this; } @@ -191,13 +185,12 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Valid @JsonProperty("tags") public List<@Valid Tag> getTags() { return tags; } - public void setTags(List<@Valid Tag> tags) { + public void setTags(List tags) { this.tags = tags; } @@ -211,10 +204,9 @@ public Pet status(StatusEnum status) { * @return status * @deprecated */ - @JsonProperty("status") @Deprecated - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -273,4 +265,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/model/Tag.java index 17bf1e904341..f9d561eead54 100644 --- a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/model/Tag.java @@ -33,7 +33,6 @@ public Tag id(Long id) { * Get id * @return id */ - @JsonProperty("id") public Long getId() { return id; @@ -52,7 +51,6 @@ public Tag name(String name) { * Get name * @return name */ - @JsonProperty("name") public String getName() { return name; @@ -101,4 +99,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/model/User.java index cfc3c4573536..02d03ce583b1 100644 --- a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/model/User.java @@ -45,7 +45,6 @@ public User id(Long id) { * Get id * @return id */ - @JsonProperty("id") public Long getId() { return id; @@ -64,7 +63,6 @@ public User username(String username) { * Get username * @return username */ - @JsonProperty("username") public String getUsername() { return username; @@ -83,7 +81,6 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @JsonProperty("firstName") public String getFirstName() { return firstName; @@ -102,7 +99,6 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @JsonProperty("lastName") public String getLastName() { return lastName; @@ -121,7 +117,6 @@ public User email(String email) { * Get email * @return email */ - @JsonProperty("email") public String getEmail() { return email; @@ -140,7 +135,6 @@ public User password(String password) { * Get password * @return password */ - @JsonProperty("password") public String getPassword() { return password; @@ -159,7 +153,6 @@ public User phone(String phone) { * Get phone * @return phone */ - @JsonProperty("phone") public String getPhone() { return phone; @@ -178,7 +171,6 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @JsonProperty("userStatus") public Integer getUserStatus() { return userStatus; @@ -239,4 +231,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java index 95449b1c5f94..ff3d248c48be 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -56,7 +56,7 @@ default Optional getRequest() { ) default ResponseEntity call123testSpecialTags( - @ApiParam(value = "client model", required = true) @Valid @RequestBody Client client + @ApiParam(value = "client model", required = true) @RequestBody @NotNull @Valid Client client ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java index dedd84a9c3a2..930b919b9b23 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java @@ -66,7 +66,7 @@ default Optional getRequest() { ) default ResponseEntity createXmlItem( - @ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem + @ApiParam(value = "XmlItem Body", required = true) @RequestBody @NotNull @Valid XmlItem xmlItem ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -98,7 +98,7 @@ default ResponseEntity createXmlItem( ) default ResponseEntity fakeOuterBooleanSerialize( - @ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body + @ApiParam(value = "Input boolean as post body") @RequestBody(required = false) Boolean body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -130,7 +130,7 @@ default ResponseEntity fakeOuterBooleanSerialize( ) default ResponseEntity fakeOuterCompositeSerialize( - @ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite outerComposite + @ApiParam(value = "Input composite as post body") @RequestBody(required = false) @Valid OuterComposite outerComposite ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -171,7 +171,7 @@ default ResponseEntity fakeOuterCompositeSerialize( ) default ResponseEntity fakeOuterNumberSerialize( - @ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body + @ApiParam(value = "Input number as post body") @RequestBody(required = false) BigDecimal body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -203,7 +203,7 @@ default ResponseEntity fakeOuterNumberSerialize( ) default ResponseEntity fakeOuterStringSerialize( - @ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body + @ApiParam(value = "Input string as post body") @RequestBody(required = false) String body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -233,7 +233,7 @@ default ResponseEntity fakeOuterStringSerialize( ) default ResponseEntity responseObjectDifferentNames( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") @NotNull Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -272,7 +272,7 @@ default ResponseEntity responseObjectDiff ) default ResponseEntity testBodyWithFileSchema( - @ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass fileSchemaTestClass + @ApiParam(value = "", required = true) @RequestBody @NotNull @Valid FileSchemaTestClass fileSchemaTestClass ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -302,8 +302,8 @@ default ResponseEntity testBodyWithFileSchema( ) default ResponseEntity testBodyWithQueryParams( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, - @ApiParam(value = "", required = true) @Valid @RequestBody User user + @ApiParam(value = "", required = true) @RequestParam(value = "query") @NotNull String query, + @ApiParam(value = "", required = true) @RequestBody @NotNull @Valid User user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -335,7 +335,7 @@ default ResponseEntity testBodyWithQueryParams( ) default ResponseEntity testClientModel( - @ApiParam(value = "client model", required = true) @Valid @RequestBody Client client + @ApiParam(value = "client model", required = true) @RequestBody @NotNull @Valid Client client ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -392,20 +392,20 @@ default ResponseEntity testClientModel( ) default ResponseEntity testEndpointParameters( - @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "number", required = true) BigDecimal number, - @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "double", required = true) Double _double, - @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, - @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "byte", required = true) byte[] _byte, - @ApiParam(value = "None") @Valid @RequestParam(value = "integer", required = false) Integer integer, - @ApiParam(value = "None") @Valid @RequestParam(value = "int32", required = false) Integer int32, - @ApiParam(value = "None") @Valid @RequestParam(value = "int64", required = false) Long int64, - @ApiParam(value = "None") @Valid @RequestParam(value = "float", required = false) Float _float, - @ApiParam(value = "None") @Valid @RequestParam(value = "string", required = false) String string, + @ApiParam(value = "None", required = true) @RequestParam(value = "number") @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal number, + @ApiParam(value = "None", required = true) @RequestParam(value = "double") @NotNull @DecimalMin("67.8") @DecimalMax("123.4") Double _double, + @ApiParam(value = "None", required = true) @RequestParam(value = "pattern_without_delimiter") @NotNull @Pattern(regexp = "^[A-Z].*") String patternWithoutDelimiter, + @ApiParam(value = "None", required = true) @RequestParam(value = "byte") @NotNull byte[] _byte, + @ApiParam(value = "None") @RequestParam(value = "integer", required = false) @Min(10) @Max(100) Integer integer, + @ApiParam(value = "None") @RequestParam(value = "int32", required = false) @Min(20) @Max(200) Integer int32, + @ApiParam(value = "None") @RequestParam(value = "int64", required = false) Long int64, + @ApiParam(value = "None") @RequestParam(value = "float", required = false) @DecimalMax("987.6") Float _float, + @ApiParam(value = "None") @RequestParam(value = "string", required = false) @Pattern(regexp = "/[a-z]/i") String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @ApiParam(value = "None") @Valid @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, - @ApiParam(value = "None") @Valid @RequestParam(value = "password", required = false) String password, - @ApiParam(value = "None") @Valid @RequestParam(value = "callback", required = false) String paramCallback + @ApiParam(value = "None") @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @RequestParam(value = "password", required = false) @Size(min = 10, max = 64) String password, + @ApiParam(value = "None") @RequestParam(value = "callback", required = false) String paramCallback ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -436,7 +436,7 @@ default ResponseEntity testEndpointParameters( @ApiResponse(code = 404, message = "Not found") }) @ApiImplicitParams({ - @ApiImplicitParam(name = "enum_header_string_array", value = "Header parameter enum test (string array)", dataType = "List", paramType = "header"), + @ApiImplicitParam(name = "enum_header_string_array", value = "Header parameter enum test (string array)", dataType = "List", paramType = "header"), @ApiImplicitParam(name = "enum_header_string", value = "Header parameter enum test (string)", dataType = "String", paramType = "header") }) @RequestMapping( @@ -446,12 +446,12 @@ default ResponseEntity testEndpointParameters( ) default ResponseEntity testEnumParameters( - @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, - @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, - @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, - @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString + @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestParam(value = "enum_form_string", required = false) String enumFormString ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -487,10 +487,10 @@ default ResponseEntity testEnumParameters( ) default ResponseEntity testGroupParameters( - @NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, - @NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, - @ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup, - @ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + @ApiParam(value = "Required String in group parameters", required = true) @RequestParam(value = "required_string_group") @NotNull Integer requiredStringGroup, + @ApiParam(value = "Required Integer in group parameters", required = true) @RequestParam(value = "required_int64_group") @NotNull Long requiredInt64Group, + @ApiParam(value = "String in group parameters") @RequestParam(value = "string_group", required = false) Integer stringGroup, + @ApiParam(value = "Integer in group parameters") @RequestParam(value = "int64_group", required = false) Long int64Group ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -520,7 +520,7 @@ default ResponseEntity testGroupParameters( ) default ResponseEntity testInlineAdditionalProperties( - @ApiParam(value = "request body", required = true) @Valid @RequestBody Map requestBody + @ApiParam(value = "request body", required = true) @RequestBody @NotNull Map requestBody ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -551,8 +551,8 @@ default ResponseEntity testInlineAdditionalProperties( ) default ResponseEntity testJsonFormData( - @ApiParam(value = "field1", required = true) @Valid @RequestParam(value = "param", required = true) String param, - @ApiParam(value = "field2", required = true) @Valid @RequestParam(value = "param2", required = true) String param2 + @ApiParam(value = "field1", required = true) @RequestParam(value = "param") @NotNull String param, + @ApiParam(value = "field2", required = true) @RequestParam(value = "param2") @NotNull String param2 ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -582,7 +582,7 @@ default ResponseEntity testJsonFormData( ) default ResponseEntity testNullable( - @ApiParam(value = "request body", required = true) @Valid @RequestBody ChildWithNullable childWithNullable + @ApiParam(value = "request body", required = true) @RequestBody @NotNull @Valid ChildWithNullable childWithNullable ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -614,10 +614,10 @@ default ResponseEntity testNullable( ) default ResponseEntity testQueryParameterCollectionFormat( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + @ApiParam(value = "", required = true) @RequestParam(value = "pipe") @NotNull List pipe, + @ApiParam(value = "", required = true) @RequestParam(value = "http") @NotNull List http, + @ApiParam(value = "", required = true) @RequestParam(value = "url") @NotNull List url, + @ApiParam(value = "", required = true) @RequestParam(value = "context") @NotNull List context ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -696,9 +696,9 @@ default ResponseEntity testWithResultExample( ) default ResponseEntity uploadFileWithRequiredFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, - @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, - @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") @NotNull Long petId, + @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile") MultipartFile requiredFile, + @ApiParam(value = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 6230e1d2c4fc..106e805c95ba 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -59,7 +59,7 @@ default Optional getRequest() { ) default ResponseEntity testClassname( - @ApiParam(value = "client model", required = true) @Valid @RequestBody Client client + @ApiParam(value = "client model", required = true) @RequestBody @NotNull @Valid Client client ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java index 0a4820d919e4..32046ea1108e 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java @@ -64,7 +64,7 @@ default Optional getRequest() { ) default ResponseEntity addPet( - @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet pet ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -104,7 +104,7 @@ default ResponseEntity addPet( ) default ResponseEntity deletePet( - @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId + @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") @NotNull Long petId ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -125,7 +125,7 @@ default ResponseEntity deletePet( nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, - responseContainer = "List", + responseContainer = "array", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @@ -134,7 +134,7 @@ default ResponseEntity deletePet( } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "array"), @ApiResponse(code = 400, message = "Invalid status value") }) @RequestMapping( @@ -144,7 +144,7 @@ default ResponseEntity deletePet( ) default ResponseEntity> findPetsByStatus( - @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status + @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @RequestParam(value = "status") @NotNull List status ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -181,7 +181,7 @@ default ResponseEntity> findPetsByStatus( nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, - responseContainer = "Set", + responseContainer = "set", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @@ -190,7 +190,7 @@ default ResponseEntity> findPetsByStatus( } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "Set"), + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "set"), @ApiResponse(code = 400, message = "Invalid tag value") }) @RequestMapping( @@ -200,7 +200,7 @@ default ResponseEntity> findPetsByStatus( ) default ResponseEntity> findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags + @ApiParam(value = "Tags to filter by", required = true) @RequestParam(value = "tags") @NotNull Set tags ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -252,7 +252,7 @@ default ResponseEntity> findPetsByTags( ) default ResponseEntity getPetById( - @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") @NotNull Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -308,7 +308,7 @@ default ResponseEntity getPetById( ) default ResponseEntity updatePet( - @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet pet ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -346,9 +346,9 @@ default ResponseEntity updatePet( ) default ResponseEntity updatePetWithForm( - @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, - @ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, - @ApiParam(value = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status + @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") @NotNull Long petId, + @ApiParam(value = "Updated name of the pet") @RequestParam(value = "name", required = false) String name, + @ApiParam(value = "Updated status of the pet") @RequestParam(value = "status", required = false) String status ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -388,8 +388,8 @@ default ResponseEntity updatePetWithForm( ) default ResponseEntity uploadFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, - @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") @NotNull Long petId, + @ApiParam(value = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) { getRequest().ifPresent(request -> { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java index 5ecfb9933b71..297a887e3eb5 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java @@ -56,7 +56,7 @@ default Optional getRequest() { ) default ResponseEntity deleteOrder( - @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") @NotNull String orderId ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -75,13 +75,13 @@ default ResponseEntity deleteOrder( nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, - responseContainer = "Map", + responseContainer = "map", authorizations = { @Authorization(value = "api_key") } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "map") }) @RequestMapping( method = RequestMethod.GET, @@ -125,7 +125,7 @@ default ResponseEntity> getInventory( ) default ResponseEntity getOrderById( - @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") @NotNull @Min(1L) @Max(5L) Long orderId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -173,7 +173,7 @@ default ResponseEntity getOrderById( ) default ResponseEntity placeOrder( - @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order + @ApiParam(value = "order placed for purchasing the pet", required = true) @RequestBody @NotNull @Valid Order order ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java index 3f247fb6c71e..0fbf78a7e6b7 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java @@ -55,7 +55,7 @@ default Optional getRequest() { ) default ResponseEntity createUser( - @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User user + @ApiParam(value = "Created user object", required = true) @RequestBody @NotNull @Valid User user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -85,7 +85,7 @@ default ResponseEntity createUser( ) default ResponseEntity createUsersWithArrayInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + @ApiParam(value = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -115,7 +115,7 @@ default ResponseEntity createUsersWithArrayInput( ) default ResponseEntity createUsersWithListInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + @ApiParam(value = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -146,7 +146,7 @@ default ResponseEntity createUsersWithListInput( ) default ResponseEntity deleteUser( - @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") @NotNull String username ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -181,7 +181,7 @@ default ResponseEntity deleteUser( ) default ResponseEntity getUserByName( - @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") @NotNull String username ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -229,8 +229,8 @@ default ResponseEntity getUserByName( ) default ResponseEntity loginUser( - @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, - @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + @ApiParam(value = "The user name for login", required = true) @RequestParam(value = "username") @NotNull String username, + @ApiParam(value = "The password for login in clear text", required = true) @RequestParam(value = "password") @NotNull String password ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -291,8 +291,8 @@ default ResponseEntity logoutUser( ) default ResponseEntity updateUser( - @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, - @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User user + @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") @NotNull String username, + @ApiParam(value = "Updated user object", required = true) @RequestBody @NotNull @Valid User user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index cf57def58490..291e57234974 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -37,7 +37,6 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index dc535ab3e476..f3b2cfe986ca 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -38,7 +38,6 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -126,4 +125,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 4d4bef3fde91..79708a257b1e 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -37,7 +37,6 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 4b872401a006..c4e2810100bb 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -29,33 +29,25 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class AdditionalPropertiesClass { - @Valid private Map mapString = new HashMap<>(); - @Valid private Map mapNumber = new HashMap<>(); - @Valid private Map mapInteger = new HashMap<>(); - @Valid private Map mapBoolean = new HashMap<>(); - @Valid private Map> mapArrayInteger = new HashMap<>(); - @Valid private Map> mapArrayAnytype = new HashMap<>(); - @Valid private Map> mapMapString = new HashMap<>(); - @Valid private Map> mapMapAnytype = new HashMap<>(); private Object anytype1; - private JsonNullable anytype2 = JsonNullable.undefined(); + private JsonNullable anytype2 = JsonNullable.of(null); private Object anytype3; @@ -76,7 +68,6 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ - @ApiModelProperty(value = "") @JsonProperty("map_string") public Map getMapString() { @@ -104,7 +95,6 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("map_number") public Map getMapNumber() { @@ -132,7 +122,6 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ - @ApiModelProperty(value = "") @JsonProperty("map_integer") public Map getMapInteger() { @@ -160,7 +149,6 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ - @ApiModelProperty(value = "") @JsonProperty("map_boolean") public Map getMapBoolean() { @@ -188,7 +176,6 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { @@ -216,7 +203,6 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ - @Valid @ApiModelProperty(value = "") @JsonProperty("map_array_anytype") public Map> getMapArrayAnytype() { @@ -244,7 +230,6 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { @@ -272,7 +257,6 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { @@ -292,7 +276,6 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ - @ApiModelProperty(value = "") @JsonProperty("anytype_1") public Object getAnytype1() { @@ -303,8 +286,8 @@ public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; } - public AdditionalPropertiesClass anytype2(Object anytype2) { - this.anytype2 = JsonNullable.of(anytype2); + public AdditionalPropertiesClass anytype2(JsonNullable anytype2) { + this.anytype2 = anytype2; return this; } @@ -312,7 +295,6 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ - @ApiModelProperty(value = "") @JsonProperty("anytype_2") public JsonNullable getAnytype2() { @@ -332,7 +314,6 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ - @ApiModelProperty(value = "") @JsonProperty("anytype_3") public Object getAnytype3() { @@ -411,4 +392,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index e8e32dcd7fa9..f12948a1c898 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -37,7 +37,6 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 50fa525424d3..f31c0d0cd9b2 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -38,7 +38,6 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -126,4 +125,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index b2ca3bf5cb02..98e9b7b1a12a 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -38,7 +38,6 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -126,4 +125,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 7e085a44c93d..822b5e79b89f 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -37,7 +37,6 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java index 5d5fcd5dc18a..d9908d33fa2f 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java @@ -36,7 +36,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class Animal { - private String className; + private @NotNull String className; private String color = "red"; @@ -60,10 +60,9 @@ public Animal className(String className) { * Get className * @return className */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("className") - public String getClassName() { + public @NotNull String getClassName() { return className; } @@ -80,7 +79,6 @@ public Animal color(String color) { * Get color * @return color */ - @ApiModelProperty(value = "") @JsonProperty("color") public String getColor() { @@ -130,4 +128,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 621c01be49ce..249d0bc72466 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnly { - @Valid private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { @@ -46,7 +45,6 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("ArrayArrayNumber") public List> getArrayArrayNumber() { @@ -94,4 +92,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 3f519bbb9baa..58b3ee1a3bcf 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayOfNumberOnly { - @Valid private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnly arrayNumber(List arrayNumber) { @@ -46,7 +45,6 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("ArrayNumber") public List getArrayNumber() { @@ -94,4 +92,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java index 382556e65bd6..20402ebb213f 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java @@ -26,13 +26,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayTest { - @Valid private List arrayOfString = new ArrayList<>(); - @Valid private List> arrayArrayOfInteger = new ArrayList<>(); - @Valid private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTest arrayOfString(List arrayOfString) { @@ -52,7 +49,6 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ - @ApiModelProperty(value = "") @JsonProperty("array_of_string") public List getArrayOfString() { @@ -80,7 +76,6 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ - @Valid @ApiModelProperty(value = "") @JsonProperty("array_array_of_integer") public List> getArrayArrayOfInteger() { @@ -91,12 +86,12 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } - public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) { + public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { if (this.arrayArrayOfModel == null) { this.arrayArrayOfModel = new ArrayList<>(); } @@ -108,14 +103,13 @@ public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayO * Get arrayArrayOfModel * @return arrayArrayOfModel */ - @Valid @ApiModelProperty(value = "") @JsonProperty("array_array_of_model") public List> getArrayArrayOfModel() { return arrayArrayOfModel; } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { + public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } @@ -160,4 +154,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java index 4e7739fe3ab2..c9bbc0145339 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java @@ -67,7 +67,7 @@ public static KindEnum fromValue(String value) { } } - private KindEnum kind; + private String kind; public BigCat() { super(); @@ -89,10 +89,9 @@ public BigCat kind(KindEnum kind) { * Get kind * @return kind */ - @ApiModelProperty(value = "") @JsonProperty("kind") - public KindEnum getKind() { + public String getKind() { return kind; } @@ -154,4 +153,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Capitalization.java index d6e8a694cf85..f9226321c070 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Capitalization.java @@ -43,7 +43,6 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ - @ApiModelProperty(value = "") @JsonProperty("smallCamel") public String getSmallCamel() { @@ -63,7 +62,6 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ - @ApiModelProperty(value = "") @JsonProperty("CapitalCamel") public String getCapitalCamel() { @@ -83,7 +81,6 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ - @ApiModelProperty(value = "") @JsonProperty("small_Snake") public String getSmallSnake() { @@ -103,7 +100,6 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ - @ApiModelProperty(value = "") @JsonProperty("Capital_Snake") public String getCapitalSnake() { @@ -123,7 +119,6 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ - @ApiModelProperty(value = "") @JsonProperty("SCA_ETH_Flow_Points") public String getScAETHFlowPoints() { @@ -143,7 +138,6 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ - @ApiModelProperty(value = "Name of the pet ") @JsonProperty("ATT_NAME") public String getATTNAME() { @@ -201,4 +195,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java index d8932f6402ef..1bf1e602454d 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java @@ -57,7 +57,6 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ - @ApiModelProperty(value = "") @JsonProperty("declawed") public Boolean getDeclawed() { @@ -117,4 +116,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java index a7d5b6e5916d..04e9b386ebbe 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java @@ -24,7 +24,7 @@ public class Category { private Long id; - private String name = "default-name"; + private @NotNull String name = "default-name"; public Category() { super(); @@ -46,7 +46,6 @@ public Category id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -66,10 +65,9 @@ public Category name(String name) { * Get name * @return name */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -116,4 +114,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ChildWithNullable.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ChildWithNullable.java index 2609d3eb0201..4738e7f310b9 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ChildWithNullable.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ChildWithNullable.java @@ -41,7 +41,6 @@ public ChildWithNullable otherProperty(String otherProperty) { * Get otherProperty * @return otherProperty */ - @ApiModelProperty(value = "") @JsonProperty("otherProperty") public String getOtherProperty() { @@ -58,7 +57,7 @@ public ChildWithNullable type(TypeEnum type) { return this; } - public ChildWithNullable nullableProperty(String nullableProperty) { + public ChildWithNullable nullableProperty(JsonNullable nullableProperty) { super.nullableProperty(nullableProperty); return this; } @@ -112,4 +111,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ClassModel.java index 56aeaf340f38..508e179a1a9e 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ClassModel.java @@ -34,7 +34,6 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @ApiModelProperty(value = "") @JsonProperty("_class") public String getPropertyClass() { @@ -82,4 +81,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Client.java index 23491ea29e60..0463c48505d8 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Client.java @@ -33,7 +33,6 @@ public Client client(String client) { * Get client * @return client */ - @ApiModelProperty(value = "") @JsonProperty("client") public String getClient() { @@ -81,4 +80,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ContainerDefaultValue.java index c446f8d55e8a..33befb6282cb 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ContainerDefaultValue.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -27,17 +27,13 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ContainerDefaultValue { - @Valid - private JsonNullable> nullableArray = JsonNullable.>undefined(); + private JsonNullable> nullableArray = JsonNullable.undefined(); - @Valid - private JsonNullable> nullableRequiredArray = JsonNullable.>undefined(); + private JsonNullable> nullableRequiredArray = JsonNullable.undefined(); - @Valid - private List requiredArray = new ArrayList<>(); + private @NotNull List requiredArray = new ArrayList<>(); - @Valid - private JsonNullable> nullableArrayWithDefault = JsonNullable.>undefined(); + private JsonNullable> nullableArrayWithDefault = JsonNullable.of(new ArrayList<>(Arrays.asList("foo", "bar"))); public ContainerDefaultValue() { super(); @@ -46,13 +42,13 @@ public ContainerDefaultValue() { /** * Constructor with only required parameters */ - public ContainerDefaultValue(List nullableRequiredArray, List requiredArray) { - this.nullableRequiredArray = JsonNullable.of(nullableRequiredArray); + public ContainerDefaultValue(JsonNullable> nullableRequiredArray, List requiredArray) { + this.nullableRequiredArray = nullableRequiredArray; this.requiredArray = requiredArray; } - public ContainerDefaultValue nullableArray(List nullableArray) { - this.nullableArray = JsonNullable.of(nullableArray); + public ContainerDefaultValue nullableArray(JsonNullable> nullableArray) { + this.nullableArray = nullableArray; return this; } @@ -68,7 +64,6 @@ public ContainerDefaultValue addNullableArrayItem(String nullableArrayItem) { * Get nullableArray * @return nullableArray */ - @ApiModelProperty(value = "") @JsonProperty("nullable_array") public JsonNullable> getNullableArray() { @@ -79,8 +74,8 @@ public void setNullableArray(JsonNullable> nullableArray) { this.nullableArray = nullableArray; } - public ContainerDefaultValue nullableRequiredArray(List nullableRequiredArray) { - this.nullableRequiredArray = JsonNullable.of(nullableRequiredArray); + public ContainerDefaultValue nullableRequiredArray(JsonNullable> nullableRequiredArray) { + this.nullableRequiredArray = nullableRequiredArray; return this; } @@ -96,7 +91,6 @@ public ContainerDefaultValue addNullableRequiredArrayItem(String nullableRequire * Get nullableRequiredArray * @return nullableRequiredArray */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("nullable_required_array") public JsonNullable> getNullableRequiredArray() { @@ -124,10 +118,9 @@ public ContainerDefaultValue addRequiredArrayItem(String requiredArrayItem) { * Get requiredArray * @return requiredArray */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("required_array") - public List getRequiredArray() { + public @NotNull List getRequiredArray() { return requiredArray; } @@ -135,8 +128,8 @@ public void setRequiredArray(List requiredArray) { this.requiredArray = requiredArray; } - public ContainerDefaultValue nullableArrayWithDefault(List nullableArrayWithDefault) { - this.nullableArrayWithDefault = JsonNullable.of(nullableArrayWithDefault); + public ContainerDefaultValue nullableArrayWithDefault(JsonNullable> nullableArrayWithDefault) { + this.nullableArrayWithDefault = nullableArrayWithDefault; return this; } @@ -152,7 +145,6 @@ public ContainerDefaultValue addNullableArrayWithDefaultItem(String nullableArra * Get nullableArrayWithDefault * @return nullableArrayWithDefault */ - @ApiModelProperty(value = "") @JsonProperty("nullable_array_with_default") public JsonNullable> getNullableArrayWithDefault() { @@ -217,4 +209,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java index bef3e5409a8e..d4656db2ef88 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java @@ -49,7 +49,6 @@ public Dog breed(String breed) { * Get breed * @return breed */ - @ApiModelProperty(value = "") @JsonProperty("breed") public String getBreed() { @@ -109,4 +108,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java index 5bed35014d25..4a80b3b0ffe9 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java @@ -61,7 +61,7 @@ public static JustSymbolEnum fromValue(String value) { } } - private JustSymbolEnum justSymbol; + private String justSymbol; /** * Gets or Sets arrayEnum @@ -98,8 +98,7 @@ public static ArrayEnumEnum fromValue(String value) { } } - @Valid - private List arrayEnum = new ArrayList<>(); + private List arrayEnum = new ArrayList<>(); public EnumArrays justSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; @@ -110,10 +109,9 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ - @ApiModelProperty(value = "") @JsonProperty("just_symbol") - public JustSymbolEnum getJustSymbol() { + public String getJustSymbol() { return justSymbol; } @@ -138,10 +136,9 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ - @ApiModelProperty(value = "") @JsonProperty("array_enum") - public List getArrayEnum() { + public List getArrayEnum() { return arrayEnum; } @@ -188,4 +185,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java index 2865d76ab8bf..8e3d8978857c 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java @@ -63,7 +63,7 @@ public static EnumStringEnum fromValue(String value) { } } - private EnumStringEnum enumString; + private String enumString; /** * Gets or Sets enumStringRequired @@ -102,7 +102,7 @@ public static EnumStringRequiredEnum fromValue(String value) { } } - private EnumStringRequiredEnum enumStringRequired; + private @NotNull String enumStringRequired; /** * Gets or Sets enumInteger @@ -139,7 +139,7 @@ public static EnumIntegerEnum fromValue(Integer value) { } } - private EnumIntegerEnum enumInteger; + private Integer enumInteger; /** * Gets or Sets enumNumber @@ -176,7 +176,7 @@ public static EnumNumberEnum fromValue(Double value) { } } - private EnumNumberEnum enumNumber; + private Double enumNumber; private OuterEnum outerEnum; @@ -200,10 +200,9 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ - @ApiModelProperty(value = "") @JsonProperty("enum_string") - public EnumStringEnum getEnumString() { + public String getEnumString() { return enumString; } @@ -220,10 +219,9 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("enum_string_required") - public EnumStringRequiredEnum getEnumStringRequired() { + public @NotNull String getEnumStringRequired() { return enumStringRequired; } @@ -240,10 +238,9 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ - @ApiModelProperty(value = "") @JsonProperty("enum_integer") - public EnumIntegerEnum getEnumInteger() { + public Integer getEnumInteger() { return enumInteger; } @@ -260,10 +257,9 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ - @ApiModelProperty(value = "") @JsonProperty("enum_number") - public EnumNumberEnum getEnumNumber() { + public Double getEnumNumber() { return enumNumber; } @@ -280,7 +276,6 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ - @Valid @ApiModelProperty(value = "") @JsonProperty("outerEnum") public OuterEnum getOuterEnum() { @@ -336,4 +331,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/File.java index 6e16961c2d2f..cd9f95a6f91c 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/File.java @@ -34,7 +34,6 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ - @ApiModelProperty(value = "Test capitalization") @JsonProperty("sourceURI") public String getSourceURI() { @@ -82,4 +81,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 9a40dbd168af..0c2d51df5822 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -26,9 +26,8 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class FileSchemaTestClass { - private File file; + private @Valid File file; - @Valid private List<@Valid File> files = new ArrayList<>(); public FileSchemaTestClass file(File file) { @@ -40,10 +39,9 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ - @Valid @ApiModelProperty(value = "") @JsonProperty("file") - public File getFile() { + public @Valid File getFile() { return file; } @@ -51,7 +49,7 @@ public void setFile(File file) { this.file = file; } - public FileSchemaTestClass files(List<@Valid File> files) { + public FileSchemaTestClass files(List files) { this.files = files; return this; } @@ -68,14 +66,13 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ - @Valid @ApiModelProperty(value = "") @JsonProperty("files") public List<@Valid File> getFiles() { return files; } - public void setFiles(List<@Valid File> files) { + public void setFiles(List files) { this.files = files; } @@ -118,4 +115,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java index fda969ad06d3..fa150f1fa069 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java @@ -30,33 +30,33 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class FormatTest { - private Integer integer; + private @Min(10) @Max(100) Integer integer; - private Integer int32; + private @Min(20) @Max(200) Integer int32; private Long int64; - private BigDecimal number; + private @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal number; - private Float _float; + private @DecimalMin("54.3") @DecimalMax("987.6") Float _float; - private Double _double; + private @DecimalMin("67.8") @DecimalMax("123.4") Double _double; - private String string; + private @Pattern(regexp = "/[a-z]/i") String string; - private byte[] _byte; + private @NotNull byte[] _byte; private org.springframework.core.io.Resource binary; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) - private LocalDate date; + private @NotNull LocalDate date; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; private UUID uuid; - private String password; + private @NotNull @Size(min = 10, max = 64) String password; private BigDecimal bigDecimal; @@ -85,10 +85,9 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ - @Min(10) @Max(100) @ApiModelProperty(value = "") @JsonProperty("integer") - public Integer getInteger() { + public @Min(10) @Max(100) Integer getInteger() { return integer; } @@ -107,10 +106,9 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ - @Min(20) @Max(200) @ApiModelProperty(value = "") @JsonProperty("int32") - public Integer getInt32() { + public @Min(20) @Max(200) Integer getInt32() { return int32; } @@ -127,7 +125,6 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ - @ApiModelProperty(value = "") @JsonProperty("int64") public Long getInt64() { @@ -149,10 +146,9 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ - @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(required = true, value = "") @JsonProperty("number") - public BigDecimal getNumber() { + public @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal getNumber() { return number; } @@ -171,10 +167,9 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ - @DecimalMin("54.3") @DecimalMax("987.6") @ApiModelProperty(value = "") @JsonProperty("float") - public Float getFloat() { + public @DecimalMin("54.3") @DecimalMax("987.6") Float getFloat() { return _float; } @@ -193,10 +188,9 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ - @DecimalMin("67.8") @DecimalMax("123.4") @ApiModelProperty(value = "") @JsonProperty("double") - public Double getDouble() { + public @DecimalMin("67.8") @DecimalMax("123.4") Double getDouble() { return _double; } @@ -213,10 +207,9 @@ public FormatTest string(String string) { * Get string * @return string */ - @Pattern(regexp = "/[a-z]/i") @ApiModelProperty(value = "") @JsonProperty("string") - public String getString() { + public @Pattern(regexp = "/[a-z]/i") String getString() { return string; } @@ -233,10 +226,9 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("byte") - public byte[] getByte() { + public @NotNull byte[] getByte() { return _byte; } @@ -253,7 +245,6 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ - @Valid @ApiModelProperty(value = "") @JsonProperty("binary") public org.springframework.core.io.Resource getBinary() { @@ -273,10 +264,9 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ - @NotNull @Valid @ApiModelProperty(required = true, value = "") @JsonProperty("date") - public LocalDate getDate() { + public @NotNull LocalDate getDate() { return date; } @@ -293,7 +283,6 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ - @Valid @ApiModelProperty(value = "") @JsonProperty("dateTime") public OffsetDateTime getDateTime() { @@ -313,7 +302,6 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ - @Valid @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") @JsonProperty("uuid") public UUID getUuid() { @@ -333,10 +321,9 @@ public FormatTest password(String password) { * Get password * @return password */ - @NotNull @Size(min = 10, max = 64) @ApiModelProperty(required = true, value = "") @JsonProperty("password") - public String getPassword() { + public @NotNull @Size(min = 10, max = 64) String getPassword() { return password; } @@ -353,7 +340,6 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ - @Valid @ApiModelProperty(value = "") @JsonProperty("BigDecimal") public BigDecimal getBigDecimal() { @@ -427,4 +413,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 27ea04eaa86c..628772ab47fe 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -37,7 +37,6 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("bar") public String getBar() { @@ -57,7 +56,6 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("foo") public String getFoo() { @@ -107,4 +105,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java index bd3eea6e64df..a060e9d647a7 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class MapTest { - @Valid private Map> mapMapOfString = new HashMap<>(); /** @@ -63,13 +62,10 @@ public static InnerEnum fromValue(String value) { } } - @Valid - private Map mapOfEnumString = new HashMap<>(); + private Map mapOfEnumString = new HashMap<>(); - @Valid private Map directMap = new HashMap<>(); - @Valid private Map indirectMap = new HashMap<>(); public MapTest mapMapOfString(Map> mapMapOfString) { @@ -89,7 +85,6 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ - @Valid @ApiModelProperty(value = "") @JsonProperty("map_map_of_string") public Map> getMapMapOfString() { @@ -117,10 +112,9 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ - @ApiModelProperty(value = "") @JsonProperty("map_of_enum_string") - public Map getMapOfEnumString() { + public Map getMapOfEnumString() { return mapOfEnumString; } @@ -145,7 +139,6 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ - @ApiModelProperty(value = "") @JsonProperty("direct_map") public Map getDirectMap() { @@ -173,7 +166,6 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ - @ApiModelProperty(value = "") @JsonProperty("indirect_map") public Map getIndirectMap() { @@ -227,4 +219,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index b16370183e0a..0ecca046c869 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -33,8 +33,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; - @Valid - private Map map = new HashMap<>(); + private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { this.uuid = uuid; @@ -45,7 +44,6 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ - @Valid @ApiModelProperty(value = "") @JsonProperty("uuid") public UUID getUuid() { @@ -65,7 +63,6 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ - @Valid @ApiModelProperty(value = "") @JsonProperty("dateTime") public OffsetDateTime getDateTime() { @@ -93,10 +90,9 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ - @Valid @ApiModelProperty(value = "") @JsonProperty("map") - public Map getMap() { + public Map getMap() { return map; } @@ -145,4 +141,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Model200Response.java index 4922749da22c..6f4b8460e6f4 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Model200Response.java @@ -38,7 +38,6 @@ public Model200Response name(Integer name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public Integer getName() { @@ -58,7 +57,6 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @ApiModelProperty(value = "") @JsonProperty("class") public String getPropertyClass() { @@ -108,4 +106,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelApiResponse.java index 21244266ad17..31642652231b 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -39,7 +39,6 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @ApiModelProperty(value = "") @JsonProperty("code") public Integer getCode() { @@ -59,7 +58,6 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @ApiModelProperty(value = "") @JsonProperty("type") public String getType() { @@ -79,7 +77,6 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @ApiModelProperty(value = "") @JsonProperty("message") public String getMessage() { @@ -131,4 +128,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelList.java index d3d66db5c095..b9dc65977c53 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelList.java @@ -35,7 +35,6 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ - @ApiModelProperty(value = "") @JsonProperty("123-list") public String get123list() { @@ -83,4 +82,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelReturn.java index 2c8a25a4d85f..72d78cb7fc0b 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelReturn.java @@ -36,7 +36,6 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ - @ApiModelProperty(value = "") @JsonProperty("return") public Integer getReturn() { @@ -84,4 +83,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java index 420c565a9955..f42d379c1083 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java @@ -23,7 +23,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class Name { - private Integer name; + private @NotNull Integer name; private Integer snakeCase; @@ -51,10 +51,9 @@ public Name name(Integer name) { * Get name * @return name */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("name") - public Integer getName() { + public @NotNull Integer getName() { return name; } @@ -71,7 +70,6 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("snake_case") public Integer getSnakeCase() { @@ -91,7 +89,6 @@ public Name property(String property) { * Get property * @return property */ - @ApiModelProperty(value = "") @JsonProperty("property") public String getProperty() { @@ -111,7 +108,6 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("123Number") public Integer get123number() { @@ -165,4 +161,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NullableMapProperty.java index cc44c57fdd1a..8a5f0b99081e 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NullableMapProperty.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -27,11 +27,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class NullableMapProperty { - @Valid - private JsonNullable> languageValues = JsonNullable.>undefined(); + private JsonNullable> languageValues = JsonNullable.undefined(); - public NullableMapProperty languageValues(Map languageValues) { - this.languageValues = JsonNullable.of(languageValues); + public NullableMapProperty languageValues(JsonNullable> languageValues) { + this.languageValues = languageValues; return this; } @@ -47,7 +46,6 @@ public NullableMapProperty putLanguageValuesItem(String key, String languageValu * Get languageValues * @return languageValues */ - @ApiModelProperty(value = "") @JsonProperty("languageValues") public JsonNullable> getLanguageValues() { @@ -106,4 +104,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NumberOnly.java index 69de58b11374..eb57c97846a2 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NumberOnly.java @@ -34,7 +34,6 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("JustNumber") public BigDecimal getJustNumber() { @@ -82,4 +81,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java index 48932f68f862..6b84d7a0c4b4 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java @@ -71,7 +71,7 @@ public static StatusEnum fromValue(String value) { } } - private StatusEnum status; + private String status; private Boolean complete = false; @@ -84,7 +84,6 @@ public Order id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -104,7 +103,6 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @ApiModelProperty(value = "") @JsonProperty("petId") public Long getPetId() { @@ -124,7 +122,6 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @ApiModelProperty(value = "") @JsonProperty("quantity") public Integer getQuantity() { @@ -144,7 +141,6 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Valid @ApiModelProperty(value = "") @JsonProperty("shipDate") public OffsetDateTime getShipDate() { @@ -164,10 +160,9 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @ApiModelProperty(value = "Order Status") @JsonProperty("status") - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -184,7 +179,6 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @ApiModelProperty(value = "") @JsonProperty("complete") public Boolean getComplete() { @@ -242,4 +236,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java index 2e78c0586cab..2bfc1db21bb2 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java @@ -38,7 +38,6 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("my_number") public BigDecimal getMyNumber() { @@ -58,7 +57,6 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ - @ApiModelProperty(value = "") @JsonProperty("my_string") public String getMyString() { @@ -78,7 +76,6 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ - @ApiModelProperty(value = "") @JsonProperty("my_boolean") public Boolean getMyBoolean() { @@ -130,4 +127,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ParentWithNullable.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ParentWithNullable.java index 893ed74ce711..94f35cbaf971 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ParentWithNullable.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ParentWithNullable.java @@ -71,9 +71,9 @@ public static TypeEnum fromValue(String value) { } } - private TypeEnum type; + private String type; - private JsonNullable nullableProperty = JsonNullable.undefined(); + private JsonNullable nullableProperty = JsonNullable.undefined(); public ParentWithNullable type(TypeEnum type) { this.type = type; @@ -84,10 +84,9 @@ public ParentWithNullable type(TypeEnum type) { * Get type * @return type */ - @ApiModelProperty(value = "") @JsonProperty("type") - public TypeEnum getType() { + public String getType() { return type; } @@ -95,8 +94,8 @@ public void setType(TypeEnum type) { this.type = type; } - public ParentWithNullable nullableProperty(String nullableProperty) { - this.nullableProperty = JsonNullable.of(nullableProperty); + public ParentWithNullable nullableProperty(JsonNullable nullableProperty) { + this.nullableProperty = nullableProperty; return this; } @@ -104,7 +103,6 @@ public ParentWithNullable nullableProperty(String nullableProperty) { * Get nullableProperty * @return nullableProperty */ - @ApiModelProperty(value = "") @JsonProperty("nullableProperty") public JsonNullable getNullableProperty() { @@ -165,4 +163,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java index 67242095aeba..3ac00f4958c1 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java @@ -33,14 +33,12 @@ public class Pet { private Long id; - private Category category; + private @Valid Category category; - private String name; + private @NotNull String name; - @Valid - private Set photoUrls = new LinkedHashSet<>(); + private @NotNull Set photoUrls = new LinkedHashSet<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** @@ -81,7 +79,7 @@ public static StatusEnum fromValue(String value) { } @Deprecated - private StatusEnum status; + private String status; public Pet() { super(); @@ -104,7 +102,6 @@ public Pet id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -124,10 +121,9 @@ public Pet category(Category category) { * Get category * @return category */ - @Valid @ApiModelProperty(value = "") @JsonProperty("category") - public Category getCategory() { + public @Valid Category getCategory() { return category; } @@ -144,10 +140,9 @@ public Pet name(String name) { * Get name * @return name */ - @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -172,10 +167,9 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("photoUrls") - public Set getPhotoUrls() { + public @NotNull Set getPhotoUrls() { return photoUrls; } @@ -184,7 +178,7 @@ public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List<@Valid Tag> tags) { + public Pet tags(List tags) { this.tags = tags; return this; } @@ -201,14 +195,13 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Valid @ApiModelProperty(value = "") @JsonProperty("tags") public List<@Valid Tag> getTags() { return tags; } - public void setTags(List<@Valid Tag> tags) { + public void setTags(List tags) { this.tags = tags; } @@ -222,11 +215,10 @@ public Pet status(StatusEnum status) { * @return status * @deprecated */ - @ApiModelProperty(value = "pet status in the store") @JsonProperty("status") @Deprecated - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -285,4 +277,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 9388f3cfd29f..1eee9577a877 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -35,7 +35,6 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("bar") public String getBar() { @@ -55,7 +54,6 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ - @ApiModelProperty(value = "") @JsonProperty("baz") public String getBaz() { @@ -105,4 +103,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java index 68785baf943e..fc1f3861dbc7 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java @@ -39,7 +39,6 @@ public ResponseObjectWithDifferentFieldNames normalPropertyName(String normalPro * Get normalPropertyName * @return normalPropertyName */ - @ApiModelProperty(value = "") @JsonProperty("normalPropertyName") public String getNormalPropertyName() { @@ -59,7 +58,6 @@ public ResponseObjectWithDifferentFieldNames UPPER_CASE_PROPERTY_SNAKE(String UP * Get UPPER_CASE_PROPERTY_SNAKE * @return UPPER_CASE_PROPERTY_SNAKE */ - @ApiModelProperty(value = "") @JsonProperty("UPPER_CASE_PROPERTY_SNAKE") public String getUPPERCASEPROPERTYSNAKE() { @@ -79,7 +77,6 @@ public ResponseObjectWithDifferentFieldNames lowerCasePropertyDashes(String lowe * Get lowerCasePropertyDashes * @return lowerCasePropertyDashes */ - @ApiModelProperty(value = "") @JsonProperty("lower-case-property-dashes") public String getLowerCasePropertyDashes() { @@ -99,7 +96,6 @@ public ResponseObjectWithDifferentFieldNames propertyNameWithSpaces(String prope * Get propertyNameWithSpaces * @return propertyNameWithSpaces */ - @ApiModelProperty(value = "") @JsonProperty("property name with spaces") public String getPropertyNameWithSpaces() { @@ -153,4 +149,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/SpecialModelName.java index 7f751ef4aedc..ca744d5efe00 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/SpecialModelName.java @@ -35,7 +35,6 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ - @ApiModelProperty(value = "") @JsonProperty("$special[property.name]") public Long get$SpecialPropertyName() { @@ -83,4 +82,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Tag.java index 850c68911db4..d3778890e2d6 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Tag.java @@ -35,7 +35,6 @@ public Tag id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -55,7 +54,6 @@ public Tag name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -105,4 +103,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java index 420967a01328..d5ce2f773c46 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -26,16 +26,15 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class TypeHolderDefault { - private String stringItem = "what"; + private @NotNull String stringItem = "what"; - private BigDecimal numberItem = new BigDecimal("1.234"); + private @NotNull BigDecimal numberItem = new BigDecimal("1.234"); - private Integer integerItem = -2; + private @NotNull Integer integerItem = -2; - private Boolean boolItem = true; + private @NotNull Boolean boolItem = true; - @Valid - private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); + private @NotNull List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); public TypeHolderDefault() { super(); @@ -61,10 +60,9 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("string_item") - public String getStringItem() { + public @NotNull String getStringItem() { return stringItem; } @@ -81,10 +79,9 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @NotNull @Valid @ApiModelProperty(required = true, value = "") @JsonProperty("number_item") - public BigDecimal getNumberItem() { + public @NotNull BigDecimal getNumberItem() { return numberItem; } @@ -101,10 +98,9 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("integer_item") - public Integer getIntegerItem() { + public @NotNull Integer getIntegerItem() { return integerItem; } @@ -121,10 +117,9 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("bool_item") - public Boolean getBoolItem() { + public @NotNull Boolean getBoolItem() { return boolItem; } @@ -149,10 +144,9 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("array_item") - public List getArrayItem() { + public @NotNull List getArrayItem() { return arrayItem; } @@ -205,4 +199,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java index 909dc1e7fe60..e9b3492a4684 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -26,18 +26,17 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class TypeHolderExample { - private String stringItem; + private @NotNull String stringItem; - private BigDecimal numberItem; + private @NotNull BigDecimal numberItem; - private Float floatItem; + private @NotNull Float floatItem; - private Integer integerItem; + private @NotNull Integer integerItem; - private Boolean boolItem; + private @NotNull Boolean boolItem; - @Valid - private List arrayItem = new ArrayList<>(); + private @NotNull List arrayItem = new ArrayList<>(); public TypeHolderExample() { super(); @@ -64,10 +63,9 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @NotNull @ApiModelProperty(example = "what", required = true, value = "") @JsonProperty("string_item") - public String getStringItem() { + public @NotNull String getStringItem() { return stringItem; } @@ -84,10 +82,9 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @NotNull @Valid @ApiModelProperty(example = "1.234", required = true, value = "") @JsonProperty("number_item") - public BigDecimal getNumberItem() { + public @NotNull BigDecimal getNumberItem() { return numberItem; } @@ -104,10 +101,9 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ - @NotNull @ApiModelProperty(example = "1.234", required = true, value = "") @JsonProperty("float_item") - public Float getFloatItem() { + public @NotNull Float getFloatItem() { return floatItem; } @@ -124,10 +120,9 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @NotNull @ApiModelProperty(example = "-2", required = true, value = "") @JsonProperty("integer_item") - public Integer getIntegerItem() { + public @NotNull Integer getIntegerItem() { return integerItem; } @@ -144,10 +139,9 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @NotNull @ApiModelProperty(example = "true", required = true, value = "") @JsonProperty("bool_item") - public Boolean getBoolItem() { + public @NotNull Boolean getBoolItem() { return boolItem; } @@ -172,10 +166,9 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @NotNull @ApiModelProperty(example = "[0,1,2,3]", required = true, value = "") @JsonProperty("array_item") - public List getArrayItem() { + public @NotNull List getArrayItem() { return arrayItem; } @@ -230,4 +223,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/User.java index e46b4e9e7907..2a1878ded5d2 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/User.java @@ -47,7 +47,6 @@ public User id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -67,7 +66,6 @@ public User username(String username) { * Get username * @return username */ - @ApiModelProperty(value = "") @JsonProperty("username") public String getUsername() { @@ -87,7 +85,6 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @ApiModelProperty(value = "") @JsonProperty("firstName") public String getFirstName() { @@ -107,7 +104,6 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @ApiModelProperty(value = "") @JsonProperty("lastName") public String getLastName() { @@ -127,7 +123,6 @@ public User email(String email) { * Get email * @return email */ - @ApiModelProperty(value = "") @JsonProperty("email") public String getEmail() { @@ -147,7 +142,6 @@ public User password(String password) { * Get password * @return password */ - @ApiModelProperty(value = "") @JsonProperty("password") public String getPassword() { @@ -167,7 +161,6 @@ public User phone(String phone) { * Get phone * @return phone */ - @ApiModelProperty(value = "") @JsonProperty("phone") public String getPhone() { @@ -187,7 +180,6 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @ApiModelProperty(value = "User Status") @JsonProperty("userStatus") public Integer getUserStatus() { @@ -249,4 +241,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java index b7a622a0b99e..2e676eb62e75 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java @@ -34,7 +34,6 @@ public class XmlItem { private Boolean attributeBoolean; - @Valid private List wrappedArray = new ArrayList<>(); private String nameString; @@ -45,10 +44,8 @@ public class XmlItem { private Boolean nameBoolean; - @Valid private List nameArray = new ArrayList<>(); - @Valid private List nameWrappedArray = new ArrayList<>(); private String prefixString; @@ -59,10 +56,8 @@ public class XmlItem { private Boolean prefixBoolean; - @Valid private List prefixArray = new ArrayList<>(); - @Valid private List prefixWrappedArray = new ArrayList<>(); private String namespaceString; @@ -73,10 +68,8 @@ public class XmlItem { private Boolean namespaceBoolean; - @Valid private List namespaceArray = new ArrayList<>(); - @Valid private List namespaceWrappedArray = new ArrayList<>(); private String prefixNsString; @@ -87,10 +80,8 @@ public class XmlItem { private Boolean prefixNsBoolean; - @Valid private List prefixNsArray = new ArrayList<>(); - @Valid private List prefixNsWrappedArray = new ArrayList<>(); public XmlItem attributeString(String attributeString) { @@ -102,7 +93,6 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("attribute_string") public String getAttributeString() { @@ -122,7 +112,6 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("attribute_number") public BigDecimal getAttributeNumber() { @@ -142,7 +131,6 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("attribute_integer") public Integer getAttributeInteger() { @@ -162,7 +150,6 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("attribute_boolean") public Boolean getAttributeBoolean() { @@ -190,7 +177,6 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("wrapped_array") public List getWrappedArray() { @@ -210,7 +196,6 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("name_string") public String getNameString() { @@ -230,7 +215,6 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("name_number") public BigDecimal getNameNumber() { @@ -250,7 +234,6 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("name_integer") public Integer getNameInteger() { @@ -270,7 +253,6 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("name_boolean") public Boolean getNameBoolean() { @@ -298,7 +280,6 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ - @ApiModelProperty(value = "") @JsonProperty("name_array") public List getNameArray() { @@ -326,7 +307,6 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("name_wrapped_array") public List getNameWrappedArray() { @@ -346,7 +326,6 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("prefix_string") public String getPrefixString() { @@ -366,7 +345,6 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("prefix_number") public BigDecimal getPrefixNumber() { @@ -386,7 +364,6 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_integer") public Integer getPrefixInteger() { @@ -406,7 +383,6 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("prefix_boolean") public Boolean getPrefixBoolean() { @@ -434,7 +410,6 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_array") public List getPrefixArray() { @@ -462,7 +437,6 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_wrapped_array") public List getPrefixWrappedArray() { @@ -482,7 +456,6 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("namespace_string") public String getNamespaceString() { @@ -502,7 +475,6 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("namespace_number") public BigDecimal getNamespaceNumber() { @@ -522,7 +494,6 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { @@ -542,7 +513,6 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("namespace_boolean") public Boolean getNamespaceBoolean() { @@ -570,7 +540,6 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ - @ApiModelProperty(value = "") @JsonProperty("namespace_array") public List getNamespaceArray() { @@ -598,7 +567,6 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("namespace_wrapped_array") public List getNamespaceWrappedArray() { @@ -618,7 +586,6 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("prefix_ns_string") public String getPrefixNsString() { @@ -638,7 +605,6 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("prefix_ns_number") public BigDecimal getPrefixNsNumber() { @@ -658,7 +624,6 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { @@ -678,7 +643,6 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("prefix_ns_boolean") public Boolean getPrefixNsBoolean() { @@ -706,7 +670,6 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_ns_array") public List getPrefixNsArray() { @@ -734,7 +697,6 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_ns_wrapped_array") public List getPrefixNsWrappedArray() { @@ -838,4 +800,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/api/PetApi.java index 678910b80111..e49c1095cd78 100644 --- a/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/api/PetApi.java @@ -74,7 +74,7 @@ default Optional getRequest() { ) default ResponseEntity addPet( - @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet pet ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -121,7 +121,7 @@ default ResponseEntity addPet( ) default ResponseEntity deletePet( - @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, @Parameter(name = "api_key", description = "", in = ParameterIn.HEADER) @RequestHeader(value = "api_key", required = false) String apiKey ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -160,7 +160,7 @@ default ResponseEntity deletePet( ) default ResponseEntity> findPetsByStatus( - @NotNull @Parameter(name = "status", deprecated = true, description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) @Deprecated List status + @Parameter(name = "status", deprecated = true, description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @RequestParam(value = "status") @Deprecated @NotNull List status ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -215,7 +215,7 @@ default ResponseEntity> findPetsByStatus( ) default ResponseEntity> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) List tags + @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @RequestParam(value = "tags") @NotNull List tags ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -269,7 +269,7 @@ default ResponseEntity> findPetsByTags( ) default ResponseEntity getPetById( - @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId + @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -329,7 +329,7 @@ default ResponseEntity getPetById( ) default ResponseEntity updatePet( - @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet pet ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -378,9 +378,9 @@ default ResponseEntity updatePet( ) default ResponseEntity updatePetWithForm( - @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, - @Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, - @Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status + @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, + @Parameter(name = "name", description = "Updated name of the pet") @RequestParam(value = "name", required = false) String name, + @Parameter(name = "status", description = "Updated status of the pet") @RequestParam(value = "status", required = false) String status ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -418,8 +418,8 @@ default ResponseEntity updatePetWithForm( ) default ResponseEntity uploadFile( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, - @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, + @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, + @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) { getRequest().ifPresent(request -> { diff --git a/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/api/StoreApi.java index 1869a4e34d13..5c679c9b1b7a 100644 --- a/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/api/StoreApi.java @@ -66,7 +66,7 @@ default Optional getRequest() { ) default ResponseEntity deleteOrder( - @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId + @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") @NotNull String orderId ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -137,7 +137,7 @@ default ResponseEntity> getInventory( ) default ResponseEntity getOrderById( - @Min(1L) @Max(5L) @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("orderId") Long orderId + @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("orderId") @NotNull @Min(1L) @Max(5L) Long orderId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -187,7 +187,7 @@ default ResponseEntity getOrderById( ) default ResponseEntity placeOrder( - @Parameter(name = "Order", description = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order + @Parameter(name = "Order", description = "order placed for purchasing the pet", required = true) @RequestBody @NotNull @Valid Order order ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/api/UserApi.java index 89d2e27ae6a3..502495b6d828 100644 --- a/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/api/UserApi.java @@ -68,7 +68,7 @@ default Optional getRequest() { ) default ResponseEntity createUser( - @Parameter(name = "User", description = "Created user object", required = true) @Valid @RequestBody User user + @Parameter(name = "User", description = "Created user object", required = true) @RequestBody @NotNull @Valid User user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -101,7 +101,7 @@ default ResponseEntity createUser( ) default ResponseEntity createUsersWithArrayInput( - @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + @Parameter(name = "User", description = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -134,7 +134,7 @@ default ResponseEntity createUsersWithArrayInput( ) default ResponseEntity createUsersWithListInput( - @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + @Parameter(name = "User", description = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -168,7 +168,7 @@ default ResponseEntity createUsersWithListInput( ) default ResponseEntity deleteUser( - @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") @NotNull String username ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -205,7 +205,7 @@ default ResponseEntity deleteUser( ) default ResponseEntity getUserByName( - @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") @NotNull String username ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -255,8 +255,8 @@ default ResponseEntity getUserByName( ) default ResponseEntity loginUser( - @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username, - @NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) String password + @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @RequestParam(value = "username") @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String username, + @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @RequestParam(value = "password") @NotNull String password ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -323,8 +323,8 @@ default ResponseEntity logoutUser( ) default ResponseEntity updateUser( - @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, - @Parameter(name = "User", description = "Updated user object", required = true) @Valid @RequestBody User user + @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") @NotNull String username, + @Parameter(name = "User", description = "Updated user object", required = true) @RequestBody @NotNull @Valid User user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/model/Category.java index 36a9c33a0586..861afd76e429 100644 --- a/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/model/Category.java @@ -28,7 +28,6 @@ public class Category { private Long id; - private String name; + private @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String name; } - diff --git a/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/model/ModelApiResponse.java index 1d9ecc8d024e..88fb1e590464 100644 --- a/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -35,4 +35,3 @@ public class ModelApiResponse { private String message; } - diff --git a/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/model/Order.java index df84f20da837..da2f2041f485 100644 --- a/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/model/Order.java @@ -75,9 +75,8 @@ public static StatusEnum fromValue(String value) { } } - private StatusEnum status; + private String status; private Boolean complete = false; } - diff --git a/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/model/Pet.java index 10b1efd1483f..bb5313a6ad4e 100644 --- a/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/model/Pet.java @@ -34,14 +34,12 @@ public class Pet { private Long id; - private Category category; + private @Valid Category category; - private String name; + private @NotNull String name; - @Valid - private List photoUrls = new ArrayList<>(); + private @NotNull List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** @@ -82,7 +80,6 @@ public static StatusEnum fromValue(String value) { } @Deprecated - private StatusEnum status; + private String status; } - diff --git a/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/model/Tag.java index 7ae88fa046df..a9a3fa291fe2 100644 --- a/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/model/Tag.java @@ -31,4 +31,3 @@ public class Tag { private String name; } - diff --git a/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/model/User.java index c392112be45c..bed379af5146 100644 --- a/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-lombok-data/src/main/java/org/openapitools/model/User.java @@ -43,4 +43,3 @@ public class User { private Integer userStatus; } - diff --git a/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/api/PetApi.java index 89fb77fc3278..7e6219f66985 100644 --- a/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/api/PetApi.java @@ -74,7 +74,7 @@ default Optional getRequest() { ) default ResponseEntity addPet( - @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet pet ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -121,7 +121,7 @@ default ResponseEntity addPet( ) default ResponseEntity deletePet( - @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, @Parameter(name = "api_key", description = "", in = ParameterIn.HEADER) @RequestHeader(value = "api_key", required = false) String apiKey ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -160,7 +160,7 @@ default ResponseEntity deletePet( ) default ResponseEntity> findPetsByStatus( - @NotNull @Parameter(name = "status", deprecated = true, description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) @Deprecated List status + @Parameter(name = "status", deprecated = true, description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @RequestParam(value = "status") @Deprecated @NotNull List status ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -215,7 +215,7 @@ default ResponseEntity> findPetsByStatus( ) default ResponseEntity> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) List tags + @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @RequestParam(value = "tags") @NotNull List tags ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -269,7 +269,7 @@ default ResponseEntity> findPetsByTags( ) default ResponseEntity getPetById( - @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId + @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -329,7 +329,7 @@ default ResponseEntity getPetById( ) default ResponseEntity updatePet( - @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet pet ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -378,9 +378,9 @@ default ResponseEntity updatePet( ) default ResponseEntity updatePetWithForm( - @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, - @Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, - @Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status + @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, + @Parameter(name = "name", description = "Updated name of the pet") @RequestParam(value = "name", required = false) String name, + @Parameter(name = "status", description = "Updated status of the pet") @RequestParam(value = "status", required = false) String status ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -418,8 +418,8 @@ default ResponseEntity updatePetWithForm( ) default ResponseEntity uploadFile( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, - @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, + @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, + @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) { getRequest().ifPresent(request -> { diff --git a/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/api/StoreApi.java index 0b89427cfb79..a3a1a9fccbec 100644 --- a/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/api/StoreApi.java @@ -66,7 +66,7 @@ default Optional getRequest() { ) default ResponseEntity deleteOrder( - @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId + @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") @NotNull String orderId ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -137,7 +137,7 @@ default ResponseEntity> getInventory( ) default ResponseEntity getOrderById( - @Min(1L) @Max(5L) @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("orderId") Long orderId + @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("orderId") @NotNull @Min(1L) @Max(5L) Long orderId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -187,7 +187,7 @@ default ResponseEntity getOrderById( ) default ResponseEntity placeOrder( - @Parameter(name = "Order", description = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order + @Parameter(name = "Order", description = "order placed for purchasing the pet", required = true) @RequestBody @NotNull @Valid Order order ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/api/UserApi.java index f0203aa45499..fd7bca78729a 100644 --- a/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/api/UserApi.java @@ -68,7 +68,7 @@ default Optional getRequest() { ) default ResponseEntity createUser( - @Parameter(name = "User", description = "Created user object", required = true) @Valid @RequestBody User user + @Parameter(name = "User", description = "Created user object", required = true) @RequestBody @NotNull @Valid User user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -101,7 +101,7 @@ default ResponseEntity createUser( ) default ResponseEntity createUsersWithArrayInput( - @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + @Parameter(name = "User", description = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -134,7 +134,7 @@ default ResponseEntity createUsersWithArrayInput( ) default ResponseEntity createUsersWithListInput( - @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + @Parameter(name = "User", description = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -168,7 +168,7 @@ default ResponseEntity createUsersWithListInput( ) default ResponseEntity deleteUser( - @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") @NotNull String username ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -205,7 +205,7 @@ default ResponseEntity deleteUser( ) default ResponseEntity getUserByName( - @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") @NotNull String username ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -255,8 +255,8 @@ default ResponseEntity getUserByName( ) default ResponseEntity loginUser( - @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username, - @NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) String password + @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @RequestParam(value = "username") @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String username, + @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @RequestParam(value = "password") @NotNull String password ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -323,8 +323,8 @@ default ResponseEntity logoutUser( ) default ResponseEntity updateUser( - @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, - @Parameter(name = "User", description = "Updated user object", required = true) @Valid @RequestBody User user + @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") @NotNull String username, + @Parameter(name = "User", description = "Updated user object", required = true) @RequestBody @NotNull @Valid User user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/model/Category.java index aff0c5dcf59f..53f4d7a1a6ab 100644 --- a/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/model/Category.java @@ -29,7 +29,7 @@ public class Category { private Long id; - private String name; + private @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") String name; public Category id(Long id) { this.id = id; @@ -45,4 +45,3 @@ public Category name(String name) { } - diff --git a/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/model/ModelApiResponse.java index f27e1685fe32..7aa635fc8a43 100644 --- a/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -55,4 +55,3 @@ public ModelApiResponse message(String message) { } - diff --git a/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/model/Order.java index 66bee3398c3b..36049f1464e3 100644 --- a/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/model/Order.java @@ -76,7 +76,7 @@ public static StatusEnum fromValue(String value) { } } - private StatusEnum status; + private String status; private Boolean complete = false; @@ -118,4 +118,3 @@ public Order complete(Boolean complete) { } - diff --git a/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/model/Pet.java index 223d7dba816a..b3d1f5b51983 100644 --- a/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/model/Pet.java @@ -35,14 +35,12 @@ public class Pet { private Long id; - private Category category; + private @Valid Category category; - private String name; + private @NotNull String name; - @Valid - private List photoUrls = new ArrayList<>(); + private @NotNull List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** @@ -83,7 +81,7 @@ public static StatusEnum fromValue(String value) { } @Deprecated - private StatusEnum status; + private String status; public Pet() { super(); @@ -129,7 +127,7 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { } - public Pet tags(List<@Valid Tag> tags) { + public Pet tags(List tags) { this.tags = tags; return this; } @@ -151,4 +149,3 @@ public Pet status(StatusEnum status) { } - diff --git a/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/model/Tag.java index 2ea9978ab204..4de5c02c2093 100644 --- a/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/model/Tag.java @@ -45,4 +45,3 @@ public Tag name(String name) { } - diff --git a/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/model/User.java index 40eb935b11f1..f42163f76c2b 100644 --- a/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/model/User.java @@ -93,4 +93,3 @@ public User userStatus(Integer userStatus) { } - diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/AnotherFakeApi.java index bf086db64371..c86b857355fb 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -58,7 +58,7 @@ default AnotherFakeApiDelegate getDelegate() { @ResponseStatus(HttpStatus.OK) default Mono call123testSpecialTags( - @ApiParam(value = "client model", required = true) @Valid @RequestBody Mono client, + @ApiParam(value = "client model", required = true) @RequestBody Mono<@NotNull @Valid Client> client, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().call123testSpecialTags(client, exchange); diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApi.java index 9f4b671a71dd..bafbcac3f0b7 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApi.java @@ -68,7 +68,7 @@ default FakeApiDelegate getDelegate() { @ResponseStatus(HttpStatus.OK) default Mono createXmlItem( - @ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody Mono xmlItem, + @ApiParam(value = "XmlItem Body", required = true) @RequestBody Mono<@NotNull @Valid XmlItem> xmlItem, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().createXmlItem(xmlItem, exchange); @@ -101,7 +101,7 @@ default Mono createXmlItem( @ResponseStatus(HttpStatus.OK) default Mono fakeOuterBooleanSerialize( - @ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Mono body, + @ApiParam(value = "Input boolean as post body") @RequestBody(required = false) Mono body, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().fakeOuterBooleanSerialize(body, exchange); @@ -134,7 +134,7 @@ default Mono fakeOuterBooleanSerialize( @ResponseStatus(HttpStatus.OK) default Mono fakeOuterCompositeSerialize( - @ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) Mono outerComposite, + @ApiParam(value = "Input composite as post body") @RequestBody(required = false) Mono<@Valid OuterComposite> outerComposite, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().fakeOuterCompositeSerialize(outerComposite, exchange); @@ -167,7 +167,7 @@ default Mono fakeOuterCompositeSerialize( @ResponseStatus(HttpStatus.OK) default Mono fakeOuterNumberSerialize( - @ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) Mono body, + @ApiParam(value = "Input number as post body") @RequestBody(required = false) Mono body, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().fakeOuterNumberSerialize(body, exchange); @@ -200,7 +200,7 @@ default Mono fakeOuterNumberSerialize( @ResponseStatus(HttpStatus.OK) default Mono fakeOuterStringSerialize( - @ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) Mono body, + @ApiParam(value = "Input string as post body") @RequestBody(required = false) Mono body, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().fakeOuterStringSerialize(body, exchange); @@ -231,7 +231,7 @@ default Mono fakeOuterStringSerialize( @ResponseStatus(HttpStatus.OK) default Mono responseObjectDifferentNames( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") @NotNull Long petId, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().responseObjectDifferentNames(petId, exchange); @@ -262,7 +262,7 @@ default Mono responseObjectDifferentNames @ResponseStatus(HttpStatus.OK) default Mono testBodyWithFileSchema( - @ApiParam(value = "", required = true) @Valid @RequestBody Mono fileSchemaTestClass, + @ApiParam(value = "", required = true) @RequestBody Mono<@NotNull @Valid FileSchemaTestClass> fileSchemaTestClass, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().testBodyWithFileSchema(fileSchemaTestClass, exchange); @@ -293,8 +293,8 @@ default Mono testBodyWithFileSchema( @ResponseStatus(HttpStatus.OK) default Mono testBodyWithQueryParams( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, - @ApiParam(value = "", required = true) @Valid @RequestBody Mono user, + @ApiParam(value = "", required = true) @RequestParam(value = "query") @NotNull String query, + @ApiParam(value = "", required = true) @RequestBody Mono<@NotNull @Valid User> user, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().testBodyWithQueryParams(query, user, exchange); @@ -327,7 +327,7 @@ default Mono testBodyWithQueryParams( @ResponseStatus(HttpStatus.OK) default Mono testClientModel( - @ApiParam(value = "client model", required = true) @Valid @RequestBody Mono client, + @ApiParam(value = "client model", required = true) @RequestBody Mono<@NotNull @Valid Client> client, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().testClientModel(client, exchange); @@ -376,20 +376,20 @@ default Mono testClientModel( @ResponseStatus(HttpStatus.BAD_REQUEST) default Mono testEndpointParameters( - @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, - @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, - @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, - @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, - @ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, - @ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, - @ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, - @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, - @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, + @ApiParam(value = "None", required = true) @RequestPart(value = "number") @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal number, + @ApiParam(value = "None", required = true) @RequestPart(value = "double") @NotNull @DecimalMin("67.8") @DecimalMax("123.4") Double _double, + @ApiParam(value = "None", required = true) @RequestPart(value = "pattern_without_delimiter") @NotNull @Pattern(regexp = "^[A-Z].*") String patternWithoutDelimiter, + @ApiParam(value = "None", required = true) @RequestPart(value = "byte") @NotNull byte[] _byte, + @ApiParam(value = "None") @RequestPart(value = "integer", required = false) @Min(10) @Max(100) Integer integer, + @ApiParam(value = "None") @RequestPart(value = "int32", required = false) @Min(20) @Max(200) Integer int32, + @ApiParam(value = "None") @RequestPart(value = "int64", required = false) Long int64, + @ApiParam(value = "None") @RequestPart(value = "float", required = false) @DecimalMax("987.6") Float _float, + @ApiParam(value = "None") @RequestPart(value = "string", required = false) @Pattern(regexp = "/[a-z]/i") String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) Flux binary, - @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, - @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, - @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback, + @ApiParam(value = "None") @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @RequestPart(value = "password", required = false) @Size(min = 10, max = 64) String password, + @ApiParam(value = "None") @RequestPart(value = "callback", required = false) String paramCallback, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback, exchange); @@ -429,14 +429,14 @@ default Mono testEndpointParameters( @ResponseStatus(HttpStatus.BAD_REQUEST) default Mono testEnumParameters( - @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, - @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, - @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, - @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, - @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString, + @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestPart(value = "enum_form_string", required = false) String enumFormString, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, exchange); @@ -471,12 +471,12 @@ default Mono testEnumParameters( @ResponseStatus(HttpStatus.BAD_REQUEST) default Mono testGroupParameters( - @NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @ApiParam(value = "Required String in group parameters", required = true) @RequestParam(value = "required_string_group") @NotNull Integer requiredStringGroup, @NotNull @ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, - @NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, - @ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup, + @ApiParam(value = "Required Integer in group parameters", required = true) @RequestParam(value = "required_int64_group") @NotNull Long requiredInt64Group, + @ApiParam(value = "String in group parameters") @RequestParam(value = "string_group", required = false) Integer stringGroup, @ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup, - @ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group, + @ApiParam(value = "Integer in group parameters") @RequestParam(value = "int64_group", required = false) Long int64Group, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, exchange); @@ -507,7 +507,7 @@ default Mono testGroupParameters( @ResponseStatus(HttpStatus.OK) default Mono testInlineAdditionalProperties( - @ApiParam(value = "request body", required = true) @Valid @RequestBody Mono> requestBody, + @ApiParam(value = "request body", required = true) @RequestBody Mono<@NotNull Map> requestBody, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().testInlineAdditionalProperties(requestBody, exchange); @@ -539,8 +539,8 @@ default Mono testInlineAdditionalProperties( @ResponseStatus(HttpStatus.OK) default Mono testJsonFormData( - @ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, - @ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2, + @ApiParam(value = "field1", required = true) @RequestPart(value = "param") @NotNull String param, + @ApiParam(value = "field2", required = true) @RequestPart(value = "param2") @NotNull String param2, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().testJsonFormData(param, param2, exchange); @@ -571,7 +571,7 @@ default Mono testJsonFormData( @ResponseStatus(HttpStatus.OK) default Mono testNullable( - @ApiParam(value = "request body", required = true) @Valid @RequestBody Mono childWithNullable, + @ApiParam(value = "request body", required = true) @RequestBody Mono<@NotNull @Valid ChildWithNullable> childWithNullable, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().testNullable(childWithNullable, exchange); @@ -604,10 +604,10 @@ default Mono testNullable( @ResponseStatus(HttpStatus.OK) default Mono testQueryParameterCollectionFormat( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context, + @ApiParam(value = "", required = true) @RequestParam(value = "pipe") @NotNull List pipe, + @ApiParam(value = "", required = true) @RequestParam(value = "http") @NotNull List http, + @ApiParam(value = "", required = true) @RequestParam(value = "url") @NotNull List url, + @ApiParam(value = "", required = true) @RequestParam(value = "context") @NotNull List context, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().testQueryParameterCollectionFormat(pipe, http, url, context, exchange); @@ -678,9 +678,9 @@ default Mono testWithResultExample( @ResponseStatus(HttpStatus.OK) default Mono uploadFileWithRequiredFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, - @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) Flux requiredFile, - @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") @NotNull Long petId, + @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile") Flux requiredFile, + @ApiParam(value = "Additional data to pass to server") @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata, exchange); diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApiDelegate.java index b67d631122d1..271543eb960d 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -265,14 +265,14 @@ default Mono testEndpointParameters(BigDecimal number, * or Not found (status code 404) * @see FakeApi#testEnumParameters */ - default Mono testEnumParameters(List enumHeaderStringArray, - String enumHeaderString, - List enumQueryStringArray, - String enumQueryString, - Integer enumQueryInteger, - Double enumQueryDouble, - List enumFormStringArray, - String enumFormString, + default Mono testEnumParameters(List enumHeaderStringArray, + EnumHeaderStringEnum enumHeaderString, + List enumQueryStringArray, + EnumQueryStringEnum enumQueryString, + EnumQueryIntegerEnum enumQueryInteger, + EnumQueryDoubleEnum enumQueryDouble, + List enumFormStringArray, + EnumFormStringEnum enumFormString, ServerWebExchange exchange) { Mono result = Mono.empty(); exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 59e0c3b19e31..75e3de96ca12 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -61,7 +61,7 @@ default FakeClassnameTestApiDelegate getDelegate() { @ResponseStatus(HttpStatus.OK) default Mono testClassname( - @ApiParam(value = "client model", required = true) @Valid @RequestBody Mono client, + @ApiParam(value = "client model", required = true) @RequestBody Mono<@NotNull @Valid Client> client, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().testClassname(client, exchange); diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/PetApi.java index f8a351efc7ca..00286a374752 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/PetApi.java @@ -66,7 +66,7 @@ default PetApiDelegate getDelegate() { @ResponseStatus(HttpStatus.OK) default Mono addPet( - @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Mono pet, + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @RequestBody Mono<@NotNull @Valid Pet> pet, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().addPet(pet, exchange); @@ -105,7 +105,7 @@ default Mono addPet( @ResponseStatus(HttpStatus.OK) default Mono deletePet( - @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") @NotNull Long petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey, @ApiIgnore final ServerWebExchange exchange ) { @@ -127,7 +127,7 @@ default Mono deletePet( nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, - responseContainer = "List", + responseContainer = "array", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @@ -136,7 +136,7 @@ default Mono deletePet( } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "array"), @ApiResponse(code = 400, message = "Invalid status value") }) @RequestMapping( @@ -147,7 +147,7 @@ default Mono deletePet( @ResponseStatus(HttpStatus.OK) default Flux findPetsByStatus( - @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status, + @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @RequestParam(value = "status") @NotNull List status, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().findPetsByStatus(status, exchange); @@ -170,7 +170,7 @@ default Flux findPetsByStatus( nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, - responseContainer = "Set", + responseContainer = "set", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @@ -179,7 +179,7 @@ default Flux findPetsByStatus( } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "Set"), + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "set"), @ApiResponse(code = 400, message = "Invalid tag value") }) @RequestMapping( @@ -190,7 +190,7 @@ default Flux findPetsByStatus( @ResponseStatus(HttpStatus.OK) default Flux findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags, + @ApiParam(value = "Tags to filter by", required = true) @RequestParam(value = "tags") @NotNull Set tags, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().findPetsByTags(tags, exchange); @@ -229,7 +229,7 @@ default Flux findPetsByTags( @ResponseStatus(HttpStatus.OK) default Mono getPetById( - @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") @NotNull Long petId, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().getPetById(petId, exchange); @@ -272,7 +272,7 @@ default Mono getPetById( @ResponseStatus(HttpStatus.OK) default Mono updatePet( - @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Mono pet, + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @RequestBody Mono<@NotNull @Valid Pet> pet, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().updatePet(pet, exchange); @@ -311,9 +311,9 @@ default Mono updatePet( @ResponseStatus(HttpStatus.METHOD_NOT_ALLOWED) default Mono updatePetWithForm( - @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, - @ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, - @ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status, + @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") @NotNull Long petId, + @ApiParam(value = "Updated name of the pet") @RequestPart(value = "name", required = false) String name, + @ApiParam(value = "Updated status of the pet") @RequestPart(value = "status", required = false) String status, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().updatePetWithForm(petId, name, status, exchange); @@ -354,8 +354,8 @@ default Mono updatePetWithForm( @ResponseStatus(HttpStatus.OK) default Mono uploadFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, - @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") @NotNull Long petId, + @ApiParam(value = "Additional data to pass to server") @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) Flux file, @ApiIgnore final ServerWebExchange exchange ) { diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/PetApiDelegate.java index 8aa04357f14c..0742121eb4d1 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -76,7 +76,7 @@ default Mono deletePet(Long petId, * or Invalid status value (status code 400) * @see PetApi#findPetsByStatus */ - default Flux findPetsByStatus(List status, + default Flux findPetsByStatus(List status, ServerWebExchange exchange) { Mono result = Mono.empty(); exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/StoreApi.java index 065c5a5afb53..ea60655643af 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/StoreApi.java @@ -58,7 +58,7 @@ default StoreApiDelegate getDelegate() { @ResponseStatus(HttpStatus.BAD_REQUEST) default Mono deleteOrder( - @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId, + @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") @NotNull String orderId, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().deleteOrder(orderId, exchange); @@ -77,13 +77,13 @@ default Mono deleteOrder( nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, - responseContainer = "Map", + responseContainer = "map", authorizations = { @Authorization(value = "api_key") } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "map") }) @RequestMapping( method = RequestMethod.GET, @@ -128,7 +128,7 @@ default Mono> getInventory( @ResponseStatus(HttpStatus.OK) default Mono getOrderById( - @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId, + @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") @NotNull @Min(1L) @Max(5L) Long orderId, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().getOrderById(orderId, exchange); @@ -163,7 +163,7 @@ default Mono getOrderById( @ResponseStatus(HttpStatus.OK) default Mono placeOrder( - @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Mono order, + @ApiParam(value = "order placed for purchasing the pet", required = true) @RequestBody Mono<@NotNull @Valid Order> order, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().placeOrder(order, exchange); diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/UserApi.java index 37aafd8c4b1c..1d584d8e87e2 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/UserApi.java @@ -57,7 +57,7 @@ default UserApiDelegate getDelegate() { @ResponseStatus(HttpStatus.OK) default Mono createUser( - @ApiParam(value = "Created user object", required = true) @Valid @RequestBody Mono user, + @ApiParam(value = "Created user object", required = true) @RequestBody Mono<@NotNull @Valid User> user, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().createUser(user, exchange); @@ -88,7 +88,7 @@ default Mono createUser( @ResponseStatus(HttpStatus.OK) default Mono createUsersWithArrayInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody Flux user, + @ApiParam(value = "List of user object", required = true) @RequestBody Flux<@Valid User> user, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().createUsersWithArrayInput(user, exchange); @@ -119,7 +119,7 @@ default Mono createUsersWithArrayInput( @ResponseStatus(HttpStatus.OK) default Mono createUsersWithListInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody Flux user, + @ApiParam(value = "List of user object", required = true) @RequestBody Flux<@Valid User> user, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().createUsersWithListInput(user, exchange); @@ -151,7 +151,7 @@ default Mono createUsersWithListInput( @ResponseStatus(HttpStatus.BAD_REQUEST) default Mono deleteUser( - @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username, + @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") @NotNull String username, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().deleteUser(username, exchange); @@ -187,7 +187,7 @@ default Mono deleteUser( @ResponseStatus(HttpStatus.OK) default Mono getUserByName( - @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username, + @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") @NotNull String username, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().getUserByName(username, exchange); @@ -222,8 +222,8 @@ default Mono getUserByName( @ResponseStatus(HttpStatus.OK) default Mono loginUser( - @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, - @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password, + @ApiParam(value = "The user name for login", required = true) @RequestParam(value = "username") @NotNull String username, + @ApiParam(value = "The password for login in clear text", required = true) @RequestParam(value = "password") @NotNull String password, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().loginUser(username, password, exchange); @@ -285,8 +285,8 @@ default Mono logoutUser( @ResponseStatus(HttpStatus.BAD_REQUEST) default Mono updateUser( - @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, - @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody Mono user, + @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") @NotNull String username, + @ApiParam(value = "Updated user object", required = true) @RequestBody Mono<@NotNull @Valid User> user, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().updateUser(username, user, exchange); diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index cf57def58490..291e57234974 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -37,7 +37,6 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index dc535ab3e476..f3b2cfe986ca 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -38,7 +38,6 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -126,4 +125,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 4d4bef3fde91..79708a257b1e 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -37,7 +37,6 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 4b872401a006..c4e2810100bb 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -29,33 +29,25 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class AdditionalPropertiesClass { - @Valid private Map mapString = new HashMap<>(); - @Valid private Map mapNumber = new HashMap<>(); - @Valid private Map mapInteger = new HashMap<>(); - @Valid private Map mapBoolean = new HashMap<>(); - @Valid private Map> mapArrayInteger = new HashMap<>(); - @Valid private Map> mapArrayAnytype = new HashMap<>(); - @Valid private Map> mapMapString = new HashMap<>(); - @Valid private Map> mapMapAnytype = new HashMap<>(); private Object anytype1; - private JsonNullable anytype2 = JsonNullable.undefined(); + private JsonNullable anytype2 = JsonNullable.of(null); private Object anytype3; @@ -76,7 +68,6 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ - @ApiModelProperty(value = "") @JsonProperty("map_string") public Map getMapString() { @@ -104,7 +95,6 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("map_number") public Map getMapNumber() { @@ -132,7 +122,6 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ - @ApiModelProperty(value = "") @JsonProperty("map_integer") public Map getMapInteger() { @@ -160,7 +149,6 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ - @ApiModelProperty(value = "") @JsonProperty("map_boolean") public Map getMapBoolean() { @@ -188,7 +176,6 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { @@ -216,7 +203,6 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ - @Valid @ApiModelProperty(value = "") @JsonProperty("map_array_anytype") public Map> getMapArrayAnytype() { @@ -244,7 +230,6 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { @@ -272,7 +257,6 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { @@ -292,7 +276,6 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ - @ApiModelProperty(value = "") @JsonProperty("anytype_1") public Object getAnytype1() { @@ -303,8 +286,8 @@ public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; } - public AdditionalPropertiesClass anytype2(Object anytype2) { - this.anytype2 = JsonNullable.of(anytype2); + public AdditionalPropertiesClass anytype2(JsonNullable anytype2) { + this.anytype2 = anytype2; return this; } @@ -312,7 +295,6 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ - @ApiModelProperty(value = "") @JsonProperty("anytype_2") public JsonNullable getAnytype2() { @@ -332,7 +314,6 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ - @ApiModelProperty(value = "") @JsonProperty("anytype_3") public Object getAnytype3() { @@ -411,4 +392,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index e8e32dcd7fa9..f12948a1c898 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -37,7 +37,6 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 50fa525424d3..f31c0d0cd9b2 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -38,7 +38,6 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -126,4 +125,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index b2ca3bf5cb02..98e9b7b1a12a 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -38,7 +38,6 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -126,4 +125,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 7e085a44c93d..822b5e79b89f 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -37,7 +37,6 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Animal.java index 5d5fcd5dc18a..d9908d33fa2f 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Animal.java @@ -36,7 +36,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class Animal { - private String className; + private @NotNull String className; private String color = "red"; @@ -60,10 +60,9 @@ public Animal className(String className) { * Get className * @return className */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("className") - public String getClassName() { + public @NotNull String getClassName() { return className; } @@ -80,7 +79,6 @@ public Animal color(String color) { * Get color * @return color */ - @ApiModelProperty(value = "") @JsonProperty("color") public String getColor() { @@ -130,4 +128,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 621c01be49ce..249d0bc72466 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnly { - @Valid private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { @@ -46,7 +45,6 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("ArrayArrayNumber") public List> getArrayArrayNumber() { @@ -94,4 +92,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 3f519bbb9baa..58b3ee1a3bcf 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayOfNumberOnly { - @Valid private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnly arrayNumber(List arrayNumber) { @@ -46,7 +45,6 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("ArrayNumber") public List getArrayNumber() { @@ -94,4 +92,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ArrayTest.java index 382556e65bd6..20402ebb213f 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ArrayTest.java @@ -26,13 +26,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayTest { - @Valid private List arrayOfString = new ArrayList<>(); - @Valid private List> arrayArrayOfInteger = new ArrayList<>(); - @Valid private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTest arrayOfString(List arrayOfString) { @@ -52,7 +49,6 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ - @ApiModelProperty(value = "") @JsonProperty("array_of_string") public List getArrayOfString() { @@ -80,7 +76,6 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ - @Valid @ApiModelProperty(value = "") @JsonProperty("array_array_of_integer") public List> getArrayArrayOfInteger() { @@ -91,12 +86,12 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } - public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) { + public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { if (this.arrayArrayOfModel == null) { this.arrayArrayOfModel = new ArrayList<>(); } @@ -108,14 +103,13 @@ public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayO * Get arrayArrayOfModel * @return arrayArrayOfModel */ - @Valid @ApiModelProperty(value = "") @JsonProperty("array_array_of_model") public List> getArrayArrayOfModel() { return arrayArrayOfModel; } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { + public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } @@ -160,4 +154,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/BigCat.java index 4e7739fe3ab2..c9bbc0145339 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/BigCat.java @@ -67,7 +67,7 @@ public static KindEnum fromValue(String value) { } } - private KindEnum kind; + private String kind; public BigCat() { super(); @@ -89,10 +89,9 @@ public BigCat kind(KindEnum kind) { * Get kind * @return kind */ - @ApiModelProperty(value = "") @JsonProperty("kind") - public KindEnum getKind() { + public String getKind() { return kind; } @@ -154,4 +153,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Capitalization.java index d6e8a694cf85..f9226321c070 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Capitalization.java @@ -43,7 +43,6 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ - @ApiModelProperty(value = "") @JsonProperty("smallCamel") public String getSmallCamel() { @@ -63,7 +62,6 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ - @ApiModelProperty(value = "") @JsonProperty("CapitalCamel") public String getCapitalCamel() { @@ -83,7 +81,6 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ - @ApiModelProperty(value = "") @JsonProperty("small_Snake") public String getSmallSnake() { @@ -103,7 +100,6 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ - @ApiModelProperty(value = "") @JsonProperty("Capital_Snake") public String getCapitalSnake() { @@ -123,7 +119,6 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ - @ApiModelProperty(value = "") @JsonProperty("SCA_ETH_Flow_Points") public String getScAETHFlowPoints() { @@ -143,7 +138,6 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ - @ApiModelProperty(value = "Name of the pet ") @JsonProperty("ATT_NAME") public String getATTNAME() { @@ -201,4 +195,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Cat.java index d8932f6402ef..1bf1e602454d 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Cat.java @@ -57,7 +57,6 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ - @ApiModelProperty(value = "") @JsonProperty("declawed") public Boolean getDeclawed() { @@ -117,4 +116,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Category.java index a7d5b6e5916d..04e9b386ebbe 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Category.java @@ -24,7 +24,7 @@ public class Category { private Long id; - private String name = "default-name"; + private @NotNull String name = "default-name"; public Category() { super(); @@ -46,7 +46,6 @@ public Category id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -66,10 +65,9 @@ public Category name(String name) { * Get name * @return name */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -116,4 +114,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ChildWithNullable.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ChildWithNullable.java index 2609d3eb0201..4738e7f310b9 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ChildWithNullable.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ChildWithNullable.java @@ -41,7 +41,6 @@ public ChildWithNullable otherProperty(String otherProperty) { * Get otherProperty * @return otherProperty */ - @ApiModelProperty(value = "") @JsonProperty("otherProperty") public String getOtherProperty() { @@ -58,7 +57,7 @@ public ChildWithNullable type(TypeEnum type) { return this; } - public ChildWithNullable nullableProperty(String nullableProperty) { + public ChildWithNullable nullableProperty(JsonNullable nullableProperty) { super.nullableProperty(nullableProperty); return this; } @@ -112,4 +111,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ClassModel.java index 56aeaf340f38..508e179a1a9e 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ClassModel.java @@ -34,7 +34,6 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @ApiModelProperty(value = "") @JsonProperty("_class") public String getPropertyClass() { @@ -82,4 +81,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Client.java index 23491ea29e60..0463c48505d8 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Client.java @@ -33,7 +33,6 @@ public Client client(String client) { * Get client * @return client */ - @ApiModelProperty(value = "") @JsonProperty("client") public String getClient() { @@ -81,4 +80,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ContainerDefaultValue.java index c446f8d55e8a..33befb6282cb 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ContainerDefaultValue.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -27,17 +27,13 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ContainerDefaultValue { - @Valid - private JsonNullable> nullableArray = JsonNullable.>undefined(); + private JsonNullable> nullableArray = JsonNullable.undefined(); - @Valid - private JsonNullable> nullableRequiredArray = JsonNullable.>undefined(); + private JsonNullable> nullableRequiredArray = JsonNullable.undefined(); - @Valid - private List requiredArray = new ArrayList<>(); + private @NotNull List requiredArray = new ArrayList<>(); - @Valid - private JsonNullable> nullableArrayWithDefault = JsonNullable.>undefined(); + private JsonNullable> nullableArrayWithDefault = JsonNullable.of(new ArrayList<>(Arrays.asList("foo", "bar"))); public ContainerDefaultValue() { super(); @@ -46,13 +42,13 @@ public ContainerDefaultValue() { /** * Constructor with only required parameters */ - public ContainerDefaultValue(List nullableRequiredArray, List requiredArray) { - this.nullableRequiredArray = JsonNullable.of(nullableRequiredArray); + public ContainerDefaultValue(JsonNullable> nullableRequiredArray, List requiredArray) { + this.nullableRequiredArray = nullableRequiredArray; this.requiredArray = requiredArray; } - public ContainerDefaultValue nullableArray(List nullableArray) { - this.nullableArray = JsonNullable.of(nullableArray); + public ContainerDefaultValue nullableArray(JsonNullable> nullableArray) { + this.nullableArray = nullableArray; return this; } @@ -68,7 +64,6 @@ public ContainerDefaultValue addNullableArrayItem(String nullableArrayItem) { * Get nullableArray * @return nullableArray */ - @ApiModelProperty(value = "") @JsonProperty("nullable_array") public JsonNullable> getNullableArray() { @@ -79,8 +74,8 @@ public void setNullableArray(JsonNullable> nullableArray) { this.nullableArray = nullableArray; } - public ContainerDefaultValue nullableRequiredArray(List nullableRequiredArray) { - this.nullableRequiredArray = JsonNullable.of(nullableRequiredArray); + public ContainerDefaultValue nullableRequiredArray(JsonNullable> nullableRequiredArray) { + this.nullableRequiredArray = nullableRequiredArray; return this; } @@ -96,7 +91,6 @@ public ContainerDefaultValue addNullableRequiredArrayItem(String nullableRequire * Get nullableRequiredArray * @return nullableRequiredArray */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("nullable_required_array") public JsonNullable> getNullableRequiredArray() { @@ -124,10 +118,9 @@ public ContainerDefaultValue addRequiredArrayItem(String requiredArrayItem) { * Get requiredArray * @return requiredArray */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("required_array") - public List getRequiredArray() { + public @NotNull List getRequiredArray() { return requiredArray; } @@ -135,8 +128,8 @@ public void setRequiredArray(List requiredArray) { this.requiredArray = requiredArray; } - public ContainerDefaultValue nullableArrayWithDefault(List nullableArrayWithDefault) { - this.nullableArrayWithDefault = JsonNullable.of(nullableArrayWithDefault); + public ContainerDefaultValue nullableArrayWithDefault(JsonNullable> nullableArrayWithDefault) { + this.nullableArrayWithDefault = nullableArrayWithDefault; return this; } @@ -152,7 +145,6 @@ public ContainerDefaultValue addNullableArrayWithDefaultItem(String nullableArra * Get nullableArrayWithDefault * @return nullableArrayWithDefault */ - @ApiModelProperty(value = "") @JsonProperty("nullable_array_with_default") public JsonNullable> getNullableArrayWithDefault() { @@ -217,4 +209,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Dog.java index bef3e5409a8e..d4656db2ef88 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Dog.java @@ -49,7 +49,6 @@ public Dog breed(String breed) { * Get breed * @return breed */ - @ApiModelProperty(value = "") @JsonProperty("breed") public String getBreed() { @@ -109,4 +108,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/EnumArrays.java index 5bed35014d25..4a80b3b0ffe9 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/EnumArrays.java @@ -61,7 +61,7 @@ public static JustSymbolEnum fromValue(String value) { } } - private JustSymbolEnum justSymbol; + private String justSymbol; /** * Gets or Sets arrayEnum @@ -98,8 +98,7 @@ public static ArrayEnumEnum fromValue(String value) { } } - @Valid - private List arrayEnum = new ArrayList<>(); + private List arrayEnum = new ArrayList<>(); public EnumArrays justSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; @@ -110,10 +109,9 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ - @ApiModelProperty(value = "") @JsonProperty("just_symbol") - public JustSymbolEnum getJustSymbol() { + public String getJustSymbol() { return justSymbol; } @@ -138,10 +136,9 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ - @ApiModelProperty(value = "") @JsonProperty("array_enum") - public List getArrayEnum() { + public List getArrayEnum() { return arrayEnum; } @@ -188,4 +185,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/EnumTest.java index 2865d76ab8bf..8e3d8978857c 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/EnumTest.java @@ -63,7 +63,7 @@ public static EnumStringEnum fromValue(String value) { } } - private EnumStringEnum enumString; + private String enumString; /** * Gets or Sets enumStringRequired @@ -102,7 +102,7 @@ public static EnumStringRequiredEnum fromValue(String value) { } } - private EnumStringRequiredEnum enumStringRequired; + private @NotNull String enumStringRequired; /** * Gets or Sets enumInteger @@ -139,7 +139,7 @@ public static EnumIntegerEnum fromValue(Integer value) { } } - private EnumIntegerEnum enumInteger; + private Integer enumInteger; /** * Gets or Sets enumNumber @@ -176,7 +176,7 @@ public static EnumNumberEnum fromValue(Double value) { } } - private EnumNumberEnum enumNumber; + private Double enumNumber; private OuterEnum outerEnum; @@ -200,10 +200,9 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ - @ApiModelProperty(value = "") @JsonProperty("enum_string") - public EnumStringEnum getEnumString() { + public String getEnumString() { return enumString; } @@ -220,10 +219,9 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("enum_string_required") - public EnumStringRequiredEnum getEnumStringRequired() { + public @NotNull String getEnumStringRequired() { return enumStringRequired; } @@ -240,10 +238,9 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ - @ApiModelProperty(value = "") @JsonProperty("enum_integer") - public EnumIntegerEnum getEnumInteger() { + public Integer getEnumInteger() { return enumInteger; } @@ -260,10 +257,9 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ - @ApiModelProperty(value = "") @JsonProperty("enum_number") - public EnumNumberEnum getEnumNumber() { + public Double getEnumNumber() { return enumNumber; } @@ -280,7 +276,6 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ - @Valid @ApiModelProperty(value = "") @JsonProperty("outerEnum") public OuterEnum getOuterEnum() { @@ -336,4 +331,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/File.java index 6e16961c2d2f..cd9f95a6f91c 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/File.java @@ -34,7 +34,6 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ - @ApiModelProperty(value = "Test capitalization") @JsonProperty("sourceURI") public String getSourceURI() { @@ -82,4 +81,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 9a40dbd168af..0c2d51df5822 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -26,9 +26,8 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class FileSchemaTestClass { - private File file; + private @Valid File file; - @Valid private List<@Valid File> files = new ArrayList<>(); public FileSchemaTestClass file(File file) { @@ -40,10 +39,9 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ - @Valid @ApiModelProperty(value = "") @JsonProperty("file") - public File getFile() { + public @Valid File getFile() { return file; } @@ -51,7 +49,7 @@ public void setFile(File file) { this.file = file; } - public FileSchemaTestClass files(List<@Valid File> files) { + public FileSchemaTestClass files(List files) { this.files = files; return this; } @@ -68,14 +66,13 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ - @Valid @ApiModelProperty(value = "") @JsonProperty("files") public List<@Valid File> getFiles() { return files; } - public void setFiles(List<@Valid File> files) { + public void setFiles(List files) { this.files = files; } @@ -118,4 +115,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/FormatTest.java index fda969ad06d3..fa150f1fa069 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/FormatTest.java @@ -30,33 +30,33 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class FormatTest { - private Integer integer; + private @Min(10) @Max(100) Integer integer; - private Integer int32; + private @Min(20) @Max(200) Integer int32; private Long int64; - private BigDecimal number; + private @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal number; - private Float _float; + private @DecimalMin("54.3") @DecimalMax("987.6") Float _float; - private Double _double; + private @DecimalMin("67.8") @DecimalMax("123.4") Double _double; - private String string; + private @Pattern(regexp = "/[a-z]/i") String string; - private byte[] _byte; + private @NotNull byte[] _byte; private org.springframework.core.io.Resource binary; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) - private LocalDate date; + private @NotNull LocalDate date; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; private UUID uuid; - private String password; + private @NotNull @Size(min = 10, max = 64) String password; private BigDecimal bigDecimal; @@ -85,10 +85,9 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ - @Min(10) @Max(100) @ApiModelProperty(value = "") @JsonProperty("integer") - public Integer getInteger() { + public @Min(10) @Max(100) Integer getInteger() { return integer; } @@ -107,10 +106,9 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ - @Min(20) @Max(200) @ApiModelProperty(value = "") @JsonProperty("int32") - public Integer getInt32() { + public @Min(20) @Max(200) Integer getInt32() { return int32; } @@ -127,7 +125,6 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ - @ApiModelProperty(value = "") @JsonProperty("int64") public Long getInt64() { @@ -149,10 +146,9 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ - @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(required = true, value = "") @JsonProperty("number") - public BigDecimal getNumber() { + public @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal getNumber() { return number; } @@ -171,10 +167,9 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ - @DecimalMin("54.3") @DecimalMax("987.6") @ApiModelProperty(value = "") @JsonProperty("float") - public Float getFloat() { + public @DecimalMin("54.3") @DecimalMax("987.6") Float getFloat() { return _float; } @@ -193,10 +188,9 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ - @DecimalMin("67.8") @DecimalMax("123.4") @ApiModelProperty(value = "") @JsonProperty("double") - public Double getDouble() { + public @DecimalMin("67.8") @DecimalMax("123.4") Double getDouble() { return _double; } @@ -213,10 +207,9 @@ public FormatTest string(String string) { * Get string * @return string */ - @Pattern(regexp = "/[a-z]/i") @ApiModelProperty(value = "") @JsonProperty("string") - public String getString() { + public @Pattern(regexp = "/[a-z]/i") String getString() { return string; } @@ -233,10 +226,9 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("byte") - public byte[] getByte() { + public @NotNull byte[] getByte() { return _byte; } @@ -253,7 +245,6 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ - @Valid @ApiModelProperty(value = "") @JsonProperty("binary") public org.springframework.core.io.Resource getBinary() { @@ -273,10 +264,9 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ - @NotNull @Valid @ApiModelProperty(required = true, value = "") @JsonProperty("date") - public LocalDate getDate() { + public @NotNull LocalDate getDate() { return date; } @@ -293,7 +283,6 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ - @Valid @ApiModelProperty(value = "") @JsonProperty("dateTime") public OffsetDateTime getDateTime() { @@ -313,7 +302,6 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ - @Valid @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") @JsonProperty("uuid") public UUID getUuid() { @@ -333,10 +321,9 @@ public FormatTest password(String password) { * Get password * @return password */ - @NotNull @Size(min = 10, max = 64) @ApiModelProperty(required = true, value = "") @JsonProperty("password") - public String getPassword() { + public @NotNull @Size(min = 10, max = 64) String getPassword() { return password; } @@ -353,7 +340,6 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ - @Valid @ApiModelProperty(value = "") @JsonProperty("BigDecimal") public BigDecimal getBigDecimal() { @@ -427,4 +413,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 27ea04eaa86c..628772ab47fe 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -37,7 +37,6 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("bar") public String getBar() { @@ -57,7 +56,6 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("foo") public String getFoo() { @@ -107,4 +105,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/MapTest.java index bd3eea6e64df..a060e9d647a7 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/MapTest.java @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class MapTest { - @Valid private Map> mapMapOfString = new HashMap<>(); /** @@ -63,13 +62,10 @@ public static InnerEnum fromValue(String value) { } } - @Valid - private Map mapOfEnumString = new HashMap<>(); + private Map mapOfEnumString = new HashMap<>(); - @Valid private Map directMap = new HashMap<>(); - @Valid private Map indirectMap = new HashMap<>(); public MapTest mapMapOfString(Map> mapMapOfString) { @@ -89,7 +85,6 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ - @Valid @ApiModelProperty(value = "") @JsonProperty("map_map_of_string") public Map> getMapMapOfString() { @@ -117,10 +112,9 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ - @ApiModelProperty(value = "") @JsonProperty("map_of_enum_string") - public Map getMapOfEnumString() { + public Map getMapOfEnumString() { return mapOfEnumString; } @@ -145,7 +139,6 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ - @ApiModelProperty(value = "") @JsonProperty("direct_map") public Map getDirectMap() { @@ -173,7 +166,6 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ - @ApiModelProperty(value = "") @JsonProperty("indirect_map") public Map getIndirectMap() { @@ -227,4 +219,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index b16370183e0a..0ecca046c869 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -33,8 +33,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; - @Valid - private Map map = new HashMap<>(); + private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { this.uuid = uuid; @@ -45,7 +44,6 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ - @Valid @ApiModelProperty(value = "") @JsonProperty("uuid") public UUID getUuid() { @@ -65,7 +63,6 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ - @Valid @ApiModelProperty(value = "") @JsonProperty("dateTime") public OffsetDateTime getDateTime() { @@ -93,10 +90,9 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ - @Valid @ApiModelProperty(value = "") @JsonProperty("map") - public Map getMap() { + public Map getMap() { return map; } @@ -145,4 +141,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Model200Response.java index 4922749da22c..6f4b8460e6f4 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Model200Response.java @@ -38,7 +38,6 @@ public Model200Response name(Integer name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public Integer getName() { @@ -58,7 +57,6 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @ApiModelProperty(value = "") @JsonProperty("class") public String getPropertyClass() { @@ -108,4 +106,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ModelApiResponse.java index 21244266ad17..31642652231b 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -39,7 +39,6 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @ApiModelProperty(value = "") @JsonProperty("code") public Integer getCode() { @@ -59,7 +58,6 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @ApiModelProperty(value = "") @JsonProperty("type") public String getType() { @@ -79,7 +77,6 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @ApiModelProperty(value = "") @JsonProperty("message") public String getMessage() { @@ -131,4 +128,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ModelList.java index d3d66db5c095..b9dc65977c53 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ModelList.java @@ -35,7 +35,6 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ - @ApiModelProperty(value = "") @JsonProperty("123-list") public String get123list() { @@ -83,4 +82,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ModelReturn.java index 2c8a25a4d85f..72d78cb7fc0b 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ModelReturn.java @@ -36,7 +36,6 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ - @ApiModelProperty(value = "") @JsonProperty("return") public Integer getReturn() { @@ -84,4 +83,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Name.java index 420c565a9955..f42d379c1083 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Name.java @@ -23,7 +23,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class Name { - private Integer name; + private @NotNull Integer name; private Integer snakeCase; @@ -51,10 +51,9 @@ public Name name(Integer name) { * Get name * @return name */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("name") - public Integer getName() { + public @NotNull Integer getName() { return name; } @@ -71,7 +70,6 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("snake_case") public Integer getSnakeCase() { @@ -91,7 +89,6 @@ public Name property(String property) { * Get property * @return property */ - @ApiModelProperty(value = "") @JsonProperty("property") public String getProperty() { @@ -111,7 +108,6 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("123Number") public Integer get123number() { @@ -165,4 +161,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/NullableMapProperty.java index cc44c57fdd1a..8a5f0b99081e 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/NullableMapProperty.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -27,11 +27,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class NullableMapProperty { - @Valid - private JsonNullable> languageValues = JsonNullable.>undefined(); + private JsonNullable> languageValues = JsonNullable.undefined(); - public NullableMapProperty languageValues(Map languageValues) { - this.languageValues = JsonNullable.of(languageValues); + public NullableMapProperty languageValues(JsonNullable> languageValues) { + this.languageValues = languageValues; return this; } @@ -47,7 +46,6 @@ public NullableMapProperty putLanguageValuesItem(String key, String languageValu * Get languageValues * @return languageValues */ - @ApiModelProperty(value = "") @JsonProperty("languageValues") public JsonNullable> getLanguageValues() { @@ -106,4 +104,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/NumberOnly.java index 69de58b11374..eb57c97846a2 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/NumberOnly.java @@ -34,7 +34,6 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("JustNumber") public BigDecimal getJustNumber() { @@ -82,4 +81,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Order.java index 48932f68f862..6b84d7a0c4b4 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Order.java @@ -71,7 +71,7 @@ public static StatusEnum fromValue(String value) { } } - private StatusEnum status; + private String status; private Boolean complete = false; @@ -84,7 +84,6 @@ public Order id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -104,7 +103,6 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @ApiModelProperty(value = "") @JsonProperty("petId") public Long getPetId() { @@ -124,7 +122,6 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @ApiModelProperty(value = "") @JsonProperty("quantity") public Integer getQuantity() { @@ -144,7 +141,6 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Valid @ApiModelProperty(value = "") @JsonProperty("shipDate") public OffsetDateTime getShipDate() { @@ -164,10 +160,9 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @ApiModelProperty(value = "Order Status") @JsonProperty("status") - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -184,7 +179,6 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @ApiModelProperty(value = "") @JsonProperty("complete") public Boolean getComplete() { @@ -242,4 +236,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/OuterComposite.java index 2e78c0586cab..2bfc1db21bb2 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/OuterComposite.java @@ -38,7 +38,6 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("my_number") public BigDecimal getMyNumber() { @@ -58,7 +57,6 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ - @ApiModelProperty(value = "") @JsonProperty("my_string") public String getMyString() { @@ -78,7 +76,6 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ - @ApiModelProperty(value = "") @JsonProperty("my_boolean") public Boolean getMyBoolean() { @@ -130,4 +127,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ParentWithNullable.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ParentWithNullable.java index 893ed74ce711..94f35cbaf971 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ParentWithNullable.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ParentWithNullable.java @@ -71,9 +71,9 @@ public static TypeEnum fromValue(String value) { } } - private TypeEnum type; + private String type; - private JsonNullable nullableProperty = JsonNullable.undefined(); + private JsonNullable nullableProperty = JsonNullable.undefined(); public ParentWithNullable type(TypeEnum type) { this.type = type; @@ -84,10 +84,9 @@ public ParentWithNullable type(TypeEnum type) { * Get type * @return type */ - @ApiModelProperty(value = "") @JsonProperty("type") - public TypeEnum getType() { + public String getType() { return type; } @@ -95,8 +94,8 @@ public void setType(TypeEnum type) { this.type = type; } - public ParentWithNullable nullableProperty(String nullableProperty) { - this.nullableProperty = JsonNullable.of(nullableProperty); + public ParentWithNullable nullableProperty(JsonNullable nullableProperty) { + this.nullableProperty = nullableProperty; return this; } @@ -104,7 +103,6 @@ public ParentWithNullable nullableProperty(String nullableProperty) { * Get nullableProperty * @return nullableProperty */ - @ApiModelProperty(value = "") @JsonProperty("nullableProperty") public JsonNullable getNullableProperty() { @@ -165,4 +163,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Pet.java index 67242095aeba..3ac00f4958c1 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Pet.java @@ -33,14 +33,12 @@ public class Pet { private Long id; - private Category category; + private @Valid Category category; - private String name; + private @NotNull String name; - @Valid - private Set photoUrls = new LinkedHashSet<>(); + private @NotNull Set photoUrls = new LinkedHashSet<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** @@ -81,7 +79,7 @@ public static StatusEnum fromValue(String value) { } @Deprecated - private StatusEnum status; + private String status; public Pet() { super(); @@ -104,7 +102,6 @@ public Pet id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -124,10 +121,9 @@ public Pet category(Category category) { * Get category * @return category */ - @Valid @ApiModelProperty(value = "") @JsonProperty("category") - public Category getCategory() { + public @Valid Category getCategory() { return category; } @@ -144,10 +140,9 @@ public Pet name(String name) { * Get name * @return name */ - @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -172,10 +167,9 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("photoUrls") - public Set getPhotoUrls() { + public @NotNull Set getPhotoUrls() { return photoUrls; } @@ -184,7 +178,7 @@ public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List<@Valid Tag> tags) { + public Pet tags(List tags) { this.tags = tags; return this; } @@ -201,14 +195,13 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Valid @ApiModelProperty(value = "") @JsonProperty("tags") public List<@Valid Tag> getTags() { return tags; } - public void setTags(List<@Valid Tag> tags) { + public void setTags(List tags) { this.tags = tags; } @@ -222,11 +215,10 @@ public Pet status(StatusEnum status) { * @return status * @deprecated */ - @ApiModelProperty(value = "pet status in the store") @JsonProperty("status") @Deprecated - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -285,4 +277,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 9388f3cfd29f..1eee9577a877 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -35,7 +35,6 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("bar") public String getBar() { @@ -55,7 +54,6 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ - @ApiModelProperty(value = "") @JsonProperty("baz") public String getBaz() { @@ -105,4 +103,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java index 68785baf943e..fc1f3861dbc7 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java @@ -39,7 +39,6 @@ public ResponseObjectWithDifferentFieldNames normalPropertyName(String normalPro * Get normalPropertyName * @return normalPropertyName */ - @ApiModelProperty(value = "") @JsonProperty("normalPropertyName") public String getNormalPropertyName() { @@ -59,7 +58,6 @@ public ResponseObjectWithDifferentFieldNames UPPER_CASE_PROPERTY_SNAKE(String UP * Get UPPER_CASE_PROPERTY_SNAKE * @return UPPER_CASE_PROPERTY_SNAKE */ - @ApiModelProperty(value = "") @JsonProperty("UPPER_CASE_PROPERTY_SNAKE") public String getUPPERCASEPROPERTYSNAKE() { @@ -79,7 +77,6 @@ public ResponseObjectWithDifferentFieldNames lowerCasePropertyDashes(String lowe * Get lowerCasePropertyDashes * @return lowerCasePropertyDashes */ - @ApiModelProperty(value = "") @JsonProperty("lower-case-property-dashes") public String getLowerCasePropertyDashes() { @@ -99,7 +96,6 @@ public ResponseObjectWithDifferentFieldNames propertyNameWithSpaces(String prope * Get propertyNameWithSpaces * @return propertyNameWithSpaces */ - @ApiModelProperty(value = "") @JsonProperty("property name with spaces") public String getPropertyNameWithSpaces() { @@ -153,4 +149,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/SpecialModelName.java index 7f751ef4aedc..ca744d5efe00 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/SpecialModelName.java @@ -35,7 +35,6 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ - @ApiModelProperty(value = "") @JsonProperty("$special[property.name]") public Long get$SpecialPropertyName() { @@ -83,4 +82,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Tag.java index 850c68911db4..d3778890e2d6 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Tag.java @@ -35,7 +35,6 @@ public Tag id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -55,7 +54,6 @@ public Tag name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -105,4 +103,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderDefault.java index 420967a01328..d5ce2f773c46 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -26,16 +26,15 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class TypeHolderDefault { - private String stringItem = "what"; + private @NotNull String stringItem = "what"; - private BigDecimal numberItem = new BigDecimal("1.234"); + private @NotNull BigDecimal numberItem = new BigDecimal("1.234"); - private Integer integerItem = -2; + private @NotNull Integer integerItem = -2; - private Boolean boolItem = true; + private @NotNull Boolean boolItem = true; - @Valid - private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); + private @NotNull List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); public TypeHolderDefault() { super(); @@ -61,10 +60,9 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("string_item") - public String getStringItem() { + public @NotNull String getStringItem() { return stringItem; } @@ -81,10 +79,9 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @NotNull @Valid @ApiModelProperty(required = true, value = "") @JsonProperty("number_item") - public BigDecimal getNumberItem() { + public @NotNull BigDecimal getNumberItem() { return numberItem; } @@ -101,10 +98,9 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("integer_item") - public Integer getIntegerItem() { + public @NotNull Integer getIntegerItem() { return integerItem; } @@ -121,10 +117,9 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("bool_item") - public Boolean getBoolItem() { + public @NotNull Boolean getBoolItem() { return boolItem; } @@ -149,10 +144,9 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("array_item") - public List getArrayItem() { + public @NotNull List getArrayItem() { return arrayItem; } @@ -205,4 +199,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderExample.java index 909dc1e7fe60..e9b3492a4684 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -26,18 +26,17 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class TypeHolderExample { - private String stringItem; + private @NotNull String stringItem; - private BigDecimal numberItem; + private @NotNull BigDecimal numberItem; - private Float floatItem; + private @NotNull Float floatItem; - private Integer integerItem; + private @NotNull Integer integerItem; - private Boolean boolItem; + private @NotNull Boolean boolItem; - @Valid - private List arrayItem = new ArrayList<>(); + private @NotNull List arrayItem = new ArrayList<>(); public TypeHolderExample() { super(); @@ -64,10 +63,9 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @NotNull @ApiModelProperty(example = "what", required = true, value = "") @JsonProperty("string_item") - public String getStringItem() { + public @NotNull String getStringItem() { return stringItem; } @@ -84,10 +82,9 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @NotNull @Valid @ApiModelProperty(example = "1.234", required = true, value = "") @JsonProperty("number_item") - public BigDecimal getNumberItem() { + public @NotNull BigDecimal getNumberItem() { return numberItem; } @@ -104,10 +101,9 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ - @NotNull @ApiModelProperty(example = "1.234", required = true, value = "") @JsonProperty("float_item") - public Float getFloatItem() { + public @NotNull Float getFloatItem() { return floatItem; } @@ -124,10 +120,9 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @NotNull @ApiModelProperty(example = "-2", required = true, value = "") @JsonProperty("integer_item") - public Integer getIntegerItem() { + public @NotNull Integer getIntegerItem() { return integerItem; } @@ -144,10 +139,9 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @NotNull @ApiModelProperty(example = "true", required = true, value = "") @JsonProperty("bool_item") - public Boolean getBoolItem() { + public @NotNull Boolean getBoolItem() { return boolItem; } @@ -172,10 +166,9 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @NotNull @ApiModelProperty(example = "[0,1,2,3]", required = true, value = "") @JsonProperty("array_item") - public List getArrayItem() { + public @NotNull List getArrayItem() { return arrayItem; } @@ -230,4 +223,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/User.java index e46b4e9e7907..2a1878ded5d2 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/User.java @@ -47,7 +47,6 @@ public User id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -67,7 +66,6 @@ public User username(String username) { * Get username * @return username */ - @ApiModelProperty(value = "") @JsonProperty("username") public String getUsername() { @@ -87,7 +85,6 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @ApiModelProperty(value = "") @JsonProperty("firstName") public String getFirstName() { @@ -107,7 +104,6 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @ApiModelProperty(value = "") @JsonProperty("lastName") public String getLastName() { @@ -127,7 +123,6 @@ public User email(String email) { * Get email * @return email */ - @ApiModelProperty(value = "") @JsonProperty("email") public String getEmail() { @@ -147,7 +142,6 @@ public User password(String password) { * Get password * @return password */ - @ApiModelProperty(value = "") @JsonProperty("password") public String getPassword() { @@ -167,7 +161,6 @@ public User phone(String phone) { * Get phone * @return phone */ - @ApiModelProperty(value = "") @JsonProperty("phone") public String getPhone() { @@ -187,7 +180,6 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @ApiModelProperty(value = "User Status") @JsonProperty("userStatus") public Integer getUserStatus() { @@ -249,4 +241,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/XmlItem.java index b7a622a0b99e..2e676eb62e75 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/XmlItem.java @@ -34,7 +34,6 @@ public class XmlItem { private Boolean attributeBoolean; - @Valid private List wrappedArray = new ArrayList<>(); private String nameString; @@ -45,10 +44,8 @@ public class XmlItem { private Boolean nameBoolean; - @Valid private List nameArray = new ArrayList<>(); - @Valid private List nameWrappedArray = new ArrayList<>(); private String prefixString; @@ -59,10 +56,8 @@ public class XmlItem { private Boolean prefixBoolean; - @Valid private List prefixArray = new ArrayList<>(); - @Valid private List prefixWrappedArray = new ArrayList<>(); private String namespaceString; @@ -73,10 +68,8 @@ public class XmlItem { private Boolean namespaceBoolean; - @Valid private List namespaceArray = new ArrayList<>(); - @Valid private List namespaceWrappedArray = new ArrayList<>(); private String prefixNsString; @@ -87,10 +80,8 @@ public class XmlItem { private Boolean prefixNsBoolean; - @Valid private List prefixNsArray = new ArrayList<>(); - @Valid private List prefixNsWrappedArray = new ArrayList<>(); public XmlItem attributeString(String attributeString) { @@ -102,7 +93,6 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("attribute_string") public String getAttributeString() { @@ -122,7 +112,6 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("attribute_number") public BigDecimal getAttributeNumber() { @@ -142,7 +131,6 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("attribute_integer") public Integer getAttributeInteger() { @@ -162,7 +150,6 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("attribute_boolean") public Boolean getAttributeBoolean() { @@ -190,7 +177,6 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("wrapped_array") public List getWrappedArray() { @@ -210,7 +196,6 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("name_string") public String getNameString() { @@ -230,7 +215,6 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("name_number") public BigDecimal getNameNumber() { @@ -250,7 +234,6 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("name_integer") public Integer getNameInteger() { @@ -270,7 +253,6 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("name_boolean") public Boolean getNameBoolean() { @@ -298,7 +280,6 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ - @ApiModelProperty(value = "") @JsonProperty("name_array") public List getNameArray() { @@ -326,7 +307,6 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("name_wrapped_array") public List getNameWrappedArray() { @@ -346,7 +326,6 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("prefix_string") public String getPrefixString() { @@ -366,7 +345,6 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("prefix_number") public BigDecimal getPrefixNumber() { @@ -386,7 +364,6 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_integer") public Integer getPrefixInteger() { @@ -406,7 +383,6 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("prefix_boolean") public Boolean getPrefixBoolean() { @@ -434,7 +410,6 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_array") public List getPrefixArray() { @@ -462,7 +437,6 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_wrapped_array") public List getPrefixWrappedArray() { @@ -482,7 +456,6 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("namespace_string") public String getNamespaceString() { @@ -502,7 +475,6 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("namespace_number") public BigDecimal getNamespaceNumber() { @@ -522,7 +494,6 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { @@ -542,7 +513,6 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("namespace_boolean") public Boolean getNamespaceBoolean() { @@ -570,7 +540,6 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ - @ApiModelProperty(value = "") @JsonProperty("namespace_array") public List getNamespaceArray() { @@ -598,7 +567,6 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("namespace_wrapped_array") public List getNamespaceWrappedArray() { @@ -618,7 +586,6 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("prefix_ns_string") public String getPrefixNsString() { @@ -638,7 +605,6 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("prefix_ns_number") public BigDecimal getPrefixNsNumber() { @@ -658,7 +624,6 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { @@ -678,7 +643,6 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("prefix_ns_boolean") public Boolean getPrefixNsBoolean() { @@ -706,7 +670,6 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_ns_array") public List getPrefixNsArray() { @@ -734,7 +697,6 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_ns_wrapped_array") public List getPrefixNsWrappedArray() { @@ -838,4 +800,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java index 83bb7ac371ec..7515e64def9a 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -57,7 +57,7 @@ default AnotherFakeApiDelegate getDelegate() { ) default Mono> call123testSpecialTags( - @ApiParam(value = "client model", required = true) @Valid @RequestBody Mono client, + @ApiParam(value = "client model", required = true) @RequestBody Mono<@NotNull @Valid Client> client, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().call123testSpecialTags(client, exchange); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java index 0153f5efc9a4..648926cbed96 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java @@ -67,7 +67,7 @@ default FakeApiDelegate getDelegate() { ) default Mono> createXmlItem( - @ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody Mono xmlItem, + @ApiParam(value = "XmlItem Body", required = true) @RequestBody Mono<@NotNull @Valid XmlItem> xmlItem, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().createXmlItem(xmlItem, exchange); @@ -99,7 +99,7 @@ default Mono> createXmlItem( ) default Mono> fakeOuterBooleanSerialize( - @ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Mono body, + @ApiParam(value = "Input boolean as post body") @RequestBody(required = false) Mono body, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().fakeOuterBooleanSerialize(body, exchange); @@ -131,7 +131,7 @@ default Mono> fakeOuterBooleanSerialize( ) default Mono> fakeOuterCompositeSerialize( - @ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) Mono outerComposite, + @ApiParam(value = "Input composite as post body") @RequestBody(required = false) Mono<@Valid OuterComposite> outerComposite, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().fakeOuterCompositeSerialize(outerComposite, exchange); @@ -163,7 +163,7 @@ default Mono> fakeOuterCompositeSerialize( ) default Mono> fakeOuterNumberSerialize( - @ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) Mono body, + @ApiParam(value = "Input number as post body") @RequestBody(required = false) Mono body, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().fakeOuterNumberSerialize(body, exchange); @@ -195,7 +195,7 @@ default Mono> fakeOuterNumberSerialize( ) default Mono> fakeOuterStringSerialize( - @ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) Mono body, + @ApiParam(value = "Input string as post body") @RequestBody(required = false) Mono body, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().fakeOuterStringSerialize(body, exchange); @@ -225,7 +225,7 @@ default Mono> fakeOuterStringSerialize( ) default Mono> responseObjectDifferentNames( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") @NotNull Long petId, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().responseObjectDifferentNames(petId, exchange); @@ -255,7 +255,7 @@ default Mono> responseObje ) default Mono> testBodyWithFileSchema( - @ApiParam(value = "", required = true) @Valid @RequestBody Mono fileSchemaTestClass, + @ApiParam(value = "", required = true) @RequestBody Mono<@NotNull @Valid FileSchemaTestClass> fileSchemaTestClass, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().testBodyWithFileSchema(fileSchemaTestClass, exchange); @@ -285,8 +285,8 @@ default Mono> testBodyWithFileSchema( ) default Mono> testBodyWithQueryParams( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, - @ApiParam(value = "", required = true) @Valid @RequestBody Mono user, + @ApiParam(value = "", required = true) @RequestParam(value = "query") @NotNull String query, + @ApiParam(value = "", required = true) @RequestBody Mono<@NotNull @Valid User> user, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().testBodyWithQueryParams(query, user, exchange); @@ -318,7 +318,7 @@ default Mono> testBodyWithQueryParams( ) default Mono> testClientModel( - @ApiParam(value = "client model", required = true) @Valid @RequestBody Mono client, + @ApiParam(value = "client model", required = true) @RequestBody Mono<@NotNull @Valid Client> client, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().testClientModel(client, exchange); @@ -366,20 +366,20 @@ default Mono> testClientModel( ) default Mono> testEndpointParameters( - @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, - @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, - @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, - @ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, - @ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, - @ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, - @ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, - @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, - @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, + @ApiParam(value = "None", required = true) @RequestPart(value = "number") @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal number, + @ApiParam(value = "None", required = true) @RequestPart(value = "double") @NotNull @DecimalMin("67.8") @DecimalMax("123.4") Double _double, + @ApiParam(value = "None", required = true) @RequestPart(value = "pattern_without_delimiter") @NotNull @Pattern(regexp = "^[A-Z].*") String patternWithoutDelimiter, + @ApiParam(value = "None", required = true) @RequestPart(value = "byte") @NotNull byte[] _byte, + @ApiParam(value = "None") @RequestPart(value = "integer", required = false) @Min(10) @Max(100) Integer integer, + @ApiParam(value = "None") @RequestPart(value = "int32", required = false) @Min(20) @Max(200) Integer int32, + @ApiParam(value = "None") @RequestPart(value = "int64", required = false) Long int64, + @ApiParam(value = "None") @RequestPart(value = "float", required = false) @DecimalMax("987.6") Float _float, + @ApiParam(value = "None") @RequestPart(value = "string", required = false) @Pattern(regexp = "/[a-z]/i") String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) Flux binary, - @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, - @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, - @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback, + @ApiParam(value = "None") @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @RequestPart(value = "password", required = false) @Size(min = 10, max = 64) String password, + @ApiParam(value = "None") @RequestPart(value = "callback", required = false) String paramCallback, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback, exchange); @@ -418,14 +418,14 @@ default Mono> testEndpointParameters( ) default Mono> testEnumParameters( - @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, - @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, - @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, - @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, - @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString, + @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestPart(value = "enum_form_string", required = false) String enumFormString, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, exchange); @@ -459,12 +459,12 @@ default Mono> testEnumParameters( ) default Mono> testGroupParameters( - @NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @ApiParam(value = "Required String in group parameters", required = true) @RequestParam(value = "required_string_group") @NotNull Integer requiredStringGroup, @NotNull @ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, - @NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, - @ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup, + @ApiParam(value = "Required Integer in group parameters", required = true) @RequestParam(value = "required_int64_group") @NotNull Long requiredInt64Group, + @ApiParam(value = "String in group parameters") @RequestParam(value = "string_group", required = false) Integer stringGroup, @ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup, - @ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group, + @ApiParam(value = "Integer in group parameters") @RequestParam(value = "int64_group", required = false) Long int64Group, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, exchange); @@ -494,7 +494,7 @@ default Mono> testGroupParameters( ) default Mono> testInlineAdditionalProperties( - @ApiParam(value = "request body", required = true) @Valid @RequestBody Mono> requestBody, + @ApiParam(value = "request body", required = true) @RequestBody Mono<@NotNull Map> requestBody, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().testInlineAdditionalProperties(requestBody, exchange); @@ -525,8 +525,8 @@ default Mono> testInlineAdditionalProperties( ) default Mono> testJsonFormData( - @ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, - @ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2, + @ApiParam(value = "field1", required = true) @RequestPart(value = "param") @NotNull String param, + @ApiParam(value = "field2", required = true) @RequestPart(value = "param2") @NotNull String param2, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().testJsonFormData(param, param2, exchange); @@ -556,7 +556,7 @@ default Mono> testJsonFormData( ) default Mono> testNullable( - @ApiParam(value = "request body", required = true) @Valid @RequestBody Mono childWithNullable, + @ApiParam(value = "request body", required = true) @RequestBody Mono<@NotNull @Valid ChildWithNullable> childWithNullable, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().testNullable(childWithNullable, exchange); @@ -588,10 +588,10 @@ default Mono> testNullable( ) default Mono> testQueryParameterCollectionFormat( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context, + @ApiParam(value = "", required = true) @RequestParam(value = "pipe") @NotNull List pipe, + @ApiParam(value = "", required = true) @RequestParam(value = "http") @NotNull List http, + @ApiParam(value = "", required = true) @RequestParam(value = "url") @NotNull List url, + @ApiParam(value = "", required = true) @RequestParam(value = "context") @NotNull List context, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().testQueryParameterCollectionFormat(pipe, http, url, context, exchange); @@ -660,9 +660,9 @@ default Mono> testWithResultExample( ) default Mono> uploadFileWithRequiredFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, - @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) Flux requiredFile, - @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") @NotNull Long petId, + @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile") Flux requiredFile, + @ApiParam(value = "Additional data to pass to server") @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata, exchange); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java index 31388d847a70..8de2bd51622e 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -266,14 +266,14 @@ default Mono> testEndpointParameters(BigDecimal number, * or Not found (status code 404) * @see FakeApi#testEnumParameters */ - default Mono> testEnumParameters(List enumHeaderStringArray, - String enumHeaderString, - List enumQueryStringArray, - String enumQueryString, - Integer enumQueryInteger, - Double enumQueryDouble, - List enumFormStringArray, - String enumFormString, + default Mono> testEnumParameters(List enumHeaderStringArray, + EnumHeaderStringEnum enumHeaderString, + List enumQueryStringArray, + EnumQueryStringEnum enumQueryString, + EnumQueryIntegerEnum enumQueryInteger, + EnumQueryDoubleEnum enumQueryDouble, + List enumFormStringArray, + EnumFormStringEnum enumFormString, ServerWebExchange exchange) { Mono result = Mono.empty(); exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 96221343e694..5a5632a4c5f0 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -60,7 +60,7 @@ default FakeClassnameTestApiDelegate getDelegate() { ) default Mono> testClassname( - @ApiParam(value = "client model", required = true) @Valid @RequestBody Mono client, + @ApiParam(value = "client model", required = true) @RequestBody Mono<@NotNull @Valid Client> client, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().testClassname(client, exchange); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java index 338caf0ed551..a8c816b91bfd 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java @@ -65,7 +65,7 @@ default PetApiDelegate getDelegate() { ) default Mono> addPet( - @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Mono pet, + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @RequestBody Mono<@NotNull @Valid Pet> pet, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().addPet(pet, exchange); @@ -103,7 +103,7 @@ default Mono> addPet( ) default Mono> deletePet( - @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") @NotNull Long petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey, @ApiIgnore final ServerWebExchange exchange ) { @@ -125,7 +125,7 @@ default Mono> deletePet( nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, - responseContainer = "List", + responseContainer = "array", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @@ -134,7 +134,7 @@ default Mono> deletePet( } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "array"), @ApiResponse(code = 400, message = "Invalid status value") }) @RequestMapping( @@ -144,7 +144,7 @@ default Mono> deletePet( ) default Mono>> findPetsByStatus( - @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status, + @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @RequestParam(value = "status") @NotNull List status, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().findPetsByStatus(status, exchange); @@ -167,7 +167,7 @@ default Mono>> findPetsByStatus( nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, - responseContainer = "Set", + responseContainer = "set", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @@ -176,7 +176,7 @@ default Mono>> findPetsByStatus( } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "Set"), + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "set"), @ApiResponse(code = 400, message = "Invalid tag value") }) @RequestMapping( @@ -186,7 +186,7 @@ default Mono>> findPetsByStatus( ) default Mono>> findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags, + @ApiParam(value = "Tags to filter by", required = true) @RequestParam(value = "tags") @NotNull Set tags, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().findPetsByTags(tags, exchange); @@ -224,7 +224,7 @@ default Mono>> findPetsByTags( ) default Mono> getPetById( - @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") @NotNull Long petId, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().getPetById(petId, exchange); @@ -266,7 +266,7 @@ default Mono> getPetById( ) default Mono> updatePet( - @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Mono pet, + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @RequestBody Mono<@NotNull @Valid Pet> pet, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().updatePet(pet, exchange); @@ -304,9 +304,9 @@ default Mono> updatePet( ) default Mono> updatePetWithForm( - @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, - @ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, - @ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status, + @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") @NotNull Long petId, + @ApiParam(value = "Updated name of the pet") @RequestPart(value = "name", required = false) String name, + @ApiParam(value = "Updated status of the pet") @RequestPart(value = "status", required = false) String status, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().updatePetWithForm(petId, name, status, exchange); @@ -346,8 +346,8 @@ default Mono> updatePetWithForm( ) default Mono> uploadFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, - @ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") @NotNull Long petId, + @ApiParam(value = "Additional data to pass to server") @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) Flux file, @ApiIgnore final ServerWebExchange exchange ) { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java index 453af5bc3cf7..a6c937b1b929 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -77,7 +77,7 @@ default Mono> deletePet(Long petId, * or Invalid status value (status code 400) * @see PetApi#findPetsByStatus */ - default Mono>> findPetsByStatus(List status, + default Mono>> findPetsByStatus(List status, ServerWebExchange exchange) { Mono result = Mono.empty(); exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java index dc8a42401fe4..1cea86502672 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java @@ -57,7 +57,7 @@ default StoreApiDelegate getDelegate() { ) default Mono> deleteOrder( - @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId, + @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") @NotNull String orderId, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().deleteOrder(orderId, exchange); @@ -76,13 +76,13 @@ default Mono> deleteOrder( nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, - responseContainer = "Map", + responseContainer = "map", authorizations = { @Authorization(value = "api_key") } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "map") }) @RequestMapping( method = RequestMethod.GET, @@ -125,7 +125,7 @@ default Mono>> getInventory( ) default Mono> getOrderById( - @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId, + @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") @NotNull @Min(1L) @Max(5L) Long orderId, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().getOrderById(orderId, exchange); @@ -159,7 +159,7 @@ default Mono> getOrderById( ) default Mono> placeOrder( - @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Mono order, + @ApiParam(value = "order placed for purchasing the pet", required = true) @RequestBody Mono<@NotNull @Valid Order> order, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().placeOrder(order, exchange); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java index 38edded49f0d..3180b16f15aa 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java @@ -56,7 +56,7 @@ default UserApiDelegate getDelegate() { ) default Mono> createUser( - @ApiParam(value = "Created user object", required = true) @Valid @RequestBody Mono user, + @ApiParam(value = "Created user object", required = true) @RequestBody Mono<@NotNull @Valid User> user, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().createUser(user, exchange); @@ -86,7 +86,7 @@ default Mono> createUser( ) default Mono> createUsersWithArrayInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody Flux user, + @ApiParam(value = "List of user object", required = true) @RequestBody Flux<@Valid User> user, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().createUsersWithArrayInput(user, exchange); @@ -116,7 +116,7 @@ default Mono> createUsersWithArrayInput( ) default Mono> createUsersWithListInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody Flux user, + @ApiParam(value = "List of user object", required = true) @RequestBody Flux<@Valid User> user, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().createUsersWithListInput(user, exchange); @@ -147,7 +147,7 @@ default Mono> createUsersWithListInput( ) default Mono> deleteUser( - @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username, + @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") @NotNull String username, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().deleteUser(username, exchange); @@ -182,7 +182,7 @@ default Mono> deleteUser( ) default Mono> getUserByName( - @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username, + @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") @NotNull String username, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().getUserByName(username, exchange); @@ -216,8 +216,8 @@ default Mono> getUserByName( ) default Mono> loginUser( - @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, - @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password, + @ApiParam(value = "The user name for login", required = true) @RequestParam(value = "username") @NotNull String username, + @ApiParam(value = "The password for login in clear text", required = true) @RequestParam(value = "password") @NotNull String password, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().loginUser(username, password, exchange); @@ -277,8 +277,8 @@ default Mono> logoutUser( ) default Mono> updateUser( - @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, - @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody Mono user, + @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") @NotNull String username, + @ApiParam(value = "Updated user object", required = true) @RequestBody Mono<@NotNull @Valid User> user, @ApiIgnore final ServerWebExchange exchange ) { return getDelegate().updateUser(username, user, exchange); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index cf57def58490..291e57234974 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -37,7 +37,6 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index dc535ab3e476..f3b2cfe986ca 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -38,7 +38,6 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -126,4 +125,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 4d4bef3fde91..79708a257b1e 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -37,7 +37,6 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 4b872401a006..c4e2810100bb 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -29,33 +29,25 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class AdditionalPropertiesClass { - @Valid private Map mapString = new HashMap<>(); - @Valid private Map mapNumber = new HashMap<>(); - @Valid private Map mapInteger = new HashMap<>(); - @Valid private Map mapBoolean = new HashMap<>(); - @Valid private Map> mapArrayInteger = new HashMap<>(); - @Valid private Map> mapArrayAnytype = new HashMap<>(); - @Valid private Map> mapMapString = new HashMap<>(); - @Valid private Map> mapMapAnytype = new HashMap<>(); private Object anytype1; - private JsonNullable anytype2 = JsonNullable.undefined(); + private JsonNullable anytype2 = JsonNullable.of(null); private Object anytype3; @@ -76,7 +68,6 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ - @ApiModelProperty(value = "") @JsonProperty("map_string") public Map getMapString() { @@ -104,7 +95,6 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("map_number") public Map getMapNumber() { @@ -132,7 +122,6 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ - @ApiModelProperty(value = "") @JsonProperty("map_integer") public Map getMapInteger() { @@ -160,7 +149,6 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ - @ApiModelProperty(value = "") @JsonProperty("map_boolean") public Map getMapBoolean() { @@ -188,7 +176,6 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { @@ -216,7 +203,6 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ - @Valid @ApiModelProperty(value = "") @JsonProperty("map_array_anytype") public Map> getMapArrayAnytype() { @@ -244,7 +230,6 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { @@ -272,7 +257,6 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { @@ -292,7 +276,6 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ - @ApiModelProperty(value = "") @JsonProperty("anytype_1") public Object getAnytype1() { @@ -303,8 +286,8 @@ public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; } - public AdditionalPropertiesClass anytype2(Object anytype2) { - this.anytype2 = JsonNullable.of(anytype2); + public AdditionalPropertiesClass anytype2(JsonNullable anytype2) { + this.anytype2 = anytype2; return this; } @@ -312,7 +295,6 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ - @ApiModelProperty(value = "") @JsonProperty("anytype_2") public JsonNullable getAnytype2() { @@ -332,7 +314,6 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ - @ApiModelProperty(value = "") @JsonProperty("anytype_3") public Object getAnytype3() { @@ -411,4 +392,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index e8e32dcd7fa9..f12948a1c898 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -37,7 +37,6 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 50fa525424d3..f31c0d0cd9b2 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -38,7 +38,6 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -126,4 +125,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index b2ca3bf5cb02..98e9b7b1a12a 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -38,7 +38,6 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -126,4 +125,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 7e085a44c93d..822b5e79b89f 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -37,7 +37,6 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java index 5d5fcd5dc18a..d9908d33fa2f 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java @@ -36,7 +36,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class Animal { - private String className; + private @NotNull String className; private String color = "red"; @@ -60,10 +60,9 @@ public Animal className(String className) { * Get className * @return className */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("className") - public String getClassName() { + public @NotNull String getClassName() { return className; } @@ -80,7 +79,6 @@ public Animal color(String color) { * Get color * @return color */ - @ApiModelProperty(value = "") @JsonProperty("color") public String getColor() { @@ -130,4 +128,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 621c01be49ce..249d0bc72466 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnly { - @Valid private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { @@ -46,7 +45,6 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("ArrayArrayNumber") public List> getArrayArrayNumber() { @@ -94,4 +92,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 3f519bbb9baa..58b3ee1a3bcf 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayOfNumberOnly { - @Valid private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnly arrayNumber(List arrayNumber) { @@ -46,7 +45,6 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("ArrayNumber") public List getArrayNumber() { @@ -94,4 +92,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayTest.java index 382556e65bd6..20402ebb213f 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayTest.java @@ -26,13 +26,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayTest { - @Valid private List arrayOfString = new ArrayList<>(); - @Valid private List> arrayArrayOfInteger = new ArrayList<>(); - @Valid private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTest arrayOfString(List arrayOfString) { @@ -52,7 +49,6 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ - @ApiModelProperty(value = "") @JsonProperty("array_of_string") public List getArrayOfString() { @@ -80,7 +76,6 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ - @Valid @ApiModelProperty(value = "") @JsonProperty("array_array_of_integer") public List> getArrayArrayOfInteger() { @@ -91,12 +86,12 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } - public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) { + public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { if (this.arrayArrayOfModel == null) { this.arrayArrayOfModel = new ArrayList<>(); } @@ -108,14 +103,13 @@ public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayO * Get arrayArrayOfModel * @return arrayArrayOfModel */ - @Valid @ApiModelProperty(value = "") @JsonProperty("array_array_of_model") public List> getArrayArrayOfModel() { return arrayArrayOfModel; } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { + public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } @@ -160,4 +154,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java index 4e7739fe3ab2..c9bbc0145339 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java @@ -67,7 +67,7 @@ public static KindEnum fromValue(String value) { } } - private KindEnum kind; + private String kind; public BigCat() { super(); @@ -89,10 +89,9 @@ public BigCat kind(KindEnum kind) { * Get kind * @return kind */ - @ApiModelProperty(value = "") @JsonProperty("kind") - public KindEnum getKind() { + public String getKind() { return kind; } @@ -154,4 +153,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Capitalization.java index d6e8a694cf85..f9226321c070 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Capitalization.java @@ -43,7 +43,6 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ - @ApiModelProperty(value = "") @JsonProperty("smallCamel") public String getSmallCamel() { @@ -63,7 +62,6 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ - @ApiModelProperty(value = "") @JsonProperty("CapitalCamel") public String getCapitalCamel() { @@ -83,7 +81,6 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ - @ApiModelProperty(value = "") @JsonProperty("small_Snake") public String getSmallSnake() { @@ -103,7 +100,6 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ - @ApiModelProperty(value = "") @JsonProperty("Capital_Snake") public String getCapitalSnake() { @@ -123,7 +119,6 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ - @ApiModelProperty(value = "") @JsonProperty("SCA_ETH_Flow_Points") public String getScAETHFlowPoints() { @@ -143,7 +138,6 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ - @ApiModelProperty(value = "Name of the pet ") @JsonProperty("ATT_NAME") public String getATTNAME() { @@ -201,4 +195,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Cat.java index d8932f6402ef..1bf1e602454d 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Cat.java @@ -57,7 +57,6 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ - @ApiModelProperty(value = "") @JsonProperty("declawed") public Boolean getDeclawed() { @@ -117,4 +116,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Category.java index a7d5b6e5916d..04e9b386ebbe 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Category.java @@ -24,7 +24,7 @@ public class Category { private Long id; - private String name = "default-name"; + private @NotNull String name = "default-name"; public Category() { super(); @@ -46,7 +46,6 @@ public Category id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -66,10 +65,9 @@ public Category name(String name) { * Get name * @return name */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -116,4 +114,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ChildWithNullable.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ChildWithNullable.java index 2609d3eb0201..4738e7f310b9 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ChildWithNullable.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ChildWithNullable.java @@ -41,7 +41,6 @@ public ChildWithNullable otherProperty(String otherProperty) { * Get otherProperty * @return otherProperty */ - @ApiModelProperty(value = "") @JsonProperty("otherProperty") public String getOtherProperty() { @@ -58,7 +57,7 @@ public ChildWithNullable type(TypeEnum type) { return this; } - public ChildWithNullable nullableProperty(String nullableProperty) { + public ChildWithNullable nullableProperty(JsonNullable nullableProperty) { super.nullableProperty(nullableProperty); return this; } @@ -112,4 +111,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ClassModel.java index 56aeaf340f38..508e179a1a9e 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ClassModel.java @@ -34,7 +34,6 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @ApiModelProperty(value = "") @JsonProperty("_class") public String getPropertyClass() { @@ -82,4 +81,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Client.java index 23491ea29e60..0463c48505d8 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Client.java @@ -33,7 +33,6 @@ public Client client(String client) { * Get client * @return client */ - @ApiModelProperty(value = "") @JsonProperty("client") public String getClient() { @@ -81,4 +80,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ContainerDefaultValue.java index c446f8d55e8a..33befb6282cb 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ContainerDefaultValue.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -27,17 +27,13 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ContainerDefaultValue { - @Valid - private JsonNullable> nullableArray = JsonNullable.>undefined(); + private JsonNullable> nullableArray = JsonNullable.undefined(); - @Valid - private JsonNullable> nullableRequiredArray = JsonNullable.>undefined(); + private JsonNullable> nullableRequiredArray = JsonNullable.undefined(); - @Valid - private List requiredArray = new ArrayList<>(); + private @NotNull List requiredArray = new ArrayList<>(); - @Valid - private JsonNullable> nullableArrayWithDefault = JsonNullable.>undefined(); + private JsonNullable> nullableArrayWithDefault = JsonNullable.of(new ArrayList<>(Arrays.asList("foo", "bar"))); public ContainerDefaultValue() { super(); @@ -46,13 +42,13 @@ public ContainerDefaultValue() { /** * Constructor with only required parameters */ - public ContainerDefaultValue(List nullableRequiredArray, List requiredArray) { - this.nullableRequiredArray = JsonNullable.of(nullableRequiredArray); + public ContainerDefaultValue(JsonNullable> nullableRequiredArray, List requiredArray) { + this.nullableRequiredArray = nullableRequiredArray; this.requiredArray = requiredArray; } - public ContainerDefaultValue nullableArray(List nullableArray) { - this.nullableArray = JsonNullable.of(nullableArray); + public ContainerDefaultValue nullableArray(JsonNullable> nullableArray) { + this.nullableArray = nullableArray; return this; } @@ -68,7 +64,6 @@ public ContainerDefaultValue addNullableArrayItem(String nullableArrayItem) { * Get nullableArray * @return nullableArray */ - @ApiModelProperty(value = "") @JsonProperty("nullable_array") public JsonNullable> getNullableArray() { @@ -79,8 +74,8 @@ public void setNullableArray(JsonNullable> nullableArray) { this.nullableArray = nullableArray; } - public ContainerDefaultValue nullableRequiredArray(List nullableRequiredArray) { - this.nullableRequiredArray = JsonNullable.of(nullableRequiredArray); + public ContainerDefaultValue nullableRequiredArray(JsonNullable> nullableRequiredArray) { + this.nullableRequiredArray = nullableRequiredArray; return this; } @@ -96,7 +91,6 @@ public ContainerDefaultValue addNullableRequiredArrayItem(String nullableRequire * Get nullableRequiredArray * @return nullableRequiredArray */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("nullable_required_array") public JsonNullable> getNullableRequiredArray() { @@ -124,10 +118,9 @@ public ContainerDefaultValue addRequiredArrayItem(String requiredArrayItem) { * Get requiredArray * @return requiredArray */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("required_array") - public List getRequiredArray() { + public @NotNull List getRequiredArray() { return requiredArray; } @@ -135,8 +128,8 @@ public void setRequiredArray(List requiredArray) { this.requiredArray = requiredArray; } - public ContainerDefaultValue nullableArrayWithDefault(List nullableArrayWithDefault) { - this.nullableArrayWithDefault = JsonNullable.of(nullableArrayWithDefault); + public ContainerDefaultValue nullableArrayWithDefault(JsonNullable> nullableArrayWithDefault) { + this.nullableArrayWithDefault = nullableArrayWithDefault; return this; } @@ -152,7 +145,6 @@ public ContainerDefaultValue addNullableArrayWithDefaultItem(String nullableArra * Get nullableArrayWithDefault * @return nullableArrayWithDefault */ - @ApiModelProperty(value = "") @JsonProperty("nullable_array_with_default") public JsonNullable> getNullableArrayWithDefault() { @@ -217,4 +209,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Dog.java index bef3e5409a8e..d4656db2ef88 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Dog.java @@ -49,7 +49,6 @@ public Dog breed(String breed) { * Get breed * @return breed */ - @ApiModelProperty(value = "") @JsonProperty("breed") public String getBreed() { @@ -109,4 +108,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java index 5bed35014d25..4a80b3b0ffe9 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java @@ -61,7 +61,7 @@ public static JustSymbolEnum fromValue(String value) { } } - private JustSymbolEnum justSymbol; + private String justSymbol; /** * Gets or Sets arrayEnum @@ -98,8 +98,7 @@ public static ArrayEnumEnum fromValue(String value) { } } - @Valid - private List arrayEnum = new ArrayList<>(); + private List arrayEnum = new ArrayList<>(); public EnumArrays justSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; @@ -110,10 +109,9 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ - @ApiModelProperty(value = "") @JsonProperty("just_symbol") - public JustSymbolEnum getJustSymbol() { + public String getJustSymbol() { return justSymbol; } @@ -138,10 +136,9 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ - @ApiModelProperty(value = "") @JsonProperty("array_enum") - public List getArrayEnum() { + public List getArrayEnum() { return arrayEnum; } @@ -188,4 +185,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java index 2865d76ab8bf..8e3d8978857c 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java @@ -63,7 +63,7 @@ public static EnumStringEnum fromValue(String value) { } } - private EnumStringEnum enumString; + private String enumString; /** * Gets or Sets enumStringRequired @@ -102,7 +102,7 @@ public static EnumStringRequiredEnum fromValue(String value) { } } - private EnumStringRequiredEnum enumStringRequired; + private @NotNull String enumStringRequired; /** * Gets or Sets enumInteger @@ -139,7 +139,7 @@ public static EnumIntegerEnum fromValue(Integer value) { } } - private EnumIntegerEnum enumInteger; + private Integer enumInteger; /** * Gets or Sets enumNumber @@ -176,7 +176,7 @@ public static EnumNumberEnum fromValue(Double value) { } } - private EnumNumberEnum enumNumber; + private Double enumNumber; private OuterEnum outerEnum; @@ -200,10 +200,9 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ - @ApiModelProperty(value = "") @JsonProperty("enum_string") - public EnumStringEnum getEnumString() { + public String getEnumString() { return enumString; } @@ -220,10 +219,9 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("enum_string_required") - public EnumStringRequiredEnum getEnumStringRequired() { + public @NotNull String getEnumStringRequired() { return enumStringRequired; } @@ -240,10 +238,9 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ - @ApiModelProperty(value = "") @JsonProperty("enum_integer") - public EnumIntegerEnum getEnumInteger() { + public Integer getEnumInteger() { return enumInteger; } @@ -260,10 +257,9 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ - @ApiModelProperty(value = "") @JsonProperty("enum_number") - public EnumNumberEnum getEnumNumber() { + public Double getEnumNumber() { return enumNumber; } @@ -280,7 +276,6 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ - @Valid @ApiModelProperty(value = "") @JsonProperty("outerEnum") public OuterEnum getOuterEnum() { @@ -336,4 +331,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/File.java index 6e16961c2d2f..cd9f95a6f91c 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/File.java @@ -34,7 +34,6 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ - @ApiModelProperty(value = "Test capitalization") @JsonProperty("sourceURI") public String getSourceURI() { @@ -82,4 +81,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 9a40dbd168af..0c2d51df5822 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -26,9 +26,8 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class FileSchemaTestClass { - private File file; + private @Valid File file; - @Valid private List<@Valid File> files = new ArrayList<>(); public FileSchemaTestClass file(File file) { @@ -40,10 +39,9 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ - @Valid @ApiModelProperty(value = "") @JsonProperty("file") - public File getFile() { + public @Valid File getFile() { return file; } @@ -51,7 +49,7 @@ public void setFile(File file) { this.file = file; } - public FileSchemaTestClass files(List<@Valid File> files) { + public FileSchemaTestClass files(List files) { this.files = files; return this; } @@ -68,14 +66,13 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ - @Valid @ApiModelProperty(value = "") @JsonProperty("files") public List<@Valid File> getFiles() { return files; } - public void setFiles(List<@Valid File> files) { + public void setFiles(List files) { this.files = files; } @@ -118,4 +115,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java index fda969ad06d3..fa150f1fa069 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java @@ -30,33 +30,33 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class FormatTest { - private Integer integer; + private @Min(10) @Max(100) Integer integer; - private Integer int32; + private @Min(20) @Max(200) Integer int32; private Long int64; - private BigDecimal number; + private @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal number; - private Float _float; + private @DecimalMin("54.3") @DecimalMax("987.6") Float _float; - private Double _double; + private @DecimalMin("67.8") @DecimalMax("123.4") Double _double; - private String string; + private @Pattern(regexp = "/[a-z]/i") String string; - private byte[] _byte; + private @NotNull byte[] _byte; private org.springframework.core.io.Resource binary; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) - private LocalDate date; + private @NotNull LocalDate date; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; private UUID uuid; - private String password; + private @NotNull @Size(min = 10, max = 64) String password; private BigDecimal bigDecimal; @@ -85,10 +85,9 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ - @Min(10) @Max(100) @ApiModelProperty(value = "") @JsonProperty("integer") - public Integer getInteger() { + public @Min(10) @Max(100) Integer getInteger() { return integer; } @@ -107,10 +106,9 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ - @Min(20) @Max(200) @ApiModelProperty(value = "") @JsonProperty("int32") - public Integer getInt32() { + public @Min(20) @Max(200) Integer getInt32() { return int32; } @@ -127,7 +125,6 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ - @ApiModelProperty(value = "") @JsonProperty("int64") public Long getInt64() { @@ -149,10 +146,9 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ - @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(required = true, value = "") @JsonProperty("number") - public BigDecimal getNumber() { + public @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal getNumber() { return number; } @@ -171,10 +167,9 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ - @DecimalMin("54.3") @DecimalMax("987.6") @ApiModelProperty(value = "") @JsonProperty("float") - public Float getFloat() { + public @DecimalMin("54.3") @DecimalMax("987.6") Float getFloat() { return _float; } @@ -193,10 +188,9 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ - @DecimalMin("67.8") @DecimalMax("123.4") @ApiModelProperty(value = "") @JsonProperty("double") - public Double getDouble() { + public @DecimalMin("67.8") @DecimalMax("123.4") Double getDouble() { return _double; } @@ -213,10 +207,9 @@ public FormatTest string(String string) { * Get string * @return string */ - @Pattern(regexp = "/[a-z]/i") @ApiModelProperty(value = "") @JsonProperty("string") - public String getString() { + public @Pattern(regexp = "/[a-z]/i") String getString() { return string; } @@ -233,10 +226,9 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("byte") - public byte[] getByte() { + public @NotNull byte[] getByte() { return _byte; } @@ -253,7 +245,6 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ - @Valid @ApiModelProperty(value = "") @JsonProperty("binary") public org.springframework.core.io.Resource getBinary() { @@ -273,10 +264,9 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ - @NotNull @Valid @ApiModelProperty(required = true, value = "") @JsonProperty("date") - public LocalDate getDate() { + public @NotNull LocalDate getDate() { return date; } @@ -293,7 +283,6 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ - @Valid @ApiModelProperty(value = "") @JsonProperty("dateTime") public OffsetDateTime getDateTime() { @@ -313,7 +302,6 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ - @Valid @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") @JsonProperty("uuid") public UUID getUuid() { @@ -333,10 +321,9 @@ public FormatTest password(String password) { * Get password * @return password */ - @NotNull @Size(min = 10, max = 64) @ApiModelProperty(required = true, value = "") @JsonProperty("password") - public String getPassword() { + public @NotNull @Size(min = 10, max = 64) String getPassword() { return password; } @@ -353,7 +340,6 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ - @Valid @ApiModelProperty(value = "") @JsonProperty("BigDecimal") public BigDecimal getBigDecimal() { @@ -427,4 +413,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 27ea04eaa86c..628772ab47fe 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -37,7 +37,6 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("bar") public String getBar() { @@ -57,7 +56,6 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("foo") public String getFoo() { @@ -107,4 +105,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java index bd3eea6e64df..a060e9d647a7 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class MapTest { - @Valid private Map> mapMapOfString = new HashMap<>(); /** @@ -63,13 +62,10 @@ public static InnerEnum fromValue(String value) { } } - @Valid - private Map mapOfEnumString = new HashMap<>(); + private Map mapOfEnumString = new HashMap<>(); - @Valid private Map directMap = new HashMap<>(); - @Valid private Map indirectMap = new HashMap<>(); public MapTest mapMapOfString(Map> mapMapOfString) { @@ -89,7 +85,6 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ - @Valid @ApiModelProperty(value = "") @JsonProperty("map_map_of_string") public Map> getMapMapOfString() { @@ -117,10 +112,9 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ - @ApiModelProperty(value = "") @JsonProperty("map_of_enum_string") - public Map getMapOfEnumString() { + public Map getMapOfEnumString() { return mapOfEnumString; } @@ -145,7 +139,6 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ - @ApiModelProperty(value = "") @JsonProperty("direct_map") public Map getDirectMap() { @@ -173,7 +166,6 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ - @ApiModelProperty(value = "") @JsonProperty("indirect_map") public Map getIndirectMap() { @@ -227,4 +219,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index b16370183e0a..0ecca046c869 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -33,8 +33,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; - @Valid - private Map map = new HashMap<>(); + private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { this.uuid = uuid; @@ -45,7 +44,6 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ - @Valid @ApiModelProperty(value = "") @JsonProperty("uuid") public UUID getUuid() { @@ -65,7 +63,6 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ - @Valid @ApiModelProperty(value = "") @JsonProperty("dateTime") public OffsetDateTime getDateTime() { @@ -93,10 +90,9 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ - @Valid @ApiModelProperty(value = "") @JsonProperty("map") - public Map getMap() { + public Map getMap() { return map; } @@ -145,4 +141,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Model200Response.java index 4922749da22c..6f4b8460e6f4 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Model200Response.java @@ -38,7 +38,6 @@ public Model200Response name(Integer name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public Integer getName() { @@ -58,7 +57,6 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @ApiModelProperty(value = "") @JsonProperty("class") public String getPropertyClass() { @@ -108,4 +106,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelApiResponse.java index 21244266ad17..31642652231b 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -39,7 +39,6 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @ApiModelProperty(value = "") @JsonProperty("code") public Integer getCode() { @@ -59,7 +58,6 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @ApiModelProperty(value = "") @JsonProperty("type") public String getType() { @@ -79,7 +77,6 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @ApiModelProperty(value = "") @JsonProperty("message") public String getMessage() { @@ -131,4 +128,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelList.java index d3d66db5c095..b9dc65977c53 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelList.java @@ -35,7 +35,6 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ - @ApiModelProperty(value = "") @JsonProperty("123-list") public String get123list() { @@ -83,4 +82,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelReturn.java index 2c8a25a4d85f..72d78cb7fc0b 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelReturn.java @@ -36,7 +36,6 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ - @ApiModelProperty(value = "") @JsonProperty("return") public Integer getReturn() { @@ -84,4 +83,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Name.java index 420c565a9955..f42d379c1083 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Name.java @@ -23,7 +23,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class Name { - private Integer name; + private @NotNull Integer name; private Integer snakeCase; @@ -51,10 +51,9 @@ public Name name(Integer name) { * Get name * @return name */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("name") - public Integer getName() { + public @NotNull Integer getName() { return name; } @@ -71,7 +70,6 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("snake_case") public Integer getSnakeCase() { @@ -91,7 +89,6 @@ public Name property(String property) { * Get property * @return property */ - @ApiModelProperty(value = "") @JsonProperty("property") public String getProperty() { @@ -111,7 +108,6 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("123Number") public Integer get123number() { @@ -165,4 +161,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NullableMapProperty.java index cc44c57fdd1a..8a5f0b99081e 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NullableMapProperty.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -27,11 +27,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class NullableMapProperty { - @Valid - private JsonNullable> languageValues = JsonNullable.>undefined(); + private JsonNullable> languageValues = JsonNullable.undefined(); - public NullableMapProperty languageValues(Map languageValues) { - this.languageValues = JsonNullable.of(languageValues); + public NullableMapProperty languageValues(JsonNullable> languageValues) { + this.languageValues = languageValues; return this; } @@ -47,7 +46,6 @@ public NullableMapProperty putLanguageValuesItem(String key, String languageValu * Get languageValues * @return languageValues */ - @ApiModelProperty(value = "") @JsonProperty("languageValues") public JsonNullable> getLanguageValues() { @@ -106,4 +104,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NumberOnly.java index 69de58b11374..eb57c97846a2 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NumberOnly.java @@ -34,7 +34,6 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("JustNumber") public BigDecimal getJustNumber() { @@ -82,4 +81,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java index 48932f68f862..6b84d7a0c4b4 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java @@ -71,7 +71,7 @@ public static StatusEnum fromValue(String value) { } } - private StatusEnum status; + private String status; private Boolean complete = false; @@ -84,7 +84,6 @@ public Order id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -104,7 +103,6 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @ApiModelProperty(value = "") @JsonProperty("petId") public Long getPetId() { @@ -124,7 +122,6 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @ApiModelProperty(value = "") @JsonProperty("quantity") public Integer getQuantity() { @@ -144,7 +141,6 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Valid @ApiModelProperty(value = "") @JsonProperty("shipDate") public OffsetDateTime getShipDate() { @@ -164,10 +160,9 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @ApiModelProperty(value = "Order Status") @JsonProperty("status") - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -184,7 +179,6 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @ApiModelProperty(value = "") @JsonProperty("complete") public Boolean getComplete() { @@ -242,4 +236,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterComposite.java index 2e78c0586cab..2bfc1db21bb2 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterComposite.java @@ -38,7 +38,6 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("my_number") public BigDecimal getMyNumber() { @@ -58,7 +57,6 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ - @ApiModelProperty(value = "") @JsonProperty("my_string") public String getMyString() { @@ -78,7 +76,6 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ - @ApiModelProperty(value = "") @JsonProperty("my_boolean") public Boolean getMyBoolean() { @@ -130,4 +127,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ParentWithNullable.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ParentWithNullable.java index 893ed74ce711..94f35cbaf971 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ParentWithNullable.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ParentWithNullable.java @@ -71,9 +71,9 @@ public static TypeEnum fromValue(String value) { } } - private TypeEnum type; + private String type; - private JsonNullable nullableProperty = JsonNullable.undefined(); + private JsonNullable nullableProperty = JsonNullable.undefined(); public ParentWithNullable type(TypeEnum type) { this.type = type; @@ -84,10 +84,9 @@ public ParentWithNullable type(TypeEnum type) { * Get type * @return type */ - @ApiModelProperty(value = "") @JsonProperty("type") - public TypeEnum getType() { + public String getType() { return type; } @@ -95,8 +94,8 @@ public void setType(TypeEnum type) { this.type = type; } - public ParentWithNullable nullableProperty(String nullableProperty) { - this.nullableProperty = JsonNullable.of(nullableProperty); + public ParentWithNullable nullableProperty(JsonNullable nullableProperty) { + this.nullableProperty = nullableProperty; return this; } @@ -104,7 +103,6 @@ public ParentWithNullable nullableProperty(String nullableProperty) { * Get nullableProperty * @return nullableProperty */ - @ApiModelProperty(value = "") @JsonProperty("nullableProperty") public JsonNullable getNullableProperty() { @@ -165,4 +163,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java index 67242095aeba..3ac00f4958c1 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java @@ -33,14 +33,12 @@ public class Pet { private Long id; - private Category category; + private @Valid Category category; - private String name; + private @NotNull String name; - @Valid - private Set photoUrls = new LinkedHashSet<>(); + private @NotNull Set photoUrls = new LinkedHashSet<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** @@ -81,7 +79,7 @@ public static StatusEnum fromValue(String value) { } @Deprecated - private StatusEnum status; + private String status; public Pet() { super(); @@ -104,7 +102,6 @@ public Pet id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -124,10 +121,9 @@ public Pet category(Category category) { * Get category * @return category */ - @Valid @ApiModelProperty(value = "") @JsonProperty("category") - public Category getCategory() { + public @Valid Category getCategory() { return category; } @@ -144,10 +140,9 @@ public Pet name(String name) { * Get name * @return name */ - @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -172,10 +167,9 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("photoUrls") - public Set getPhotoUrls() { + public @NotNull Set getPhotoUrls() { return photoUrls; } @@ -184,7 +178,7 @@ public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List<@Valid Tag> tags) { + public Pet tags(List tags) { this.tags = tags; return this; } @@ -201,14 +195,13 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Valid @ApiModelProperty(value = "") @JsonProperty("tags") public List<@Valid Tag> getTags() { return tags; } - public void setTags(List<@Valid Tag> tags) { + public void setTags(List tags) { this.tags = tags; } @@ -222,11 +215,10 @@ public Pet status(StatusEnum status) { * @return status * @deprecated */ - @ApiModelProperty(value = "pet status in the store") @JsonProperty("status") @Deprecated - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -285,4 +277,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 9388f3cfd29f..1eee9577a877 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -35,7 +35,6 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("bar") public String getBar() { @@ -55,7 +54,6 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ - @ApiModelProperty(value = "") @JsonProperty("baz") public String getBaz() { @@ -105,4 +103,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java index 68785baf943e..fc1f3861dbc7 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java @@ -39,7 +39,6 @@ public ResponseObjectWithDifferentFieldNames normalPropertyName(String normalPro * Get normalPropertyName * @return normalPropertyName */ - @ApiModelProperty(value = "") @JsonProperty("normalPropertyName") public String getNormalPropertyName() { @@ -59,7 +58,6 @@ public ResponseObjectWithDifferentFieldNames UPPER_CASE_PROPERTY_SNAKE(String UP * Get UPPER_CASE_PROPERTY_SNAKE * @return UPPER_CASE_PROPERTY_SNAKE */ - @ApiModelProperty(value = "") @JsonProperty("UPPER_CASE_PROPERTY_SNAKE") public String getUPPERCASEPROPERTYSNAKE() { @@ -79,7 +77,6 @@ public ResponseObjectWithDifferentFieldNames lowerCasePropertyDashes(String lowe * Get lowerCasePropertyDashes * @return lowerCasePropertyDashes */ - @ApiModelProperty(value = "") @JsonProperty("lower-case-property-dashes") public String getLowerCasePropertyDashes() { @@ -99,7 +96,6 @@ public ResponseObjectWithDifferentFieldNames propertyNameWithSpaces(String prope * Get propertyNameWithSpaces * @return propertyNameWithSpaces */ - @ApiModelProperty(value = "") @JsonProperty("property name with spaces") public String getPropertyNameWithSpaces() { @@ -153,4 +149,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/SpecialModelName.java index 7f751ef4aedc..ca744d5efe00 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/SpecialModelName.java @@ -35,7 +35,6 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ - @ApiModelProperty(value = "") @JsonProperty("$special[property.name]") public Long get$SpecialPropertyName() { @@ -83,4 +82,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Tag.java index 850c68911db4..d3778890e2d6 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Tag.java @@ -35,7 +35,6 @@ public Tag id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -55,7 +54,6 @@ public Tag name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -105,4 +103,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java index 420967a01328..d5ce2f773c46 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -26,16 +26,15 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class TypeHolderDefault { - private String stringItem = "what"; + private @NotNull String stringItem = "what"; - private BigDecimal numberItem = new BigDecimal("1.234"); + private @NotNull BigDecimal numberItem = new BigDecimal("1.234"); - private Integer integerItem = -2; + private @NotNull Integer integerItem = -2; - private Boolean boolItem = true; + private @NotNull Boolean boolItem = true; - @Valid - private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); + private @NotNull List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); public TypeHolderDefault() { super(); @@ -61,10 +60,9 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("string_item") - public String getStringItem() { + public @NotNull String getStringItem() { return stringItem; } @@ -81,10 +79,9 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @NotNull @Valid @ApiModelProperty(required = true, value = "") @JsonProperty("number_item") - public BigDecimal getNumberItem() { + public @NotNull BigDecimal getNumberItem() { return numberItem; } @@ -101,10 +98,9 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("integer_item") - public Integer getIntegerItem() { + public @NotNull Integer getIntegerItem() { return integerItem; } @@ -121,10 +117,9 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("bool_item") - public Boolean getBoolItem() { + public @NotNull Boolean getBoolItem() { return boolItem; } @@ -149,10 +144,9 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("array_item") - public List getArrayItem() { + public @NotNull List getArrayItem() { return arrayItem; } @@ -205,4 +199,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java index 909dc1e7fe60..e9b3492a4684 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -26,18 +26,17 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class TypeHolderExample { - private String stringItem; + private @NotNull String stringItem; - private BigDecimal numberItem; + private @NotNull BigDecimal numberItem; - private Float floatItem; + private @NotNull Float floatItem; - private Integer integerItem; + private @NotNull Integer integerItem; - private Boolean boolItem; + private @NotNull Boolean boolItem; - @Valid - private List arrayItem = new ArrayList<>(); + private @NotNull List arrayItem = new ArrayList<>(); public TypeHolderExample() { super(); @@ -64,10 +63,9 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @NotNull @ApiModelProperty(example = "what", required = true, value = "") @JsonProperty("string_item") - public String getStringItem() { + public @NotNull String getStringItem() { return stringItem; } @@ -84,10 +82,9 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @NotNull @Valid @ApiModelProperty(example = "1.234", required = true, value = "") @JsonProperty("number_item") - public BigDecimal getNumberItem() { + public @NotNull BigDecimal getNumberItem() { return numberItem; } @@ -104,10 +101,9 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ - @NotNull @ApiModelProperty(example = "1.234", required = true, value = "") @JsonProperty("float_item") - public Float getFloatItem() { + public @NotNull Float getFloatItem() { return floatItem; } @@ -124,10 +120,9 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @NotNull @ApiModelProperty(example = "-2", required = true, value = "") @JsonProperty("integer_item") - public Integer getIntegerItem() { + public @NotNull Integer getIntegerItem() { return integerItem; } @@ -144,10 +139,9 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @NotNull @ApiModelProperty(example = "true", required = true, value = "") @JsonProperty("bool_item") - public Boolean getBoolItem() { + public @NotNull Boolean getBoolItem() { return boolItem; } @@ -172,10 +166,9 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @NotNull @ApiModelProperty(example = "[0,1,2,3]", required = true, value = "") @JsonProperty("array_item") - public List getArrayItem() { + public @NotNull List getArrayItem() { return arrayItem; } @@ -230,4 +223,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/User.java index e46b4e9e7907..2a1878ded5d2 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/User.java @@ -47,7 +47,6 @@ public User id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -67,7 +66,6 @@ public User username(String username) { * Get username * @return username */ - @ApiModelProperty(value = "") @JsonProperty("username") public String getUsername() { @@ -87,7 +85,6 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @ApiModelProperty(value = "") @JsonProperty("firstName") public String getFirstName() { @@ -107,7 +104,6 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @ApiModelProperty(value = "") @JsonProperty("lastName") public String getLastName() { @@ -127,7 +123,6 @@ public User email(String email) { * Get email * @return email */ - @ApiModelProperty(value = "") @JsonProperty("email") public String getEmail() { @@ -147,7 +142,6 @@ public User password(String password) { * Get password * @return password */ - @ApiModelProperty(value = "") @JsonProperty("password") public String getPassword() { @@ -167,7 +161,6 @@ public User phone(String phone) { * Get phone * @return phone */ - @ApiModelProperty(value = "") @JsonProperty("phone") public String getPhone() { @@ -187,7 +180,6 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @ApiModelProperty(value = "User Status") @JsonProperty("userStatus") public Integer getUserStatus() { @@ -249,4 +241,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/XmlItem.java index b7a622a0b99e..2e676eb62e75 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/XmlItem.java @@ -34,7 +34,6 @@ public class XmlItem { private Boolean attributeBoolean; - @Valid private List wrappedArray = new ArrayList<>(); private String nameString; @@ -45,10 +44,8 @@ public class XmlItem { private Boolean nameBoolean; - @Valid private List nameArray = new ArrayList<>(); - @Valid private List nameWrappedArray = new ArrayList<>(); private String prefixString; @@ -59,10 +56,8 @@ public class XmlItem { private Boolean prefixBoolean; - @Valid private List prefixArray = new ArrayList<>(); - @Valid private List prefixWrappedArray = new ArrayList<>(); private String namespaceString; @@ -73,10 +68,8 @@ public class XmlItem { private Boolean namespaceBoolean; - @Valid private List namespaceArray = new ArrayList<>(); - @Valid private List namespaceWrappedArray = new ArrayList<>(); private String prefixNsString; @@ -87,10 +80,8 @@ public class XmlItem { private Boolean prefixNsBoolean; - @Valid private List prefixNsArray = new ArrayList<>(); - @Valid private List prefixNsWrappedArray = new ArrayList<>(); public XmlItem attributeString(String attributeString) { @@ -102,7 +93,6 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("attribute_string") public String getAttributeString() { @@ -122,7 +112,6 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("attribute_number") public BigDecimal getAttributeNumber() { @@ -142,7 +131,6 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("attribute_integer") public Integer getAttributeInteger() { @@ -162,7 +150,6 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("attribute_boolean") public Boolean getAttributeBoolean() { @@ -190,7 +177,6 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("wrapped_array") public List getWrappedArray() { @@ -210,7 +196,6 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("name_string") public String getNameString() { @@ -230,7 +215,6 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("name_number") public BigDecimal getNameNumber() { @@ -250,7 +234,6 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("name_integer") public Integer getNameInteger() { @@ -270,7 +253,6 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("name_boolean") public Boolean getNameBoolean() { @@ -298,7 +280,6 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ - @ApiModelProperty(value = "") @JsonProperty("name_array") public List getNameArray() { @@ -326,7 +307,6 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("name_wrapped_array") public List getNameWrappedArray() { @@ -346,7 +326,6 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("prefix_string") public String getPrefixString() { @@ -366,7 +345,6 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("prefix_number") public BigDecimal getPrefixNumber() { @@ -386,7 +364,6 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_integer") public Integer getPrefixInteger() { @@ -406,7 +383,6 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("prefix_boolean") public Boolean getPrefixBoolean() { @@ -434,7 +410,6 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_array") public List getPrefixArray() { @@ -462,7 +437,6 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_wrapped_array") public List getPrefixWrappedArray() { @@ -482,7 +456,6 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("namespace_string") public String getNamespaceString() { @@ -502,7 +475,6 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("namespace_number") public BigDecimal getNamespaceNumber() { @@ -522,7 +494,6 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { @@ -542,7 +513,6 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("namespace_boolean") public Boolean getNamespaceBoolean() { @@ -570,7 +540,6 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ - @ApiModelProperty(value = "") @JsonProperty("namespace_array") public List getNamespaceArray() { @@ -598,7 +567,6 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("namespace_wrapped_array") public List getNamespaceWrappedArray() { @@ -618,7 +586,6 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("prefix_ns_string") public String getPrefixNsString() { @@ -638,7 +605,6 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("prefix_ns_number") public BigDecimal getPrefixNsNumber() { @@ -658,7 +624,6 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { @@ -678,7 +643,6 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("prefix_ns_boolean") public Boolean getPrefixNsBoolean() { @@ -706,7 +670,6 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_ns_array") public List getPrefixNsArray() { @@ -734,7 +697,6 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_ns_wrapped_array") public List getPrefixNsWrappedArray() { @@ -838,4 +800,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java index 6783b2a9a0f6..8e10cce9f85c 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -52,7 +52,7 @@ default AnotherFakeApiDelegate getDelegate() { ) default ResponseEntity call123testSpecialTags( - @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + @ApiParam(value = "client model", required = true) @RequestBody @NotNull @Valid Client body ) { return getDelegate().call123testSpecialTags(body); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java index c65599ac1f0f..30d20083fd41 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java @@ -60,7 +60,7 @@ default FakeApiDelegate getDelegate() { ) default ResponseEntity createXmlItem( - @ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem + @ApiParam(value = "XmlItem Body", required = true) @RequestBody @NotNull @Valid XmlItem xmlItem ) { return getDelegate().createXmlItem(xmlItem); } @@ -90,7 +90,7 @@ default ResponseEntity createXmlItem( ) default ResponseEntity fakeOuterBooleanSerialize( - @ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body + @ApiParam(value = "Input boolean as post body") @RequestBody(required = false) Boolean body ) { return getDelegate().fakeOuterBooleanSerialize(body); } @@ -120,7 +120,7 @@ default ResponseEntity fakeOuterBooleanSerialize( ) default ResponseEntity fakeOuterCompositeSerialize( - @ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body + @ApiParam(value = "Input composite as post body") @RequestBody(required = false) @Valid OuterComposite body ) { return getDelegate().fakeOuterCompositeSerialize(body); } @@ -150,7 +150,7 @@ default ResponseEntity fakeOuterCompositeSerialize( ) default ResponseEntity fakeOuterNumberSerialize( - @ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body + @ApiParam(value = "Input number as post body") @RequestBody(required = false) BigDecimal body ) { return getDelegate().fakeOuterNumberSerialize(body); } @@ -180,7 +180,7 @@ default ResponseEntity fakeOuterNumberSerialize( ) default ResponseEntity fakeOuterStringSerialize( - @ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body + @ApiParam(value = "Input string as post body") @RequestBody(required = false) String body ) { return getDelegate().fakeOuterStringSerialize(body); } @@ -209,7 +209,7 @@ default ResponseEntity fakeOuterStringSerialize( ) default ResponseEntity testBodyWithFileSchema( - @ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass body + @ApiParam(value = "", required = true) @RequestBody @NotNull @Valid FileSchemaTestClass body ) { return getDelegate().testBodyWithFileSchema(body); } @@ -238,8 +238,8 @@ default ResponseEntity testBodyWithFileSchema( ) default ResponseEntity testBodyWithQueryParams( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, - @ApiParam(value = "", required = true) @Valid @RequestBody User body + @ApiParam(value = "", required = true) @RequestParam(value = "query") @NotNull String query, + @ApiParam(value = "", required = true) @RequestBody @NotNull @Valid User body ) { return getDelegate().testBodyWithQueryParams(query, body); } @@ -270,7 +270,7 @@ default ResponseEntity testBodyWithQueryParams( ) default ResponseEntity testClientModel( - @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + @ApiParam(value = "client model", required = true) @RequestBody @NotNull @Valid Client body ) { return getDelegate().testClientModel(body); } @@ -317,20 +317,20 @@ default ResponseEntity testClientModel( ) default ResponseEntity testEndpointParameters( - @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "number", required = true) BigDecimal number, - @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "double", required = true) Double _double, - @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, - @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "byte", required = true) byte[] _byte, - @ApiParam(value = "None") @Valid @RequestParam(value = "integer", required = false) Integer integer, - @ApiParam(value = "None") @Valid @RequestParam(value = "int32", required = false) Integer int32, - @ApiParam(value = "None") @Valid @RequestParam(value = "int64", required = false) Long int64, - @ApiParam(value = "None") @Valid @RequestParam(value = "float", required = false) Float _float, - @ApiParam(value = "None") @Valid @RequestParam(value = "string", required = false) String string, + @ApiParam(value = "None", required = true) @RequestParam(value = "number") @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal number, + @ApiParam(value = "None", required = true) @RequestParam(value = "double") @NotNull @DecimalMin("67.8") @DecimalMax("123.4") Double _double, + @ApiParam(value = "None", required = true) @RequestParam(value = "pattern_without_delimiter") @NotNull @Pattern(regexp = "^[A-Z].*") String patternWithoutDelimiter, + @ApiParam(value = "None", required = true) @RequestParam(value = "byte") @NotNull byte[] _byte, + @ApiParam(value = "None") @RequestParam(value = "integer", required = false) @Min(10) @Max(100) Integer integer, + @ApiParam(value = "None") @RequestParam(value = "int32", required = false) @Min(20) @Max(200) Integer int32, + @ApiParam(value = "None") @RequestParam(value = "int64", required = false) Long int64, + @ApiParam(value = "None") @RequestParam(value = "float", required = false) @DecimalMax("987.6") Float _float, + @ApiParam(value = "None") @RequestParam(value = "string", required = false) @Pattern(regexp = "/[a-z]/i") String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @ApiParam(value = "None") @Valid @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, - @ApiParam(value = "None") @Valid @RequestParam(value = "password", required = false) String password, - @ApiParam(value = "None") @Valid @RequestParam(value = "callback", required = false) String paramCallback + @ApiParam(value = "None") @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @RequestParam(value = "password", required = false) @Size(min = 10, max = 64) String password, + @ApiParam(value = "None") @RequestParam(value = "callback", required = false) String paramCallback ) { return getDelegate().testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); } @@ -368,14 +368,14 @@ default ResponseEntity testEndpointParameters( ) default ResponseEntity testEnumParameters( - @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, - @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, - @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, - @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, - @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString + @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestParam(value = "enum_form_string", required = false) String enumFormString ) { return getDelegate().testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } @@ -408,12 +408,12 @@ default ResponseEntity testEnumParameters( ) default ResponseEntity testGroupParameters( - @NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @ApiParam(value = "Required String in group parameters", required = true) @RequestParam(value = "required_string_group") @NotNull Integer requiredStringGroup, @NotNull @ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, - @NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, - @ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup, + @ApiParam(value = "Required Integer in group parameters", required = true) @RequestParam(value = "required_int64_group") @NotNull Long requiredInt64Group, + @ApiParam(value = "String in group parameters") @RequestParam(value = "string_group", required = false) Integer stringGroup, @ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup, - @ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + @ApiParam(value = "Integer in group parameters") @RequestParam(value = "int64_group", required = false) Long int64Group ) { return getDelegate().testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); } @@ -441,7 +441,7 @@ default ResponseEntity testGroupParameters( ) default ResponseEntity testInlineAdditionalProperties( - @ApiParam(value = "request body", required = true) @Valid @RequestBody Map param + @ApiParam(value = "request body", required = true) @RequestBody @NotNull Map param ) { return getDelegate().testInlineAdditionalProperties(param); } @@ -470,8 +470,8 @@ default ResponseEntity testInlineAdditionalProperties( ) default ResponseEntity testJsonFormData( - @ApiParam(value = "field1", required = true) @Valid @RequestParam(value = "param", required = true) String param, - @ApiParam(value = "field2", required = true) @Valid @RequestParam(value = "param2", required = true) String param2 + @ApiParam(value = "field1", required = true) @RequestParam(value = "param") @NotNull String param, + @ApiParam(value = "field2", required = true) @RequestParam(value = "param2") @NotNull String param2 ) { return getDelegate().testJsonFormData(param, param2); } @@ -503,11 +503,11 @@ default ResponseEntity testJsonFormData( ) default ResponseEntity testQueryParameterCollectionFormat( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + @ApiParam(value = "", required = true) @RequestParam(value = "pipe") @NotNull List pipe, + @ApiParam(value = "", required = true) @RequestParam(value = "ioutil") @NotNull List ioutil, + @ApiParam(value = "", required = true) @RequestParam(value = "http") @NotNull List http, + @ApiParam(value = "", required = true) @RequestParam(value = "url") @NotNull List url, + @ApiParam(value = "", required = true) @RequestParam(value = "context") @NotNull List context ) { return getDelegate().testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); } @@ -545,9 +545,9 @@ default ResponseEntity testQueryParameterCollectionFormat( ) default ResponseEntity uploadFileWithRequiredFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, - @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, - @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") @NotNull Long petId, + @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile") MultipartFile requiredFile, + @ApiParam(value = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata ) { return getDelegate().uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java index 765b676b22d7..b5410ffa5d36 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -214,14 +214,14 @@ default ResponseEntity testEndpointParameters(BigDecimal number, * or Not found (status code 404) * @see FakeApi#testEnumParameters */ - default ResponseEntity testEnumParameters(List enumHeaderStringArray, - String enumHeaderString, - List enumQueryStringArray, - String enumQueryString, - Integer enumQueryInteger, - Double enumQueryDouble, - List enumFormStringArray, - String enumFormString) { + default ResponseEntity testEnumParameters(List enumHeaderStringArray, + EnumHeaderStringEnum enumHeaderString, + List enumQueryStringArray, + EnumQueryStringEnum enumQueryString, + EnumQueryIntegerEnum enumQueryInteger, + EnumQueryDoubleEnum enumQueryDouble, + List enumFormStringArray, + EnumFormStringEnum enumFormString) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 54f7e15717dd..6f363a4be5b1 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -55,7 +55,7 @@ default FakeClassnameTestApiDelegate getDelegate() { ) default ResponseEntity testClassname( - @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + @ApiParam(value = "client model", required = true) @RequestBody @NotNull @Valid Client body ) { return getDelegate().testClassname(body); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java index 7210e083b5c3..cc71882c955e 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java @@ -60,7 +60,7 @@ default PetApiDelegate getDelegate() { ) default ResponseEntity addPet( - @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet body ) { return getDelegate().addPet(body); } @@ -96,7 +96,7 @@ default ResponseEntity addPet( ) default ResponseEntity deletePet( - @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") @NotNull Long petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey ) { return getDelegate().deletePet(petId, apiKey); @@ -117,7 +117,7 @@ default ResponseEntity deletePet( nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, - responseContainer = "List", + responseContainer = "array", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @@ -126,7 +126,7 @@ default ResponseEntity deletePet( } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "array"), @ApiResponse(code = 400, message = "Invalid status value") }) @RequestMapping( @@ -136,7 +136,7 @@ default ResponseEntity deletePet( ) default ResponseEntity> findPetsByStatus( - @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status, + @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @RequestParam(value = "status") @NotNull List status, @ApiIgnore final Pageable pageable ) { return getDelegate().findPetsByStatus(status, pageable); @@ -159,7 +159,7 @@ default ResponseEntity> findPetsByStatus( nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, - responseContainer = "List", + responseContainer = "array", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @@ -168,7 +168,7 @@ default ResponseEntity> findPetsByStatus( } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "array"), @ApiResponse(code = 400, message = "Invalid tag value") }) @RequestMapping( @@ -178,7 +178,7 @@ default ResponseEntity> findPetsByStatus( ) default ResponseEntity> findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, + @ApiParam(value = "Tags to filter by", required = true) @RequestParam(value = "tags") @NotNull List tags, @ApiIgnore final Pageable pageable ) { return getDelegate().findPetsByTags(tags, pageable); @@ -216,7 +216,7 @@ default ResponseEntity> findPetsByTags( ) default ResponseEntity getPetById( - @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") @NotNull Long petId ) { return getDelegate().getPetById(petId); } @@ -234,7 +234,7 @@ default ResponseEntity getPetById( nickname = "listAllPets", notes = "", response = Pet.class, - responseContainer = "List", + responseContainer = "array", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @@ -243,7 +243,7 @@ default ResponseEntity getPetById( } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "array"), @ApiResponse(code = 400, message = "Invalid status value") }) @RequestMapping( @@ -293,7 +293,7 @@ default ResponseEntity> listAllPets( ) default ResponseEntity updatePet( - @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet body ) { return getDelegate().updatePet(body); } @@ -329,9 +329,9 @@ default ResponseEntity updatePet( ) default ResponseEntity updatePetWithForm( - @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, - @ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, - @ApiParam(value = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status + @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") @NotNull Long petId, + @ApiParam(value = "Updated name of the pet") @RequestParam(value = "name", required = false) String name, + @ApiParam(value = "Updated status of the pet") @RequestParam(value = "status", required = false) String status ) { return getDelegate().updatePetWithForm(petId, name, status); } @@ -369,8 +369,8 @@ default ResponseEntity updatePetWithForm( ) default ResponseEntity uploadFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, - @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") @NotNull Long petId, + @ApiParam(value = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) { return getDelegate().uploadFile(petId, additionalMetadata, file); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiDelegate.java index 581d4d096b2c..27ad98451a34 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -65,7 +65,7 @@ default ResponseEntity deletePet(Long petId, * or Invalid status value (status code 400) * @see PetApi#findPetsByStatus */ - default ResponseEntity> findPetsByStatus(List status, final Pageable pageable) { + default ResponseEntity> findPetsByStatus(List status, final Pageable pageable) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java index b09e8bf3a73b..151811e3cfb5 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java @@ -52,7 +52,7 @@ default StoreApiDelegate getDelegate() { ) default ResponseEntity deleteOrder( - @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") @NotNull String orderId ) { return getDelegate().deleteOrder(orderId); } @@ -70,13 +70,13 @@ default ResponseEntity deleteOrder( nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, - responseContainer = "Map", + responseContainer = "map", authorizations = { @Authorization(value = "api_key") } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "map") }) @RequestMapping( method = RequestMethod.GET, @@ -119,7 +119,7 @@ default ResponseEntity> getInventory( ) default ResponseEntity getOrderById( - @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") @NotNull @Min(1L) @Max(5L) Long orderId ) { return getDelegate().getOrderById(orderId); } @@ -150,7 +150,7 @@ default ResponseEntity getOrderById( ) default ResponseEntity placeOrder( - @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body + @ApiParam(value = "order placed for purchasing the pet", required = true) @RequestBody @NotNull @Valid Order body ) { return getDelegate().placeOrder(body); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java index 4df5fcd31006..37140fc708bb 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java @@ -50,7 +50,7 @@ default UserApiDelegate getDelegate() { ) default ResponseEntity createUser( - @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body + @ApiParam(value = "Created user object", required = true) @RequestBody @NotNull @Valid User body ) { return getDelegate().createUser(body); } @@ -77,7 +77,7 @@ default ResponseEntity createUser( ) default ResponseEntity createUsersWithArrayInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@Valid User> body + @ApiParam(value = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> body ) { return getDelegate().createUsersWithArrayInput(body); } @@ -104,7 +104,7 @@ default ResponseEntity createUsersWithArrayInput( ) default ResponseEntity createUsersWithListInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@Valid User> body + @ApiParam(value = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> body ) { return getDelegate().createUsersWithListInput(body); } @@ -134,7 +134,7 @@ default ResponseEntity createUsersWithListInput( ) default ResponseEntity deleteUser( - @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") @NotNull String username ) { return getDelegate().deleteUser(username); } @@ -167,7 +167,7 @@ default ResponseEntity deleteUser( ) default ResponseEntity getUserByName( - @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") @NotNull String username ) { return getDelegate().getUserByName(username); } @@ -199,8 +199,8 @@ default ResponseEntity getUserByName( ) default ResponseEntity loginUser( - @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, - @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + @ApiParam(value = "The user name for login", required = true) @RequestParam(value = "username") @NotNull String username, + @ApiParam(value = "The password for login in clear text", required = true) @RequestParam(value = "password") @NotNull String password ) { return getDelegate().loginUser(username, password); } @@ -257,8 +257,8 @@ default ResponseEntity logoutUser( ) default ResponseEntity updateUser( - @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, - @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body + @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") @NotNull String username, + @ApiParam(value = "Updated user object", required = true) @RequestBody @NotNull @Valid User body ) { return getDelegate().updateUser(username, body); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiDelegate.java index afb7d195cbdd..b65748c56fac 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiDelegate.java @@ -46,7 +46,7 @@ default ResponseEntity createUser(User body) { * @return successful operation (status code 200) * @see UserApi#createUsersWithArrayInput */ - default ResponseEntity createUsersWithArrayInput(List<@Valid User> body) { + default ResponseEntity createUsersWithArrayInput(List body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -58,7 +58,7 @@ default ResponseEntity createUsersWithArrayInput(List<@Valid User> body) { * @return successful operation (status code 200) * @see UserApi#createUsersWithListInput */ - default ResponseEntity createUsersWithListInput(List<@Valid User> body) { + default ResponseEntity createUsersWithListInput(List body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/VersioningApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/VersioningApi.java index 2afa3542c1b0..b2e6c3ad7c1a 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/VersioningApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/VersioningApi.java @@ -55,7 +55,7 @@ default VersioningApiDelegate getDelegate() { default ResponseEntity versioningHeaders( @NotNull @ApiParam(value = "", required = true, defaultValue = "V1") @RequestHeader(value = "VersionWithDefaultValue", required = true, defaultValue = "V1") String versionWithDefaultValue, @NotNull @ApiParam(value = "", required = true) @RequestHeader(value = "VersionNoDefaultValue", required = true) String versionNoDefaultValue, - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") @NotNull Long petId ) { return getDelegate().versioningHeaders(versionWithDefaultValue, versionNoDefaultValue, petId); } @@ -90,11 +90,11 @@ default ResponseEntity versioningHeaders( ) default ResponseEntity versioningMix( - @NotNull @ApiParam(value = "", required = true, defaultValue = "V1") @Valid @RequestParam(value = "VersionWithDefaultValueQuery", required = true, defaultValue = "V1") String versionWithDefaultValueQuery, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "VersionNoDefaultValueQuery", required = true) String versionNoDefaultValueQuery, + @ApiParam(value = "", required = true, defaultValue = "V1") @RequestParam(value = "VersionWithDefaultValueQuery", defaultValue = "V1") @NotNull String versionWithDefaultValueQuery, + @ApiParam(value = "", required = true) @RequestParam(value = "VersionNoDefaultValueQuery") @NotNull String versionNoDefaultValueQuery, @NotNull @ApiParam(value = "", required = true, defaultValue = "V1") @RequestHeader(value = "VersionWithDefaultValueHeader", required = true, defaultValue = "V1") String versionWithDefaultValueHeader, @NotNull @ApiParam(value = "", required = true) @RequestHeader(value = "VersionNoDefaultValueHeader", required = true) String versionNoDefaultValueHeader, - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") @NotNull Long petId ) { return getDelegate().versioningMix(versionWithDefaultValueQuery, versionNoDefaultValueQuery, versionWithDefaultValueHeader, versionNoDefaultValueHeader, petId); } @@ -126,9 +126,9 @@ default ResponseEntity versioningMix( ) default ResponseEntity versioningQueryParams( - @NotNull @ApiParam(value = "", required = true, defaultValue = "V1") @Valid @RequestParam(value = "VersionWithDefaultValue", required = true, defaultValue = "V1") String versionWithDefaultValue, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "VersionNoDefaultValue", required = true) String versionNoDefaultValue, - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + @ApiParam(value = "", required = true, defaultValue = "V1") @RequestParam(value = "VersionWithDefaultValue", defaultValue = "V1") @NotNull String versionWithDefaultValue, + @ApiParam(value = "", required = true) @RequestParam(value = "VersionNoDefaultValue") @NotNull String versionNoDefaultValue, + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") @NotNull Long petId ) { return getDelegate().versioningQueryParams(versionWithDefaultValue, versionNoDefaultValue, petId); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index cf57def58490..291e57234974 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -37,7 +37,6 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index dc535ab3e476..f3b2cfe986ca 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -38,7 +38,6 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -126,4 +125,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 4d4bef3fde91..79708a257b1e 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -37,7 +37,6 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 319f2c34510c..cf551ec164f3 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -26,28 +26,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class AdditionalPropertiesClass { - @Valid private Map mapString = new HashMap<>(); - @Valid private Map mapNumber = new HashMap<>(); - @Valid private Map mapInteger = new HashMap<>(); - @Valid private Map mapBoolean = new HashMap<>(); - @Valid private Map> mapArrayInteger = new HashMap<>(); - @Valid private Map> mapArrayAnytype = new HashMap<>(); - @Valid private Map> mapMapString = new HashMap<>(); - @Valid private Map> mapMapAnytype = new HashMap<>(); private Object anytype1; @@ -73,7 +65,6 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ - @ApiModelProperty(value = "") @JsonProperty("map_string") public Map getMapString() { @@ -101,7 +92,6 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("map_number") public Map getMapNumber() { @@ -129,7 +119,6 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ - @ApiModelProperty(value = "") @JsonProperty("map_integer") public Map getMapInteger() { @@ -157,7 +146,6 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ - @ApiModelProperty(value = "") @JsonProperty("map_boolean") public Map getMapBoolean() { @@ -185,7 +173,6 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { @@ -213,7 +200,6 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ - @Valid @ApiModelProperty(value = "") @JsonProperty("map_array_anytype") public Map> getMapArrayAnytype() { @@ -241,7 +227,6 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { @@ -269,7 +254,6 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { @@ -289,7 +273,6 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ - @ApiModelProperty(value = "") @JsonProperty("anytype_1") public Object getAnytype1() { @@ -309,7 +292,6 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ - @ApiModelProperty(value = "") @JsonProperty("anytype_2") public Object getAnytype2() { @@ -329,7 +311,6 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ - @ApiModelProperty(value = "") @JsonProperty("anytype_3") public Object getAnytype3() { @@ -397,4 +378,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index e8e32dcd7fa9..f12948a1c898 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -37,7 +37,6 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 50fa525424d3..f31c0d0cd9b2 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -38,7 +38,6 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -126,4 +125,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index b2ca3bf5cb02..98e9b7b1a12a 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -38,7 +38,6 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -126,4 +125,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 7e085a44c93d..822b5e79b89f 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -37,7 +37,6 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Animal.java index ee575e5ad547..c947edd67ac9 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Animal.java @@ -35,7 +35,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class Animal { - private String className; + private @NotNull String className; private String color = "red"; @@ -59,10 +59,9 @@ public Animal className(String className) { * Get className * @return className */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("className") - public String getClassName() { + public @NotNull String getClassName() { return className; } @@ -79,7 +78,6 @@ public Animal color(String color) { * Get color * @return color */ - @ApiModelProperty(value = "") @JsonProperty("color") public String getColor() { @@ -129,4 +127,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 621c01be49ce..249d0bc72466 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnly { - @Valid private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { @@ -46,7 +45,6 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("ArrayArrayNumber") public List> getArrayArrayNumber() { @@ -94,4 +92,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 3f519bbb9baa..58b3ee1a3bcf 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayOfNumberOnly { - @Valid private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnly arrayNumber(List arrayNumber) { @@ -46,7 +45,6 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("ArrayNumber") public List getArrayNumber() { @@ -94,4 +92,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayTest.java index 382556e65bd6..20402ebb213f 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayTest.java @@ -26,13 +26,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayTest { - @Valid private List arrayOfString = new ArrayList<>(); - @Valid private List> arrayArrayOfInteger = new ArrayList<>(); - @Valid private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTest arrayOfString(List arrayOfString) { @@ -52,7 +49,6 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ - @ApiModelProperty(value = "") @JsonProperty("array_of_string") public List getArrayOfString() { @@ -80,7 +76,6 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ - @Valid @ApiModelProperty(value = "") @JsonProperty("array_array_of_integer") public List> getArrayArrayOfInteger() { @@ -91,12 +86,12 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } - public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) { + public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { if (this.arrayArrayOfModel == null) { this.arrayArrayOfModel = new ArrayList<>(); } @@ -108,14 +103,13 @@ public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayO * Get arrayArrayOfModel * @return arrayArrayOfModel */ - @Valid @ApiModelProperty(value = "") @JsonProperty("array_array_of_model") public List> getArrayArrayOfModel() { return arrayArrayOfModel; } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { + public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } @@ -160,4 +154,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Capitalization.java index d6e8a694cf85..f9226321c070 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Capitalization.java @@ -43,7 +43,6 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ - @ApiModelProperty(value = "") @JsonProperty("smallCamel") public String getSmallCamel() { @@ -63,7 +62,6 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ - @ApiModelProperty(value = "") @JsonProperty("CapitalCamel") public String getCapitalCamel() { @@ -83,7 +81,6 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ - @ApiModelProperty(value = "") @JsonProperty("small_Snake") public String getSmallSnake() { @@ -103,7 +100,6 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ - @ApiModelProperty(value = "") @JsonProperty("Capital_Snake") public String getCapitalSnake() { @@ -123,7 +119,6 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ - @ApiModelProperty(value = "") @JsonProperty("SCA_ETH_Flow_Points") public String getScAETHFlowPoints() { @@ -143,7 +138,6 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ - @ApiModelProperty(value = "Name of the pet ") @JsonProperty("ATT_NAME") public String getATTNAME() { @@ -201,4 +195,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Cat.java index f8562653ff90..7276dc5aa48c 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Cat.java @@ -49,7 +49,6 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ - @ApiModelProperty(value = "") @JsonProperty("declawed") public Boolean getDeclawed() { @@ -109,4 +108,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Category.java index a7d5b6e5916d..04e9b386ebbe 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Category.java @@ -24,7 +24,7 @@ public class Category { private Long id; - private String name = "default-name"; + private @NotNull String name = "default-name"; public Category() { super(); @@ -46,7 +46,6 @@ public Category id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -66,10 +65,9 @@ public Category name(String name) { * Get name * @return name */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -116,4 +114,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ClassModel.java index 56aeaf340f38..508e179a1a9e 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ClassModel.java @@ -34,7 +34,6 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @ApiModelProperty(value = "") @JsonProperty("_class") public String getPropertyClass() { @@ -82,4 +81,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Client.java index 23491ea29e60..0463c48505d8 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Client.java @@ -33,7 +33,6 @@ public Client client(String client) { * Get client * @return client */ - @ApiModelProperty(value = "") @JsonProperty("client") public String getClient() { @@ -81,4 +80,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Dog.java index bef3e5409a8e..d4656db2ef88 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Dog.java @@ -49,7 +49,6 @@ public Dog breed(String breed) { * Get breed * @return breed */ - @ApiModelProperty(value = "") @JsonProperty("breed") public String getBreed() { @@ -109,4 +108,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumArrays.java index 5bed35014d25..4a80b3b0ffe9 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumArrays.java @@ -61,7 +61,7 @@ public static JustSymbolEnum fromValue(String value) { } } - private JustSymbolEnum justSymbol; + private String justSymbol; /** * Gets or Sets arrayEnum @@ -98,8 +98,7 @@ public static ArrayEnumEnum fromValue(String value) { } } - @Valid - private List arrayEnum = new ArrayList<>(); + private List arrayEnum = new ArrayList<>(); public EnumArrays justSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; @@ -110,10 +109,9 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ - @ApiModelProperty(value = "") @JsonProperty("just_symbol") - public JustSymbolEnum getJustSymbol() { + public String getJustSymbol() { return justSymbol; } @@ -138,10 +136,9 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ - @ApiModelProperty(value = "") @JsonProperty("array_enum") - public List getArrayEnum() { + public List getArrayEnum() { return arrayEnum; } @@ -188,4 +185,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumTest.java index 2865d76ab8bf..8e3d8978857c 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumTest.java @@ -63,7 +63,7 @@ public static EnumStringEnum fromValue(String value) { } } - private EnumStringEnum enumString; + private String enumString; /** * Gets or Sets enumStringRequired @@ -102,7 +102,7 @@ public static EnumStringRequiredEnum fromValue(String value) { } } - private EnumStringRequiredEnum enumStringRequired; + private @NotNull String enumStringRequired; /** * Gets or Sets enumInteger @@ -139,7 +139,7 @@ public static EnumIntegerEnum fromValue(Integer value) { } } - private EnumIntegerEnum enumInteger; + private Integer enumInteger; /** * Gets or Sets enumNumber @@ -176,7 +176,7 @@ public static EnumNumberEnum fromValue(Double value) { } } - private EnumNumberEnum enumNumber; + private Double enumNumber; private OuterEnum outerEnum; @@ -200,10 +200,9 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ - @ApiModelProperty(value = "") @JsonProperty("enum_string") - public EnumStringEnum getEnumString() { + public String getEnumString() { return enumString; } @@ -220,10 +219,9 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("enum_string_required") - public EnumStringRequiredEnum getEnumStringRequired() { + public @NotNull String getEnumStringRequired() { return enumStringRequired; } @@ -240,10 +238,9 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ - @ApiModelProperty(value = "") @JsonProperty("enum_integer") - public EnumIntegerEnum getEnumInteger() { + public Integer getEnumInteger() { return enumInteger; } @@ -260,10 +257,9 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ - @ApiModelProperty(value = "") @JsonProperty("enum_number") - public EnumNumberEnum getEnumNumber() { + public Double getEnumNumber() { return enumNumber; } @@ -280,7 +276,6 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ - @Valid @ApiModelProperty(value = "") @JsonProperty("outerEnum") public OuterEnum getOuterEnum() { @@ -336,4 +331,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/File.java index 6e16961c2d2f..cd9f95a6f91c 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/File.java @@ -34,7 +34,6 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ - @ApiModelProperty(value = "Test capitalization") @JsonProperty("sourceURI") public String getSourceURI() { @@ -82,4 +81,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 9a40dbd168af..0c2d51df5822 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -26,9 +26,8 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class FileSchemaTestClass { - private File file; + private @Valid File file; - @Valid private List<@Valid File> files = new ArrayList<>(); public FileSchemaTestClass file(File file) { @@ -40,10 +39,9 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ - @Valid @ApiModelProperty(value = "") @JsonProperty("file") - public File getFile() { + public @Valid File getFile() { return file; } @@ -51,7 +49,7 @@ public void setFile(File file) { this.file = file; } - public FileSchemaTestClass files(List<@Valid File> files) { + public FileSchemaTestClass files(List files) { this.files = files; return this; } @@ -68,14 +66,13 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ - @Valid @ApiModelProperty(value = "") @JsonProperty("files") public List<@Valid File> getFiles() { return files; } - public void setFiles(List<@Valid File> files) { + public void setFiles(List files) { this.files = files; } @@ -118,4 +115,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FormatTest.java index fda969ad06d3..fa150f1fa069 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FormatTest.java @@ -30,33 +30,33 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class FormatTest { - private Integer integer; + private @Min(10) @Max(100) Integer integer; - private Integer int32; + private @Min(20) @Max(200) Integer int32; private Long int64; - private BigDecimal number; + private @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal number; - private Float _float; + private @DecimalMin("54.3") @DecimalMax("987.6") Float _float; - private Double _double; + private @DecimalMin("67.8") @DecimalMax("123.4") Double _double; - private String string; + private @Pattern(regexp = "/[a-z]/i") String string; - private byte[] _byte; + private @NotNull byte[] _byte; private org.springframework.core.io.Resource binary; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) - private LocalDate date; + private @NotNull LocalDate date; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; private UUID uuid; - private String password; + private @NotNull @Size(min = 10, max = 64) String password; private BigDecimal bigDecimal; @@ -85,10 +85,9 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ - @Min(10) @Max(100) @ApiModelProperty(value = "") @JsonProperty("integer") - public Integer getInteger() { + public @Min(10) @Max(100) Integer getInteger() { return integer; } @@ -107,10 +106,9 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ - @Min(20) @Max(200) @ApiModelProperty(value = "") @JsonProperty("int32") - public Integer getInt32() { + public @Min(20) @Max(200) Integer getInt32() { return int32; } @@ -127,7 +125,6 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ - @ApiModelProperty(value = "") @JsonProperty("int64") public Long getInt64() { @@ -149,10 +146,9 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ - @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(required = true, value = "") @JsonProperty("number") - public BigDecimal getNumber() { + public @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal getNumber() { return number; } @@ -171,10 +167,9 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ - @DecimalMin("54.3") @DecimalMax("987.6") @ApiModelProperty(value = "") @JsonProperty("float") - public Float getFloat() { + public @DecimalMin("54.3") @DecimalMax("987.6") Float getFloat() { return _float; } @@ -193,10 +188,9 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ - @DecimalMin("67.8") @DecimalMax("123.4") @ApiModelProperty(value = "") @JsonProperty("double") - public Double getDouble() { + public @DecimalMin("67.8") @DecimalMax("123.4") Double getDouble() { return _double; } @@ -213,10 +207,9 @@ public FormatTest string(String string) { * Get string * @return string */ - @Pattern(regexp = "/[a-z]/i") @ApiModelProperty(value = "") @JsonProperty("string") - public String getString() { + public @Pattern(regexp = "/[a-z]/i") String getString() { return string; } @@ -233,10 +226,9 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("byte") - public byte[] getByte() { + public @NotNull byte[] getByte() { return _byte; } @@ -253,7 +245,6 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ - @Valid @ApiModelProperty(value = "") @JsonProperty("binary") public org.springframework.core.io.Resource getBinary() { @@ -273,10 +264,9 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ - @NotNull @Valid @ApiModelProperty(required = true, value = "") @JsonProperty("date") - public LocalDate getDate() { + public @NotNull LocalDate getDate() { return date; } @@ -293,7 +283,6 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ - @Valid @ApiModelProperty(value = "") @JsonProperty("dateTime") public OffsetDateTime getDateTime() { @@ -313,7 +302,6 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ - @Valid @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") @JsonProperty("uuid") public UUID getUuid() { @@ -333,10 +321,9 @@ public FormatTest password(String password) { * Get password * @return password */ - @NotNull @Size(min = 10, max = 64) @ApiModelProperty(required = true, value = "") @JsonProperty("password") - public String getPassword() { + public @NotNull @Size(min = 10, max = 64) String getPassword() { return password; } @@ -353,7 +340,6 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ - @Valid @ApiModelProperty(value = "") @JsonProperty("BigDecimal") public BigDecimal getBigDecimal() { @@ -427,4 +413,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 27ea04eaa86c..628772ab47fe 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -37,7 +37,6 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("bar") public String getBar() { @@ -57,7 +56,6 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("foo") public String getFoo() { @@ -107,4 +105,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/MapTest.java index bd3eea6e64df..a060e9d647a7 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/MapTest.java @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class MapTest { - @Valid private Map> mapMapOfString = new HashMap<>(); /** @@ -63,13 +62,10 @@ public static InnerEnum fromValue(String value) { } } - @Valid - private Map mapOfEnumString = new HashMap<>(); + private Map mapOfEnumString = new HashMap<>(); - @Valid private Map directMap = new HashMap<>(); - @Valid private Map indirectMap = new HashMap<>(); public MapTest mapMapOfString(Map> mapMapOfString) { @@ -89,7 +85,6 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ - @Valid @ApiModelProperty(value = "") @JsonProperty("map_map_of_string") public Map> getMapMapOfString() { @@ -117,10 +112,9 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ - @ApiModelProperty(value = "") @JsonProperty("map_of_enum_string") - public Map getMapOfEnumString() { + public Map getMapOfEnumString() { return mapOfEnumString; } @@ -145,7 +139,6 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ - @ApiModelProperty(value = "") @JsonProperty("direct_map") public Map getDirectMap() { @@ -173,7 +166,6 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ - @ApiModelProperty(value = "") @JsonProperty("indirect_map") public Map getIndirectMap() { @@ -227,4 +219,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index b16370183e0a..0ecca046c869 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -33,8 +33,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; - @Valid - private Map map = new HashMap<>(); + private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { this.uuid = uuid; @@ -45,7 +44,6 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ - @Valid @ApiModelProperty(value = "") @JsonProperty("uuid") public UUID getUuid() { @@ -65,7 +63,6 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ - @Valid @ApiModelProperty(value = "") @JsonProperty("dateTime") public OffsetDateTime getDateTime() { @@ -93,10 +90,9 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ - @Valid @ApiModelProperty(value = "") @JsonProperty("map") - public Map getMap() { + public Map getMap() { return map; } @@ -145,4 +141,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Model200Response.java index 4922749da22c..6f4b8460e6f4 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Model200Response.java @@ -38,7 +38,6 @@ public Model200Response name(Integer name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public Integer getName() { @@ -58,7 +57,6 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @ApiModelProperty(value = "") @JsonProperty("class") public String getPropertyClass() { @@ -108,4 +106,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelApiResponse.java index 21244266ad17..31642652231b 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -39,7 +39,6 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @ApiModelProperty(value = "") @JsonProperty("code") public Integer getCode() { @@ -59,7 +58,6 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @ApiModelProperty(value = "") @JsonProperty("type") public String getType() { @@ -79,7 +77,6 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @ApiModelProperty(value = "") @JsonProperty("message") public String getMessage() { @@ -131,4 +128,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelList.java index d3d66db5c095..b9dc65977c53 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelList.java @@ -35,7 +35,6 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ - @ApiModelProperty(value = "") @JsonProperty("123-list") public String get123list() { @@ -83,4 +82,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelReturn.java index 2c8a25a4d85f..72d78cb7fc0b 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelReturn.java @@ -36,7 +36,6 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ - @ApiModelProperty(value = "") @JsonProperty("return") public Integer getReturn() { @@ -84,4 +83,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Name.java index 420c565a9955..f42d379c1083 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Name.java @@ -23,7 +23,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class Name { - private Integer name; + private @NotNull Integer name; private Integer snakeCase; @@ -51,10 +51,9 @@ public Name name(Integer name) { * Get name * @return name */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("name") - public Integer getName() { + public @NotNull Integer getName() { return name; } @@ -71,7 +70,6 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("snake_case") public Integer getSnakeCase() { @@ -91,7 +89,6 @@ public Name property(String property) { * Get property * @return property */ - @ApiModelProperty(value = "") @JsonProperty("property") public String getProperty() { @@ -111,7 +108,6 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("123Number") public Integer get123number() { @@ -165,4 +161,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/NumberOnly.java index 69de58b11374..eb57c97846a2 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/NumberOnly.java @@ -34,7 +34,6 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("JustNumber") public BigDecimal getJustNumber() { @@ -82,4 +81,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Order.java index 48932f68f862..6b84d7a0c4b4 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Order.java @@ -71,7 +71,7 @@ public static StatusEnum fromValue(String value) { } } - private StatusEnum status; + private String status; private Boolean complete = false; @@ -84,7 +84,6 @@ public Order id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -104,7 +103,6 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @ApiModelProperty(value = "") @JsonProperty("petId") public Long getPetId() { @@ -124,7 +122,6 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @ApiModelProperty(value = "") @JsonProperty("quantity") public Integer getQuantity() { @@ -144,7 +141,6 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Valid @ApiModelProperty(value = "") @JsonProperty("shipDate") public OffsetDateTime getShipDate() { @@ -164,10 +160,9 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @ApiModelProperty(value = "Order Status") @JsonProperty("status") - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -184,7 +179,6 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @ApiModelProperty(value = "") @JsonProperty("complete") public Boolean getComplete() { @@ -242,4 +236,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/OuterComposite.java index 2e78c0586cab..2bfc1db21bb2 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/OuterComposite.java @@ -38,7 +38,6 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("my_number") public BigDecimal getMyNumber() { @@ -58,7 +57,6 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ - @ApiModelProperty(value = "") @JsonProperty("my_string") public String getMyString() { @@ -78,7 +76,6 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ - @ApiModelProperty(value = "") @JsonProperty("my_boolean") public Boolean getMyBoolean() { @@ -130,4 +127,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Pet.java index 19339f6c434e..2467fdb92615 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Pet.java @@ -30,14 +30,12 @@ public class Pet { private Long id; - private Category category; + private @Valid Category category; - private String name; + private @NotNull String name; - @Valid - private List photoUrls = new ArrayList<>(); + private @NotNull List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** @@ -77,7 +75,7 @@ public static StatusEnum fromValue(String value) { } } - private StatusEnum status; + private String status; public Pet() { super(); @@ -100,7 +98,6 @@ public Pet id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -120,10 +117,9 @@ public Pet category(Category category) { * Get category * @return category */ - @Valid @ApiModelProperty(value = "") @JsonProperty("category") - public Category getCategory() { + public @Valid Category getCategory() { return category; } @@ -140,10 +136,9 @@ public Pet name(String name) { * Get name * @return name */ - @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -168,10 +163,9 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("photoUrls") - public List getPhotoUrls() { + public @NotNull List getPhotoUrls() { return photoUrls; } @@ -179,7 +173,7 @@ public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List<@Valid Tag> tags) { + public Pet tags(List tags) { this.tags = tags; return this; } @@ -196,14 +190,13 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Valid @ApiModelProperty(value = "") @JsonProperty("tags") public List<@Valid Tag> getTags() { return tags; } - public void setTags(List<@Valid Tag> tags) { + public void setTags(List tags) { this.tags = tags; } @@ -216,10 +209,9 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ - @ApiModelProperty(value = "pet status in the store") @JsonProperty("status") - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -274,4 +266,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 9388f3cfd29f..1eee9577a877 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -35,7 +35,6 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("bar") public String getBar() { @@ -55,7 +54,6 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ - @ApiModelProperty(value = "") @JsonProperty("baz") public String getBaz() { @@ -105,4 +103,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/SpecialModelName.java index 6d6d8e261c74..d4296422472e 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/SpecialModelName.java @@ -35,7 +35,6 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ - @ApiModelProperty(value = "") @JsonProperty("$special[property.name]") public Long get$SpecialPropertyName() { @@ -83,4 +82,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Tag.java index 850c68911db4..d3778890e2d6 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Tag.java @@ -35,7 +35,6 @@ public Tag id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -55,7 +54,6 @@ public Tag name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -105,4 +103,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java index a0fe16145d30..6b0e966ec471 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -26,16 +26,15 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class TypeHolderDefault { - private String stringItem = "what"; + private @NotNull String stringItem = "what"; - private BigDecimal numberItem; + private @NotNull BigDecimal numberItem; - private Integer integerItem; + private @NotNull Integer integerItem; - private Boolean boolItem = true; + private @NotNull Boolean boolItem = true; - @Valid - private List arrayItem = new ArrayList<>(); + private @NotNull List arrayItem = new ArrayList<>(); public TypeHolderDefault() { super(); @@ -61,10 +60,9 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("string_item") - public String getStringItem() { + public @NotNull String getStringItem() { return stringItem; } @@ -81,10 +79,9 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @NotNull @Valid @ApiModelProperty(required = true, value = "") @JsonProperty("number_item") - public BigDecimal getNumberItem() { + public @NotNull BigDecimal getNumberItem() { return numberItem; } @@ -101,10 +98,9 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("integer_item") - public Integer getIntegerItem() { + public @NotNull Integer getIntegerItem() { return integerItem; } @@ -121,10 +117,9 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("bool_item") - public Boolean getBoolItem() { + public @NotNull Boolean getBoolItem() { return boolItem; } @@ -149,10 +144,9 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("array_item") - public List getArrayItem() { + public @NotNull List getArrayItem() { return arrayItem; } @@ -205,4 +199,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java index 909dc1e7fe60..e9b3492a4684 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -26,18 +26,17 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class TypeHolderExample { - private String stringItem; + private @NotNull String stringItem; - private BigDecimal numberItem; + private @NotNull BigDecimal numberItem; - private Float floatItem; + private @NotNull Float floatItem; - private Integer integerItem; + private @NotNull Integer integerItem; - private Boolean boolItem; + private @NotNull Boolean boolItem; - @Valid - private List arrayItem = new ArrayList<>(); + private @NotNull List arrayItem = new ArrayList<>(); public TypeHolderExample() { super(); @@ -64,10 +63,9 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @NotNull @ApiModelProperty(example = "what", required = true, value = "") @JsonProperty("string_item") - public String getStringItem() { + public @NotNull String getStringItem() { return stringItem; } @@ -84,10 +82,9 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @NotNull @Valid @ApiModelProperty(example = "1.234", required = true, value = "") @JsonProperty("number_item") - public BigDecimal getNumberItem() { + public @NotNull BigDecimal getNumberItem() { return numberItem; } @@ -104,10 +101,9 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ - @NotNull @ApiModelProperty(example = "1.234", required = true, value = "") @JsonProperty("float_item") - public Float getFloatItem() { + public @NotNull Float getFloatItem() { return floatItem; } @@ -124,10 +120,9 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @NotNull @ApiModelProperty(example = "-2", required = true, value = "") @JsonProperty("integer_item") - public Integer getIntegerItem() { + public @NotNull Integer getIntegerItem() { return integerItem; } @@ -144,10 +139,9 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @NotNull @ApiModelProperty(example = "true", required = true, value = "") @JsonProperty("bool_item") - public Boolean getBoolItem() { + public @NotNull Boolean getBoolItem() { return boolItem; } @@ -172,10 +166,9 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @NotNull @ApiModelProperty(example = "[0,1,2,3]", required = true, value = "") @JsonProperty("array_item") - public List getArrayItem() { + public @NotNull List getArrayItem() { return arrayItem; } @@ -230,4 +223,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/User.java index e46b4e9e7907..2a1878ded5d2 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/User.java @@ -47,7 +47,6 @@ public User id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -67,7 +66,6 @@ public User username(String username) { * Get username * @return username */ - @ApiModelProperty(value = "") @JsonProperty("username") public String getUsername() { @@ -87,7 +85,6 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @ApiModelProperty(value = "") @JsonProperty("firstName") public String getFirstName() { @@ -107,7 +104,6 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @ApiModelProperty(value = "") @JsonProperty("lastName") public String getLastName() { @@ -127,7 +123,6 @@ public User email(String email) { * Get email * @return email */ - @ApiModelProperty(value = "") @JsonProperty("email") public String getEmail() { @@ -147,7 +142,6 @@ public User password(String password) { * Get password * @return password */ - @ApiModelProperty(value = "") @JsonProperty("password") public String getPassword() { @@ -167,7 +161,6 @@ public User phone(String phone) { * Get phone * @return phone */ - @ApiModelProperty(value = "") @JsonProperty("phone") public String getPhone() { @@ -187,7 +180,6 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @ApiModelProperty(value = "User Status") @JsonProperty("userStatus") public Integer getUserStatus() { @@ -249,4 +241,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/XmlItem.java index b7a622a0b99e..2e676eb62e75 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/XmlItem.java @@ -34,7 +34,6 @@ public class XmlItem { private Boolean attributeBoolean; - @Valid private List wrappedArray = new ArrayList<>(); private String nameString; @@ -45,10 +44,8 @@ public class XmlItem { private Boolean nameBoolean; - @Valid private List nameArray = new ArrayList<>(); - @Valid private List nameWrappedArray = new ArrayList<>(); private String prefixString; @@ -59,10 +56,8 @@ public class XmlItem { private Boolean prefixBoolean; - @Valid private List prefixArray = new ArrayList<>(); - @Valid private List prefixWrappedArray = new ArrayList<>(); private String namespaceString; @@ -73,10 +68,8 @@ public class XmlItem { private Boolean namespaceBoolean; - @Valid private List namespaceArray = new ArrayList<>(); - @Valid private List namespaceWrappedArray = new ArrayList<>(); private String prefixNsString; @@ -87,10 +80,8 @@ public class XmlItem { private Boolean prefixNsBoolean; - @Valid private List prefixNsArray = new ArrayList<>(); - @Valid private List prefixNsWrappedArray = new ArrayList<>(); public XmlItem attributeString(String attributeString) { @@ -102,7 +93,6 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("attribute_string") public String getAttributeString() { @@ -122,7 +112,6 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("attribute_number") public BigDecimal getAttributeNumber() { @@ -142,7 +131,6 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("attribute_integer") public Integer getAttributeInteger() { @@ -162,7 +150,6 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("attribute_boolean") public Boolean getAttributeBoolean() { @@ -190,7 +177,6 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("wrapped_array") public List getWrappedArray() { @@ -210,7 +196,6 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("name_string") public String getNameString() { @@ -230,7 +215,6 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("name_number") public BigDecimal getNameNumber() { @@ -250,7 +234,6 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("name_integer") public Integer getNameInteger() { @@ -270,7 +253,6 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("name_boolean") public Boolean getNameBoolean() { @@ -298,7 +280,6 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ - @ApiModelProperty(value = "") @JsonProperty("name_array") public List getNameArray() { @@ -326,7 +307,6 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("name_wrapped_array") public List getNameWrappedArray() { @@ -346,7 +326,6 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("prefix_string") public String getPrefixString() { @@ -366,7 +345,6 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("prefix_number") public BigDecimal getPrefixNumber() { @@ -386,7 +364,6 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_integer") public Integer getPrefixInteger() { @@ -406,7 +383,6 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("prefix_boolean") public Boolean getPrefixBoolean() { @@ -434,7 +410,6 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_array") public List getPrefixArray() { @@ -462,7 +437,6 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_wrapped_array") public List getPrefixWrappedArray() { @@ -482,7 +456,6 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("namespace_string") public String getNamespaceString() { @@ -502,7 +475,6 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("namespace_number") public BigDecimal getNamespaceNumber() { @@ -522,7 +494,6 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { @@ -542,7 +513,6 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("namespace_boolean") public Boolean getNamespaceBoolean() { @@ -570,7 +540,6 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ - @ApiModelProperty(value = "") @JsonProperty("namespace_array") public List getNamespaceArray() { @@ -598,7 +567,6 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("namespace_wrapped_array") public List getNamespaceWrappedArray() { @@ -618,7 +586,6 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("prefix_ns_string") public String getPrefixNsString() { @@ -638,7 +605,6 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("prefix_ns_number") public BigDecimal getPrefixNsNumber() { @@ -658,7 +624,6 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { @@ -678,7 +643,6 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("prefix_ns_boolean") public Boolean getPrefixNsBoolean() { @@ -706,7 +670,6 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_ns_array") public List getPrefixNsArray() { @@ -734,7 +697,6 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_ns_wrapped_array") public List getPrefixNsWrappedArray() { @@ -838,4 +800,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java index 6783b2a9a0f6..8e10cce9f85c 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -52,7 +52,7 @@ default AnotherFakeApiDelegate getDelegate() { ) default ResponseEntity call123testSpecialTags( - @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + @ApiParam(value = "client model", required = true) @RequestBody @NotNull @Valid Client body ) { return getDelegate().call123testSpecialTags(body); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java index c65599ac1f0f..30d20083fd41 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java @@ -60,7 +60,7 @@ default FakeApiDelegate getDelegate() { ) default ResponseEntity createXmlItem( - @ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem + @ApiParam(value = "XmlItem Body", required = true) @RequestBody @NotNull @Valid XmlItem xmlItem ) { return getDelegate().createXmlItem(xmlItem); } @@ -90,7 +90,7 @@ default ResponseEntity createXmlItem( ) default ResponseEntity fakeOuterBooleanSerialize( - @ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body + @ApiParam(value = "Input boolean as post body") @RequestBody(required = false) Boolean body ) { return getDelegate().fakeOuterBooleanSerialize(body); } @@ -120,7 +120,7 @@ default ResponseEntity fakeOuterBooleanSerialize( ) default ResponseEntity fakeOuterCompositeSerialize( - @ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body + @ApiParam(value = "Input composite as post body") @RequestBody(required = false) @Valid OuterComposite body ) { return getDelegate().fakeOuterCompositeSerialize(body); } @@ -150,7 +150,7 @@ default ResponseEntity fakeOuterCompositeSerialize( ) default ResponseEntity fakeOuterNumberSerialize( - @ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body + @ApiParam(value = "Input number as post body") @RequestBody(required = false) BigDecimal body ) { return getDelegate().fakeOuterNumberSerialize(body); } @@ -180,7 +180,7 @@ default ResponseEntity fakeOuterNumberSerialize( ) default ResponseEntity fakeOuterStringSerialize( - @ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body + @ApiParam(value = "Input string as post body") @RequestBody(required = false) String body ) { return getDelegate().fakeOuterStringSerialize(body); } @@ -209,7 +209,7 @@ default ResponseEntity fakeOuterStringSerialize( ) default ResponseEntity testBodyWithFileSchema( - @ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass body + @ApiParam(value = "", required = true) @RequestBody @NotNull @Valid FileSchemaTestClass body ) { return getDelegate().testBodyWithFileSchema(body); } @@ -238,8 +238,8 @@ default ResponseEntity testBodyWithFileSchema( ) default ResponseEntity testBodyWithQueryParams( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, - @ApiParam(value = "", required = true) @Valid @RequestBody User body + @ApiParam(value = "", required = true) @RequestParam(value = "query") @NotNull String query, + @ApiParam(value = "", required = true) @RequestBody @NotNull @Valid User body ) { return getDelegate().testBodyWithQueryParams(query, body); } @@ -270,7 +270,7 @@ default ResponseEntity testBodyWithQueryParams( ) default ResponseEntity testClientModel( - @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + @ApiParam(value = "client model", required = true) @RequestBody @NotNull @Valid Client body ) { return getDelegate().testClientModel(body); } @@ -317,20 +317,20 @@ default ResponseEntity testClientModel( ) default ResponseEntity testEndpointParameters( - @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "number", required = true) BigDecimal number, - @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "double", required = true) Double _double, - @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, - @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "byte", required = true) byte[] _byte, - @ApiParam(value = "None") @Valid @RequestParam(value = "integer", required = false) Integer integer, - @ApiParam(value = "None") @Valid @RequestParam(value = "int32", required = false) Integer int32, - @ApiParam(value = "None") @Valid @RequestParam(value = "int64", required = false) Long int64, - @ApiParam(value = "None") @Valid @RequestParam(value = "float", required = false) Float _float, - @ApiParam(value = "None") @Valid @RequestParam(value = "string", required = false) String string, + @ApiParam(value = "None", required = true) @RequestParam(value = "number") @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal number, + @ApiParam(value = "None", required = true) @RequestParam(value = "double") @NotNull @DecimalMin("67.8") @DecimalMax("123.4") Double _double, + @ApiParam(value = "None", required = true) @RequestParam(value = "pattern_without_delimiter") @NotNull @Pattern(regexp = "^[A-Z].*") String patternWithoutDelimiter, + @ApiParam(value = "None", required = true) @RequestParam(value = "byte") @NotNull byte[] _byte, + @ApiParam(value = "None") @RequestParam(value = "integer", required = false) @Min(10) @Max(100) Integer integer, + @ApiParam(value = "None") @RequestParam(value = "int32", required = false) @Min(20) @Max(200) Integer int32, + @ApiParam(value = "None") @RequestParam(value = "int64", required = false) Long int64, + @ApiParam(value = "None") @RequestParam(value = "float", required = false) @DecimalMax("987.6") Float _float, + @ApiParam(value = "None") @RequestParam(value = "string", required = false) @Pattern(regexp = "/[a-z]/i") String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @ApiParam(value = "None") @Valid @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, - @ApiParam(value = "None") @Valid @RequestParam(value = "password", required = false) String password, - @ApiParam(value = "None") @Valid @RequestParam(value = "callback", required = false) String paramCallback + @ApiParam(value = "None") @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @RequestParam(value = "password", required = false) @Size(min = 10, max = 64) String password, + @ApiParam(value = "None") @RequestParam(value = "callback", required = false) String paramCallback ) { return getDelegate().testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); } @@ -368,14 +368,14 @@ default ResponseEntity testEndpointParameters( ) default ResponseEntity testEnumParameters( - @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, - @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, - @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, - @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, - @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString + @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestParam(value = "enum_form_string", required = false) String enumFormString ) { return getDelegate().testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } @@ -408,12 +408,12 @@ default ResponseEntity testEnumParameters( ) default ResponseEntity testGroupParameters( - @NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @ApiParam(value = "Required String in group parameters", required = true) @RequestParam(value = "required_string_group") @NotNull Integer requiredStringGroup, @NotNull @ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, - @NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, - @ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup, + @ApiParam(value = "Required Integer in group parameters", required = true) @RequestParam(value = "required_int64_group") @NotNull Long requiredInt64Group, + @ApiParam(value = "String in group parameters") @RequestParam(value = "string_group", required = false) Integer stringGroup, @ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup, - @ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + @ApiParam(value = "Integer in group parameters") @RequestParam(value = "int64_group", required = false) Long int64Group ) { return getDelegate().testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); } @@ -441,7 +441,7 @@ default ResponseEntity testGroupParameters( ) default ResponseEntity testInlineAdditionalProperties( - @ApiParam(value = "request body", required = true) @Valid @RequestBody Map param + @ApiParam(value = "request body", required = true) @RequestBody @NotNull Map param ) { return getDelegate().testInlineAdditionalProperties(param); } @@ -470,8 +470,8 @@ default ResponseEntity testInlineAdditionalProperties( ) default ResponseEntity testJsonFormData( - @ApiParam(value = "field1", required = true) @Valid @RequestParam(value = "param", required = true) String param, - @ApiParam(value = "field2", required = true) @Valid @RequestParam(value = "param2", required = true) String param2 + @ApiParam(value = "field1", required = true) @RequestParam(value = "param") @NotNull String param, + @ApiParam(value = "field2", required = true) @RequestParam(value = "param2") @NotNull String param2 ) { return getDelegate().testJsonFormData(param, param2); } @@ -503,11 +503,11 @@ default ResponseEntity testJsonFormData( ) default ResponseEntity testQueryParameterCollectionFormat( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + @ApiParam(value = "", required = true) @RequestParam(value = "pipe") @NotNull List pipe, + @ApiParam(value = "", required = true) @RequestParam(value = "ioutil") @NotNull List ioutil, + @ApiParam(value = "", required = true) @RequestParam(value = "http") @NotNull List http, + @ApiParam(value = "", required = true) @RequestParam(value = "url") @NotNull List url, + @ApiParam(value = "", required = true) @RequestParam(value = "context") @NotNull List context ) { return getDelegate().testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); } @@ -545,9 +545,9 @@ default ResponseEntity testQueryParameterCollectionFormat( ) default ResponseEntity uploadFileWithRequiredFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, - @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, - @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") @NotNull Long petId, + @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile") MultipartFile requiredFile, + @ApiParam(value = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata ) { return getDelegate().uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApiDelegate.java index 765b676b22d7..b5410ffa5d36 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -214,14 +214,14 @@ default ResponseEntity testEndpointParameters(BigDecimal number, * or Not found (status code 404) * @see FakeApi#testEnumParameters */ - default ResponseEntity testEnumParameters(List enumHeaderStringArray, - String enumHeaderString, - List enumQueryStringArray, - String enumQueryString, - Integer enumQueryInteger, - Double enumQueryDouble, - List enumFormStringArray, - String enumFormString) { + default ResponseEntity testEnumParameters(List enumHeaderStringArray, + EnumHeaderStringEnum enumHeaderString, + List enumQueryStringArray, + EnumQueryStringEnum enumQueryString, + EnumQueryIntegerEnum enumQueryInteger, + EnumQueryDoubleEnum enumQueryDouble, + List enumFormStringArray, + EnumFormStringEnum enumFormString) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 54f7e15717dd..6f363a4be5b1 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -55,7 +55,7 @@ default FakeClassnameTestApiDelegate getDelegate() { ) default ResponseEntity testClassname( - @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + @ApiParam(value = "client model", required = true) @RequestBody @NotNull @Valid Client body ) { return getDelegate().testClassname(body); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java index 7210e083b5c3..cc71882c955e 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java @@ -60,7 +60,7 @@ default PetApiDelegate getDelegate() { ) default ResponseEntity addPet( - @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet body ) { return getDelegate().addPet(body); } @@ -96,7 +96,7 @@ default ResponseEntity addPet( ) default ResponseEntity deletePet( - @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") @NotNull Long petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey ) { return getDelegate().deletePet(petId, apiKey); @@ -117,7 +117,7 @@ default ResponseEntity deletePet( nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, - responseContainer = "List", + responseContainer = "array", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @@ -126,7 +126,7 @@ default ResponseEntity deletePet( } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "array"), @ApiResponse(code = 400, message = "Invalid status value") }) @RequestMapping( @@ -136,7 +136,7 @@ default ResponseEntity deletePet( ) default ResponseEntity> findPetsByStatus( - @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status, + @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @RequestParam(value = "status") @NotNull List status, @ApiIgnore final Pageable pageable ) { return getDelegate().findPetsByStatus(status, pageable); @@ -159,7 +159,7 @@ default ResponseEntity> findPetsByStatus( nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, - responseContainer = "List", + responseContainer = "array", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @@ -168,7 +168,7 @@ default ResponseEntity> findPetsByStatus( } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "array"), @ApiResponse(code = 400, message = "Invalid tag value") }) @RequestMapping( @@ -178,7 +178,7 @@ default ResponseEntity> findPetsByStatus( ) default ResponseEntity> findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, + @ApiParam(value = "Tags to filter by", required = true) @RequestParam(value = "tags") @NotNull List tags, @ApiIgnore final Pageable pageable ) { return getDelegate().findPetsByTags(tags, pageable); @@ -216,7 +216,7 @@ default ResponseEntity> findPetsByTags( ) default ResponseEntity getPetById( - @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") @NotNull Long petId ) { return getDelegate().getPetById(petId); } @@ -234,7 +234,7 @@ default ResponseEntity getPetById( nickname = "listAllPets", notes = "", response = Pet.class, - responseContainer = "List", + responseContainer = "array", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @@ -243,7 +243,7 @@ default ResponseEntity getPetById( } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "array"), @ApiResponse(code = 400, message = "Invalid status value") }) @RequestMapping( @@ -293,7 +293,7 @@ default ResponseEntity> listAllPets( ) default ResponseEntity updatePet( - @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet body ) { return getDelegate().updatePet(body); } @@ -329,9 +329,9 @@ default ResponseEntity updatePet( ) default ResponseEntity updatePetWithForm( - @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, - @ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, - @ApiParam(value = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status + @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") @NotNull Long petId, + @ApiParam(value = "Updated name of the pet") @RequestParam(value = "name", required = false) String name, + @ApiParam(value = "Updated status of the pet") @RequestParam(value = "status", required = false) String status ) { return getDelegate().updatePetWithForm(petId, name, status); } @@ -369,8 +369,8 @@ default ResponseEntity updatePetWithForm( ) default ResponseEntity uploadFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, - @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") @NotNull Long petId, + @ApiParam(value = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) { return getDelegate().uploadFile(petId, additionalMetadata, file); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApiDelegate.java index 581d4d096b2c..27ad98451a34 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -65,7 +65,7 @@ default ResponseEntity deletePet(Long petId, * or Invalid status value (status code 400) * @see PetApi#findPetsByStatus */ - default ResponseEntity> findPetsByStatus(List status, final Pageable pageable) { + default ResponseEntity> findPetsByStatus(List status, final Pageable pageable) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApi.java index b09e8bf3a73b..151811e3cfb5 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApi.java @@ -52,7 +52,7 @@ default StoreApiDelegate getDelegate() { ) default ResponseEntity deleteOrder( - @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") @NotNull String orderId ) { return getDelegate().deleteOrder(orderId); } @@ -70,13 +70,13 @@ default ResponseEntity deleteOrder( nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, - responseContainer = "Map", + responseContainer = "map", authorizations = { @Authorization(value = "api_key") } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "map") }) @RequestMapping( method = RequestMethod.GET, @@ -119,7 +119,7 @@ default ResponseEntity> getInventory( ) default ResponseEntity getOrderById( - @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") @NotNull @Min(1L) @Max(5L) Long orderId ) { return getDelegate().getOrderById(orderId); } @@ -150,7 +150,7 @@ default ResponseEntity getOrderById( ) default ResponseEntity placeOrder( - @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body + @ApiParam(value = "order placed for purchasing the pet", required = true) @RequestBody @NotNull @Valid Order body ) { return getDelegate().placeOrder(body); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java index 4df5fcd31006..37140fc708bb 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java @@ -50,7 +50,7 @@ default UserApiDelegate getDelegate() { ) default ResponseEntity createUser( - @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body + @ApiParam(value = "Created user object", required = true) @RequestBody @NotNull @Valid User body ) { return getDelegate().createUser(body); } @@ -77,7 +77,7 @@ default ResponseEntity createUser( ) default ResponseEntity createUsersWithArrayInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@Valid User> body + @ApiParam(value = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> body ) { return getDelegate().createUsersWithArrayInput(body); } @@ -104,7 +104,7 @@ default ResponseEntity createUsersWithArrayInput( ) default ResponseEntity createUsersWithListInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@Valid User> body + @ApiParam(value = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> body ) { return getDelegate().createUsersWithListInput(body); } @@ -134,7 +134,7 @@ default ResponseEntity createUsersWithListInput( ) default ResponseEntity deleteUser( - @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") @NotNull String username ) { return getDelegate().deleteUser(username); } @@ -167,7 +167,7 @@ default ResponseEntity deleteUser( ) default ResponseEntity getUserByName( - @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") @NotNull String username ) { return getDelegate().getUserByName(username); } @@ -199,8 +199,8 @@ default ResponseEntity getUserByName( ) default ResponseEntity loginUser( - @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, - @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + @ApiParam(value = "The user name for login", required = true) @RequestParam(value = "username") @NotNull String username, + @ApiParam(value = "The password for login in clear text", required = true) @RequestParam(value = "password") @NotNull String password ) { return getDelegate().loginUser(username, password); } @@ -257,8 +257,8 @@ default ResponseEntity logoutUser( ) default ResponseEntity updateUser( - @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, - @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body + @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") @NotNull String username, + @ApiParam(value = "Updated user object", required = true) @RequestBody @NotNull @Valid User body ) { return getDelegate().updateUser(username, body); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApiDelegate.java index afb7d195cbdd..b65748c56fac 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApiDelegate.java @@ -46,7 +46,7 @@ default ResponseEntity createUser(User body) { * @return successful operation (status code 200) * @see UserApi#createUsersWithArrayInput */ - default ResponseEntity createUsersWithArrayInput(List<@Valid User> body) { + default ResponseEntity createUsersWithArrayInput(List body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -58,7 +58,7 @@ default ResponseEntity createUsersWithArrayInput(List<@Valid User> body) { * @return successful operation (status code 200) * @see UserApi#createUsersWithListInput */ - default ResponseEntity createUsersWithListInput(List<@Valid User> body) { + default ResponseEntity createUsersWithListInput(List body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/VersioningApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/VersioningApi.java index e45c6d4dda7f..4b558dd1fe88 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/VersioningApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/VersioningApi.java @@ -55,7 +55,7 @@ default VersioningApiDelegate getDelegate() { ) default ResponseEntity versioningHeaders( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") @NotNull Long petId ) { return getDelegate().versioningHeaders(petId); } @@ -92,9 +92,9 @@ default ResponseEntity versioningHeaders( ) default ResponseEntity versioningMix( - @NotNull @ApiParam(value = "", required = true, defaultValue = "V1") @Valid @RequestParam(value = "VersionWithDefaultValueQuery", required = true, defaultValue = "V1") String versionWithDefaultValueQuery, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "VersionNoDefaultValueQuery", required = true) String versionNoDefaultValueQuery, - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + @ApiParam(value = "", required = true, defaultValue = "V1") @RequestParam(value = "VersionWithDefaultValueQuery", defaultValue = "V1") @NotNull String versionWithDefaultValueQuery, + @ApiParam(value = "", required = true) @RequestParam(value = "VersionNoDefaultValueQuery") @NotNull String versionNoDefaultValueQuery, + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") @NotNull Long petId ) { return getDelegate().versioningMix(versionWithDefaultValueQuery, versionNoDefaultValueQuery, petId); } @@ -126,9 +126,9 @@ default ResponseEntity versioningMix( ) default ResponseEntity versioningQueryParams( - @NotNull @ApiParam(value = "", required = true, defaultValue = "V1") @Valid @RequestParam(value = "VersionWithDefaultValue", required = true, defaultValue = "V1") String versionWithDefaultValue, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "VersionNoDefaultValue", required = true) String versionNoDefaultValue, - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + @ApiParam(value = "", required = true, defaultValue = "V1") @RequestParam(value = "VersionWithDefaultValue", defaultValue = "V1") @NotNull String versionWithDefaultValue, + @ApiParam(value = "", required = true) @RequestParam(value = "VersionNoDefaultValue") @NotNull String versionNoDefaultValue, + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") @NotNull Long petId ) { return getDelegate().versioningQueryParams(versionWithDefaultValue, versionNoDefaultValue, petId); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index cf57def58490..291e57234974 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -37,7 +37,6 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index dc535ab3e476..f3b2cfe986ca 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -38,7 +38,6 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -126,4 +125,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 4d4bef3fde91..79708a257b1e 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -37,7 +37,6 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 319f2c34510c..cf551ec164f3 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -26,28 +26,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class AdditionalPropertiesClass { - @Valid private Map mapString = new HashMap<>(); - @Valid private Map mapNumber = new HashMap<>(); - @Valid private Map mapInteger = new HashMap<>(); - @Valid private Map mapBoolean = new HashMap<>(); - @Valid private Map> mapArrayInteger = new HashMap<>(); - @Valid private Map> mapArrayAnytype = new HashMap<>(); - @Valid private Map> mapMapString = new HashMap<>(); - @Valid private Map> mapMapAnytype = new HashMap<>(); private Object anytype1; @@ -73,7 +65,6 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ - @ApiModelProperty(value = "") @JsonProperty("map_string") public Map getMapString() { @@ -101,7 +92,6 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("map_number") public Map getMapNumber() { @@ -129,7 +119,6 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ - @ApiModelProperty(value = "") @JsonProperty("map_integer") public Map getMapInteger() { @@ -157,7 +146,6 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ - @ApiModelProperty(value = "") @JsonProperty("map_boolean") public Map getMapBoolean() { @@ -185,7 +173,6 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { @@ -213,7 +200,6 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ - @Valid @ApiModelProperty(value = "") @JsonProperty("map_array_anytype") public Map> getMapArrayAnytype() { @@ -241,7 +227,6 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { @@ -269,7 +254,6 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { @@ -289,7 +273,6 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ - @ApiModelProperty(value = "") @JsonProperty("anytype_1") public Object getAnytype1() { @@ -309,7 +292,6 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ - @ApiModelProperty(value = "") @JsonProperty("anytype_2") public Object getAnytype2() { @@ -329,7 +311,6 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ - @ApiModelProperty(value = "") @JsonProperty("anytype_3") public Object getAnytype3() { @@ -397,4 +378,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index e8e32dcd7fa9..f12948a1c898 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -37,7 +37,6 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 50fa525424d3..f31c0d0cd9b2 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -38,7 +38,6 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -126,4 +125,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index b2ca3bf5cb02..98e9b7b1a12a 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -38,7 +38,6 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -126,4 +125,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 7e085a44c93d..822b5e79b89f 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -37,7 +37,6 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Animal.java index ee575e5ad547..c947edd67ac9 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Animal.java @@ -35,7 +35,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class Animal { - private String className; + private @NotNull String className; private String color = "red"; @@ -59,10 +59,9 @@ public Animal className(String className) { * Get className * @return className */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("className") - public String getClassName() { + public @NotNull String getClassName() { return className; } @@ -79,7 +78,6 @@ public Animal color(String color) { * Get color * @return color */ - @ApiModelProperty(value = "") @JsonProperty("color") public String getColor() { @@ -129,4 +127,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 621c01be49ce..249d0bc72466 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnly { - @Valid private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { @@ -46,7 +45,6 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("ArrayArrayNumber") public List> getArrayArrayNumber() { @@ -94,4 +92,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 3f519bbb9baa..58b3ee1a3bcf 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayOfNumberOnly { - @Valid private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnly arrayNumber(List arrayNumber) { @@ -46,7 +45,6 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("ArrayNumber") public List getArrayNumber() { @@ -94,4 +92,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayTest.java index 382556e65bd6..20402ebb213f 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayTest.java @@ -26,13 +26,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayTest { - @Valid private List arrayOfString = new ArrayList<>(); - @Valid private List> arrayArrayOfInteger = new ArrayList<>(); - @Valid private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTest arrayOfString(List arrayOfString) { @@ -52,7 +49,6 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ - @ApiModelProperty(value = "") @JsonProperty("array_of_string") public List getArrayOfString() { @@ -80,7 +76,6 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ - @Valid @ApiModelProperty(value = "") @JsonProperty("array_array_of_integer") public List> getArrayArrayOfInteger() { @@ -91,12 +86,12 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } - public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) { + public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { if (this.arrayArrayOfModel == null) { this.arrayArrayOfModel = new ArrayList<>(); } @@ -108,14 +103,13 @@ public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayO * Get arrayArrayOfModel * @return arrayArrayOfModel */ - @Valid @ApiModelProperty(value = "") @JsonProperty("array_array_of_model") public List> getArrayArrayOfModel() { return arrayArrayOfModel; } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { + public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } @@ -160,4 +154,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Capitalization.java index d6e8a694cf85..f9226321c070 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Capitalization.java @@ -43,7 +43,6 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ - @ApiModelProperty(value = "") @JsonProperty("smallCamel") public String getSmallCamel() { @@ -63,7 +62,6 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ - @ApiModelProperty(value = "") @JsonProperty("CapitalCamel") public String getCapitalCamel() { @@ -83,7 +81,6 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ - @ApiModelProperty(value = "") @JsonProperty("small_Snake") public String getSmallSnake() { @@ -103,7 +100,6 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ - @ApiModelProperty(value = "") @JsonProperty("Capital_Snake") public String getCapitalSnake() { @@ -123,7 +119,6 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ - @ApiModelProperty(value = "") @JsonProperty("SCA_ETH_Flow_Points") public String getScAETHFlowPoints() { @@ -143,7 +138,6 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ - @ApiModelProperty(value = "Name of the pet ") @JsonProperty("ATT_NAME") public String getATTNAME() { @@ -201,4 +195,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Cat.java index f8562653ff90..7276dc5aa48c 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Cat.java @@ -49,7 +49,6 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ - @ApiModelProperty(value = "") @JsonProperty("declawed") public Boolean getDeclawed() { @@ -109,4 +108,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Category.java index a7d5b6e5916d..04e9b386ebbe 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Category.java @@ -24,7 +24,7 @@ public class Category { private Long id; - private String name = "default-name"; + private @NotNull String name = "default-name"; public Category() { super(); @@ -46,7 +46,6 @@ public Category id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -66,10 +65,9 @@ public Category name(String name) { * Get name * @return name */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -116,4 +114,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ClassModel.java index 56aeaf340f38..508e179a1a9e 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ClassModel.java @@ -34,7 +34,6 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @ApiModelProperty(value = "") @JsonProperty("_class") public String getPropertyClass() { @@ -82,4 +81,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Client.java index 23491ea29e60..0463c48505d8 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Client.java @@ -33,7 +33,6 @@ public Client client(String client) { * Get client * @return client */ - @ApiModelProperty(value = "") @JsonProperty("client") public String getClient() { @@ -81,4 +80,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Dog.java index bef3e5409a8e..d4656db2ef88 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Dog.java @@ -49,7 +49,6 @@ public Dog breed(String breed) { * Get breed * @return breed */ - @ApiModelProperty(value = "") @JsonProperty("breed") public String getBreed() { @@ -109,4 +108,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumArrays.java index 5bed35014d25..4a80b3b0ffe9 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumArrays.java @@ -61,7 +61,7 @@ public static JustSymbolEnum fromValue(String value) { } } - private JustSymbolEnum justSymbol; + private String justSymbol; /** * Gets or Sets arrayEnum @@ -98,8 +98,7 @@ public static ArrayEnumEnum fromValue(String value) { } } - @Valid - private List arrayEnum = new ArrayList<>(); + private List arrayEnum = new ArrayList<>(); public EnumArrays justSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; @@ -110,10 +109,9 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ - @ApiModelProperty(value = "") @JsonProperty("just_symbol") - public JustSymbolEnum getJustSymbol() { + public String getJustSymbol() { return justSymbol; } @@ -138,10 +136,9 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ - @ApiModelProperty(value = "") @JsonProperty("array_enum") - public List getArrayEnum() { + public List getArrayEnum() { return arrayEnum; } @@ -188,4 +185,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumTest.java index 2865d76ab8bf..8e3d8978857c 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumTest.java @@ -63,7 +63,7 @@ public static EnumStringEnum fromValue(String value) { } } - private EnumStringEnum enumString; + private String enumString; /** * Gets or Sets enumStringRequired @@ -102,7 +102,7 @@ public static EnumStringRequiredEnum fromValue(String value) { } } - private EnumStringRequiredEnum enumStringRequired; + private @NotNull String enumStringRequired; /** * Gets or Sets enumInteger @@ -139,7 +139,7 @@ public static EnumIntegerEnum fromValue(Integer value) { } } - private EnumIntegerEnum enumInteger; + private Integer enumInteger; /** * Gets or Sets enumNumber @@ -176,7 +176,7 @@ public static EnumNumberEnum fromValue(Double value) { } } - private EnumNumberEnum enumNumber; + private Double enumNumber; private OuterEnum outerEnum; @@ -200,10 +200,9 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ - @ApiModelProperty(value = "") @JsonProperty("enum_string") - public EnumStringEnum getEnumString() { + public String getEnumString() { return enumString; } @@ -220,10 +219,9 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("enum_string_required") - public EnumStringRequiredEnum getEnumStringRequired() { + public @NotNull String getEnumStringRequired() { return enumStringRequired; } @@ -240,10 +238,9 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ - @ApiModelProperty(value = "") @JsonProperty("enum_integer") - public EnumIntegerEnum getEnumInteger() { + public Integer getEnumInteger() { return enumInteger; } @@ -260,10 +257,9 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ - @ApiModelProperty(value = "") @JsonProperty("enum_number") - public EnumNumberEnum getEnumNumber() { + public Double getEnumNumber() { return enumNumber; } @@ -280,7 +276,6 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ - @Valid @ApiModelProperty(value = "") @JsonProperty("outerEnum") public OuterEnum getOuterEnum() { @@ -336,4 +331,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/File.java index 6e16961c2d2f..cd9f95a6f91c 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/File.java @@ -34,7 +34,6 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ - @ApiModelProperty(value = "Test capitalization") @JsonProperty("sourceURI") public String getSourceURI() { @@ -82,4 +81,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 9a40dbd168af..0c2d51df5822 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -26,9 +26,8 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class FileSchemaTestClass { - private File file; + private @Valid File file; - @Valid private List<@Valid File> files = new ArrayList<>(); public FileSchemaTestClass file(File file) { @@ -40,10 +39,9 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ - @Valid @ApiModelProperty(value = "") @JsonProperty("file") - public File getFile() { + public @Valid File getFile() { return file; } @@ -51,7 +49,7 @@ public void setFile(File file) { this.file = file; } - public FileSchemaTestClass files(List<@Valid File> files) { + public FileSchemaTestClass files(List files) { this.files = files; return this; } @@ -68,14 +66,13 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ - @Valid @ApiModelProperty(value = "") @JsonProperty("files") public List<@Valid File> getFiles() { return files; } - public void setFiles(List<@Valid File> files) { + public void setFiles(List files) { this.files = files; } @@ -118,4 +115,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FormatTest.java index fda969ad06d3..fa150f1fa069 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FormatTest.java @@ -30,33 +30,33 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class FormatTest { - private Integer integer; + private @Min(10) @Max(100) Integer integer; - private Integer int32; + private @Min(20) @Max(200) Integer int32; private Long int64; - private BigDecimal number; + private @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal number; - private Float _float; + private @DecimalMin("54.3") @DecimalMax("987.6") Float _float; - private Double _double; + private @DecimalMin("67.8") @DecimalMax("123.4") Double _double; - private String string; + private @Pattern(regexp = "/[a-z]/i") String string; - private byte[] _byte; + private @NotNull byte[] _byte; private org.springframework.core.io.Resource binary; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) - private LocalDate date; + private @NotNull LocalDate date; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; private UUID uuid; - private String password; + private @NotNull @Size(min = 10, max = 64) String password; private BigDecimal bigDecimal; @@ -85,10 +85,9 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ - @Min(10) @Max(100) @ApiModelProperty(value = "") @JsonProperty("integer") - public Integer getInteger() { + public @Min(10) @Max(100) Integer getInteger() { return integer; } @@ -107,10 +106,9 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ - @Min(20) @Max(200) @ApiModelProperty(value = "") @JsonProperty("int32") - public Integer getInt32() { + public @Min(20) @Max(200) Integer getInt32() { return int32; } @@ -127,7 +125,6 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ - @ApiModelProperty(value = "") @JsonProperty("int64") public Long getInt64() { @@ -149,10 +146,9 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ - @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(required = true, value = "") @JsonProperty("number") - public BigDecimal getNumber() { + public @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal getNumber() { return number; } @@ -171,10 +167,9 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ - @DecimalMin("54.3") @DecimalMax("987.6") @ApiModelProperty(value = "") @JsonProperty("float") - public Float getFloat() { + public @DecimalMin("54.3") @DecimalMax("987.6") Float getFloat() { return _float; } @@ -193,10 +188,9 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ - @DecimalMin("67.8") @DecimalMax("123.4") @ApiModelProperty(value = "") @JsonProperty("double") - public Double getDouble() { + public @DecimalMin("67.8") @DecimalMax("123.4") Double getDouble() { return _double; } @@ -213,10 +207,9 @@ public FormatTest string(String string) { * Get string * @return string */ - @Pattern(regexp = "/[a-z]/i") @ApiModelProperty(value = "") @JsonProperty("string") - public String getString() { + public @Pattern(regexp = "/[a-z]/i") String getString() { return string; } @@ -233,10 +226,9 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("byte") - public byte[] getByte() { + public @NotNull byte[] getByte() { return _byte; } @@ -253,7 +245,6 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ - @Valid @ApiModelProperty(value = "") @JsonProperty("binary") public org.springframework.core.io.Resource getBinary() { @@ -273,10 +264,9 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ - @NotNull @Valid @ApiModelProperty(required = true, value = "") @JsonProperty("date") - public LocalDate getDate() { + public @NotNull LocalDate getDate() { return date; } @@ -293,7 +283,6 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ - @Valid @ApiModelProperty(value = "") @JsonProperty("dateTime") public OffsetDateTime getDateTime() { @@ -313,7 +302,6 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ - @Valid @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") @JsonProperty("uuid") public UUID getUuid() { @@ -333,10 +321,9 @@ public FormatTest password(String password) { * Get password * @return password */ - @NotNull @Size(min = 10, max = 64) @ApiModelProperty(required = true, value = "") @JsonProperty("password") - public String getPassword() { + public @NotNull @Size(min = 10, max = 64) String getPassword() { return password; } @@ -353,7 +340,6 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ - @Valid @ApiModelProperty(value = "") @JsonProperty("BigDecimal") public BigDecimal getBigDecimal() { @@ -427,4 +413,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 27ea04eaa86c..628772ab47fe 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -37,7 +37,6 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("bar") public String getBar() { @@ -57,7 +56,6 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("foo") public String getFoo() { @@ -107,4 +105,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/MapTest.java index bd3eea6e64df..a060e9d647a7 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/MapTest.java @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class MapTest { - @Valid private Map> mapMapOfString = new HashMap<>(); /** @@ -63,13 +62,10 @@ public static InnerEnum fromValue(String value) { } } - @Valid - private Map mapOfEnumString = new HashMap<>(); + private Map mapOfEnumString = new HashMap<>(); - @Valid private Map directMap = new HashMap<>(); - @Valid private Map indirectMap = new HashMap<>(); public MapTest mapMapOfString(Map> mapMapOfString) { @@ -89,7 +85,6 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ - @Valid @ApiModelProperty(value = "") @JsonProperty("map_map_of_string") public Map> getMapMapOfString() { @@ -117,10 +112,9 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ - @ApiModelProperty(value = "") @JsonProperty("map_of_enum_string") - public Map getMapOfEnumString() { + public Map getMapOfEnumString() { return mapOfEnumString; } @@ -145,7 +139,6 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ - @ApiModelProperty(value = "") @JsonProperty("direct_map") public Map getDirectMap() { @@ -173,7 +166,6 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ - @ApiModelProperty(value = "") @JsonProperty("indirect_map") public Map getIndirectMap() { @@ -227,4 +219,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index b16370183e0a..0ecca046c869 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -33,8 +33,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; - @Valid - private Map map = new HashMap<>(); + private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { this.uuid = uuid; @@ -45,7 +44,6 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ - @Valid @ApiModelProperty(value = "") @JsonProperty("uuid") public UUID getUuid() { @@ -65,7 +63,6 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ - @Valid @ApiModelProperty(value = "") @JsonProperty("dateTime") public OffsetDateTime getDateTime() { @@ -93,10 +90,9 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ - @Valid @ApiModelProperty(value = "") @JsonProperty("map") - public Map getMap() { + public Map getMap() { return map; } @@ -145,4 +141,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Model200Response.java index 4922749da22c..6f4b8460e6f4 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Model200Response.java @@ -38,7 +38,6 @@ public Model200Response name(Integer name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public Integer getName() { @@ -58,7 +57,6 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @ApiModelProperty(value = "") @JsonProperty("class") public String getPropertyClass() { @@ -108,4 +106,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelApiResponse.java index 21244266ad17..31642652231b 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -39,7 +39,6 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @ApiModelProperty(value = "") @JsonProperty("code") public Integer getCode() { @@ -59,7 +58,6 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @ApiModelProperty(value = "") @JsonProperty("type") public String getType() { @@ -79,7 +77,6 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @ApiModelProperty(value = "") @JsonProperty("message") public String getMessage() { @@ -131,4 +128,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelList.java index d3d66db5c095..b9dc65977c53 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelList.java @@ -35,7 +35,6 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ - @ApiModelProperty(value = "") @JsonProperty("123-list") public String get123list() { @@ -83,4 +82,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelReturn.java index 2c8a25a4d85f..72d78cb7fc0b 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelReturn.java @@ -36,7 +36,6 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ - @ApiModelProperty(value = "") @JsonProperty("return") public Integer getReturn() { @@ -84,4 +83,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Name.java index 420c565a9955..f42d379c1083 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Name.java @@ -23,7 +23,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class Name { - private Integer name; + private @NotNull Integer name; private Integer snakeCase; @@ -51,10 +51,9 @@ public Name name(Integer name) { * Get name * @return name */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("name") - public Integer getName() { + public @NotNull Integer getName() { return name; } @@ -71,7 +70,6 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("snake_case") public Integer getSnakeCase() { @@ -91,7 +89,6 @@ public Name property(String property) { * Get property * @return property */ - @ApiModelProperty(value = "") @JsonProperty("property") public String getProperty() { @@ -111,7 +108,6 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("123Number") public Integer get123number() { @@ -165,4 +161,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/NumberOnly.java index 69de58b11374..eb57c97846a2 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/NumberOnly.java @@ -34,7 +34,6 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("JustNumber") public BigDecimal getJustNumber() { @@ -82,4 +81,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Order.java index 48932f68f862..6b84d7a0c4b4 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Order.java @@ -71,7 +71,7 @@ public static StatusEnum fromValue(String value) { } } - private StatusEnum status; + private String status; private Boolean complete = false; @@ -84,7 +84,6 @@ public Order id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -104,7 +103,6 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @ApiModelProperty(value = "") @JsonProperty("petId") public Long getPetId() { @@ -124,7 +122,6 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @ApiModelProperty(value = "") @JsonProperty("quantity") public Integer getQuantity() { @@ -144,7 +141,6 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Valid @ApiModelProperty(value = "") @JsonProperty("shipDate") public OffsetDateTime getShipDate() { @@ -164,10 +160,9 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @ApiModelProperty(value = "Order Status") @JsonProperty("status") - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -184,7 +179,6 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @ApiModelProperty(value = "") @JsonProperty("complete") public Boolean getComplete() { @@ -242,4 +236,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/OuterComposite.java index 2e78c0586cab..2bfc1db21bb2 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/OuterComposite.java @@ -38,7 +38,6 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("my_number") public BigDecimal getMyNumber() { @@ -58,7 +57,6 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ - @ApiModelProperty(value = "") @JsonProperty("my_string") public String getMyString() { @@ -78,7 +76,6 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ - @ApiModelProperty(value = "") @JsonProperty("my_boolean") public Boolean getMyBoolean() { @@ -130,4 +127,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Pet.java index 19339f6c434e..2467fdb92615 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Pet.java @@ -30,14 +30,12 @@ public class Pet { private Long id; - private Category category; + private @Valid Category category; - private String name; + private @NotNull String name; - @Valid - private List photoUrls = new ArrayList<>(); + private @NotNull List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** @@ -77,7 +75,7 @@ public static StatusEnum fromValue(String value) { } } - private StatusEnum status; + private String status; public Pet() { super(); @@ -100,7 +98,6 @@ public Pet id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -120,10 +117,9 @@ public Pet category(Category category) { * Get category * @return category */ - @Valid @ApiModelProperty(value = "") @JsonProperty("category") - public Category getCategory() { + public @Valid Category getCategory() { return category; } @@ -140,10 +136,9 @@ public Pet name(String name) { * Get name * @return name */ - @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -168,10 +163,9 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("photoUrls") - public List getPhotoUrls() { + public @NotNull List getPhotoUrls() { return photoUrls; } @@ -179,7 +173,7 @@ public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List<@Valid Tag> tags) { + public Pet tags(List tags) { this.tags = tags; return this; } @@ -196,14 +190,13 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Valid @ApiModelProperty(value = "") @JsonProperty("tags") public List<@Valid Tag> getTags() { return tags; } - public void setTags(List<@Valid Tag> tags) { + public void setTags(List tags) { this.tags = tags; } @@ -216,10 +209,9 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ - @ApiModelProperty(value = "pet status in the store") @JsonProperty("status") - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -274,4 +266,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 9388f3cfd29f..1eee9577a877 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -35,7 +35,6 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("bar") public String getBar() { @@ -55,7 +54,6 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ - @ApiModelProperty(value = "") @JsonProperty("baz") public String getBaz() { @@ -105,4 +103,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/SpecialModelName.java index 6d6d8e261c74..d4296422472e 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/SpecialModelName.java @@ -35,7 +35,6 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ - @ApiModelProperty(value = "") @JsonProperty("$special[property.name]") public Long get$SpecialPropertyName() { @@ -83,4 +82,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Tag.java index 850c68911db4..d3778890e2d6 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Tag.java @@ -35,7 +35,6 @@ public Tag id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -55,7 +54,6 @@ public Tag name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -105,4 +103,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderDefault.java index a0fe16145d30..6b0e966ec471 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -26,16 +26,15 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class TypeHolderDefault { - private String stringItem = "what"; + private @NotNull String stringItem = "what"; - private BigDecimal numberItem; + private @NotNull BigDecimal numberItem; - private Integer integerItem; + private @NotNull Integer integerItem; - private Boolean boolItem = true; + private @NotNull Boolean boolItem = true; - @Valid - private List arrayItem = new ArrayList<>(); + private @NotNull List arrayItem = new ArrayList<>(); public TypeHolderDefault() { super(); @@ -61,10 +60,9 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("string_item") - public String getStringItem() { + public @NotNull String getStringItem() { return stringItem; } @@ -81,10 +79,9 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @NotNull @Valid @ApiModelProperty(required = true, value = "") @JsonProperty("number_item") - public BigDecimal getNumberItem() { + public @NotNull BigDecimal getNumberItem() { return numberItem; } @@ -101,10 +98,9 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("integer_item") - public Integer getIntegerItem() { + public @NotNull Integer getIntegerItem() { return integerItem; } @@ -121,10 +117,9 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("bool_item") - public Boolean getBoolItem() { + public @NotNull Boolean getBoolItem() { return boolItem; } @@ -149,10 +144,9 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("array_item") - public List getArrayItem() { + public @NotNull List getArrayItem() { return arrayItem; } @@ -205,4 +199,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderExample.java index 909dc1e7fe60..e9b3492a4684 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -26,18 +26,17 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class TypeHolderExample { - private String stringItem; + private @NotNull String stringItem; - private BigDecimal numberItem; + private @NotNull BigDecimal numberItem; - private Float floatItem; + private @NotNull Float floatItem; - private Integer integerItem; + private @NotNull Integer integerItem; - private Boolean boolItem; + private @NotNull Boolean boolItem; - @Valid - private List arrayItem = new ArrayList<>(); + private @NotNull List arrayItem = new ArrayList<>(); public TypeHolderExample() { super(); @@ -64,10 +63,9 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @NotNull @ApiModelProperty(example = "what", required = true, value = "") @JsonProperty("string_item") - public String getStringItem() { + public @NotNull String getStringItem() { return stringItem; } @@ -84,10 +82,9 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @NotNull @Valid @ApiModelProperty(example = "1.234", required = true, value = "") @JsonProperty("number_item") - public BigDecimal getNumberItem() { + public @NotNull BigDecimal getNumberItem() { return numberItem; } @@ -104,10 +101,9 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ - @NotNull @ApiModelProperty(example = "1.234", required = true, value = "") @JsonProperty("float_item") - public Float getFloatItem() { + public @NotNull Float getFloatItem() { return floatItem; } @@ -124,10 +120,9 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @NotNull @ApiModelProperty(example = "-2", required = true, value = "") @JsonProperty("integer_item") - public Integer getIntegerItem() { + public @NotNull Integer getIntegerItem() { return integerItem; } @@ -144,10 +139,9 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @NotNull @ApiModelProperty(example = "true", required = true, value = "") @JsonProperty("bool_item") - public Boolean getBoolItem() { + public @NotNull Boolean getBoolItem() { return boolItem; } @@ -172,10 +166,9 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @NotNull @ApiModelProperty(example = "[0,1,2,3]", required = true, value = "") @JsonProperty("array_item") - public List getArrayItem() { + public @NotNull List getArrayItem() { return arrayItem; } @@ -230,4 +223,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/User.java index e46b4e9e7907..2a1878ded5d2 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/User.java @@ -47,7 +47,6 @@ public User id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -67,7 +66,6 @@ public User username(String username) { * Get username * @return username */ - @ApiModelProperty(value = "") @JsonProperty("username") public String getUsername() { @@ -87,7 +85,6 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @ApiModelProperty(value = "") @JsonProperty("firstName") public String getFirstName() { @@ -107,7 +104,6 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @ApiModelProperty(value = "") @JsonProperty("lastName") public String getLastName() { @@ -127,7 +123,6 @@ public User email(String email) { * Get email * @return email */ - @ApiModelProperty(value = "") @JsonProperty("email") public String getEmail() { @@ -147,7 +142,6 @@ public User password(String password) { * Get password * @return password */ - @ApiModelProperty(value = "") @JsonProperty("password") public String getPassword() { @@ -167,7 +161,6 @@ public User phone(String phone) { * Get phone * @return phone */ - @ApiModelProperty(value = "") @JsonProperty("phone") public String getPhone() { @@ -187,7 +180,6 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @ApiModelProperty(value = "User Status") @JsonProperty("userStatus") public Integer getUserStatus() { @@ -249,4 +241,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/XmlItem.java index b7a622a0b99e..2e676eb62e75 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/XmlItem.java @@ -34,7 +34,6 @@ public class XmlItem { private Boolean attributeBoolean; - @Valid private List wrappedArray = new ArrayList<>(); private String nameString; @@ -45,10 +44,8 @@ public class XmlItem { private Boolean nameBoolean; - @Valid private List nameArray = new ArrayList<>(); - @Valid private List nameWrappedArray = new ArrayList<>(); private String prefixString; @@ -59,10 +56,8 @@ public class XmlItem { private Boolean prefixBoolean; - @Valid private List prefixArray = new ArrayList<>(); - @Valid private List prefixWrappedArray = new ArrayList<>(); private String namespaceString; @@ -73,10 +68,8 @@ public class XmlItem { private Boolean namespaceBoolean; - @Valid private List namespaceArray = new ArrayList<>(); - @Valid private List namespaceWrappedArray = new ArrayList<>(); private String prefixNsString; @@ -87,10 +80,8 @@ public class XmlItem { private Boolean prefixNsBoolean; - @Valid private List prefixNsArray = new ArrayList<>(); - @Valid private List prefixNsWrappedArray = new ArrayList<>(); public XmlItem attributeString(String attributeString) { @@ -102,7 +93,6 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("attribute_string") public String getAttributeString() { @@ -122,7 +112,6 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("attribute_number") public BigDecimal getAttributeNumber() { @@ -142,7 +131,6 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("attribute_integer") public Integer getAttributeInteger() { @@ -162,7 +150,6 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("attribute_boolean") public Boolean getAttributeBoolean() { @@ -190,7 +177,6 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("wrapped_array") public List getWrappedArray() { @@ -210,7 +196,6 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("name_string") public String getNameString() { @@ -230,7 +215,6 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("name_number") public BigDecimal getNameNumber() { @@ -250,7 +234,6 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("name_integer") public Integer getNameInteger() { @@ -270,7 +253,6 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("name_boolean") public Boolean getNameBoolean() { @@ -298,7 +280,6 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ - @ApiModelProperty(value = "") @JsonProperty("name_array") public List getNameArray() { @@ -326,7 +307,6 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("name_wrapped_array") public List getNameWrappedArray() { @@ -346,7 +326,6 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("prefix_string") public String getPrefixString() { @@ -366,7 +345,6 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("prefix_number") public BigDecimal getPrefixNumber() { @@ -386,7 +364,6 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_integer") public Integer getPrefixInteger() { @@ -406,7 +383,6 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("prefix_boolean") public Boolean getPrefixBoolean() { @@ -434,7 +410,6 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_array") public List getPrefixArray() { @@ -462,7 +437,6 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_wrapped_array") public List getPrefixWrappedArray() { @@ -482,7 +456,6 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("namespace_string") public String getNamespaceString() { @@ -502,7 +475,6 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("namespace_number") public BigDecimal getNamespaceNumber() { @@ -522,7 +494,6 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { @@ -542,7 +513,6 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("namespace_boolean") public Boolean getNamespaceBoolean() { @@ -570,7 +540,6 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ - @ApiModelProperty(value = "") @JsonProperty("namespace_array") public List getNamespaceArray() { @@ -598,7 +567,6 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("namespace_wrapped_array") public List getNamespaceWrappedArray() { @@ -618,7 +586,6 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("prefix_ns_string") public String getPrefixNsString() { @@ -638,7 +605,6 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("prefix_ns_number") public BigDecimal getPrefixNsNumber() { @@ -658,7 +624,6 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { @@ -678,7 +643,6 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("prefix_ns_boolean") public Boolean getPrefixNsBoolean() { @@ -706,7 +670,6 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_ns_array") public List getPrefixNsArray() { @@ -734,7 +697,6 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_ns_wrapped_array") public List getPrefixNsWrappedArray() { @@ -838,4 +800,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java index 6c54d1fc50cc..89bf9ba06e9d 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -56,7 +56,7 @@ default Optional getRequest() { ) default ResponseEntity call123testSpecialTags( - @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + @ApiParam(value = "client model", required = true) @RequestBody @NotNull @Valid Client body ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java index 635fdfff083f..c0b7a16eb54f 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java @@ -64,7 +64,7 @@ default Optional getRequest() { ) default ResponseEntity createXmlItem( - @ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem + @ApiParam(value = "XmlItem Body", required = true) @RequestBody @NotNull @Valid XmlItem xmlItem ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -95,7 +95,7 @@ default ResponseEntity createXmlItem( ) default ResponseEntity fakeOuterBooleanSerialize( - @ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body + @ApiParam(value = "Input boolean as post body") @RequestBody(required = false) Boolean body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -126,7 +126,7 @@ default ResponseEntity fakeOuterBooleanSerialize( ) default ResponseEntity fakeOuterCompositeSerialize( - @ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body + @ApiParam(value = "Input composite as post body") @RequestBody(required = false) @Valid OuterComposite body ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -166,7 +166,7 @@ default ResponseEntity fakeOuterCompositeSerialize( ) default ResponseEntity fakeOuterNumberSerialize( - @ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body + @ApiParam(value = "Input number as post body") @RequestBody(required = false) BigDecimal body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -197,7 +197,7 @@ default ResponseEntity fakeOuterNumberSerialize( ) default ResponseEntity fakeOuterStringSerialize( - @ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body + @ApiParam(value = "Input string as post body") @RequestBody(required = false) String body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -227,7 +227,7 @@ default ResponseEntity fakeOuterStringSerialize( ) default ResponseEntity testBodyWithFileSchema( - @ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass body + @ApiParam(value = "", required = true) @RequestBody @NotNull @Valid FileSchemaTestClass body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -257,8 +257,8 @@ default ResponseEntity testBodyWithFileSchema( ) default ResponseEntity testBodyWithQueryParams( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, - @ApiParam(value = "", required = true) @Valid @RequestBody User body + @ApiParam(value = "", required = true) @RequestParam(value = "query") @NotNull String query, + @ApiParam(value = "", required = true) @RequestBody @NotNull @Valid User body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -290,7 +290,7 @@ default ResponseEntity testBodyWithQueryParams( ) default ResponseEntity testClientModel( - @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + @ApiParam(value = "client model", required = true) @RequestBody @NotNull @Valid Client body ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -347,20 +347,20 @@ default ResponseEntity testClientModel( ) default ResponseEntity testEndpointParameters( - @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "number", required = true) BigDecimal number, - @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "double", required = true) Double _double, - @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, - @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "byte", required = true) byte[] _byte, - @ApiParam(value = "None") @Valid @RequestParam(value = "integer", required = false) Integer integer, - @ApiParam(value = "None") @Valid @RequestParam(value = "int32", required = false) Integer int32, - @ApiParam(value = "None") @Valid @RequestParam(value = "int64", required = false) Long int64, - @ApiParam(value = "None") @Valid @RequestParam(value = "float", required = false) Float _float, - @ApiParam(value = "None") @Valid @RequestParam(value = "string", required = false) String string, + @ApiParam(value = "None", required = true) @RequestParam(value = "number") @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal number, + @ApiParam(value = "None", required = true) @RequestParam(value = "double") @NotNull @DecimalMin("67.8") @DecimalMax("123.4") Double _double, + @ApiParam(value = "None", required = true) @RequestParam(value = "pattern_without_delimiter") @NotNull @Pattern(regexp = "^[A-Z].*") String patternWithoutDelimiter, + @ApiParam(value = "None", required = true) @RequestParam(value = "byte") @NotNull byte[] _byte, + @ApiParam(value = "None") @RequestParam(value = "integer", required = false) @Min(10) @Max(100) Integer integer, + @ApiParam(value = "None") @RequestParam(value = "int32", required = false) @Min(20) @Max(200) Integer int32, + @ApiParam(value = "None") @RequestParam(value = "int64", required = false) Long int64, + @ApiParam(value = "None") @RequestParam(value = "float", required = false) @DecimalMax("987.6") Float _float, + @ApiParam(value = "None") @RequestParam(value = "string", required = false) @Pattern(regexp = "/[a-z]/i") String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @ApiParam(value = "None") @Valid @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, - @ApiParam(value = "None") @Valid @RequestParam(value = "password", required = false) String password, - @ApiParam(value = "None") @Valid @RequestParam(value = "callback", required = false) String paramCallback + @ApiParam(value = "None") @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @RequestParam(value = "password", required = false) @Size(min = 10, max = 64) String password, + @ApiParam(value = "None") @RequestParam(value = "callback", required = false) String paramCallback ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -399,14 +399,14 @@ default ResponseEntity testEndpointParameters( ) default ResponseEntity testEnumParameters( - @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, - @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, - @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, - @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, - @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString + @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestParam(value = "enum_form_string", required = false) String enumFormString ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -440,12 +440,12 @@ default ResponseEntity testEnumParameters( ) default ResponseEntity testGroupParameters( - @NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @ApiParam(value = "Required String in group parameters", required = true) @RequestParam(value = "required_string_group") @NotNull Integer requiredStringGroup, @NotNull @ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, - @NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, - @ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup, + @ApiParam(value = "Required Integer in group parameters", required = true) @RequestParam(value = "required_int64_group") @NotNull Long requiredInt64Group, + @ApiParam(value = "String in group parameters") @RequestParam(value = "string_group", required = false) Integer stringGroup, @ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup, - @ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + @ApiParam(value = "Integer in group parameters") @RequestParam(value = "int64_group", required = false) Long int64Group ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -474,7 +474,7 @@ default ResponseEntity testGroupParameters( ) default ResponseEntity testInlineAdditionalProperties( - @ApiParam(value = "request body", required = true) @Valid @RequestBody Map param + @ApiParam(value = "request body", required = true) @RequestBody @NotNull Map param ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -504,8 +504,8 @@ default ResponseEntity testInlineAdditionalProperties( ) default ResponseEntity testJsonFormData( - @ApiParam(value = "field1", required = true) @Valid @RequestParam(value = "param", required = true) String param, - @ApiParam(value = "field2", required = true) @Valid @RequestParam(value = "param2", required = true) String param2 + @ApiParam(value = "field1", required = true) @RequestParam(value = "param") @NotNull String param, + @ApiParam(value = "field2", required = true) @RequestParam(value = "param2") @NotNull String param2 ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -538,11 +538,11 @@ default ResponseEntity testJsonFormData( ) default ResponseEntity testQueryParameterCollectionFormat( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + @ApiParam(value = "", required = true) @RequestParam(value = "pipe") @NotNull List pipe, + @ApiParam(value = "", required = true) @RequestParam(value = "ioutil") @NotNull List ioutil, + @ApiParam(value = "", required = true) @RequestParam(value = "http") @NotNull List http, + @ApiParam(value = "", required = true) @RequestParam(value = "url") @NotNull List url, + @ApiParam(value = "", required = true) @RequestParam(value = "context") @NotNull List context ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -581,9 +581,9 @@ default ResponseEntity testQueryParameterCollectionFormat( ) default ResponseEntity uploadFileWithRequiredFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, - @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, - @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") @NotNull Long petId, + @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile") MultipartFile requiredFile, + @ApiParam(value = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 57fa6ad4c8e5..fb2da04a0a44 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -59,7 +59,7 @@ default Optional getRequest() { ) default ResponseEntity testClassname( - @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + @ApiParam(value = "client model", required = true) @RequestBody @NotNull @Valid Client body ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java index 076de878d0cb..12898b30c60b 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java @@ -64,7 +64,7 @@ default Optional getRequest() { ) default ResponseEntity addPet( - @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -101,7 +101,7 @@ default ResponseEntity addPet( ) default ResponseEntity deletePet( - @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") @NotNull Long petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -123,7 +123,7 @@ default ResponseEntity deletePet( nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, - responseContainer = "List", + responseContainer = "array", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @@ -132,7 +132,7 @@ default ResponseEntity deletePet( } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "array"), @ApiResponse(code = 400, message = "Invalid status value") }) @RequestMapping( @@ -142,7 +142,7 @@ default ResponseEntity deletePet( ) default ResponseEntity> findPetsByStatus( - @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status, + @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @RequestParam(value = "status") @NotNull List status, @ApiIgnore final Pageable pageable ) { getRequest().ifPresent(request -> { @@ -180,7 +180,7 @@ default ResponseEntity> findPetsByStatus( nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, - responseContainer = "List", + responseContainer = "array", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @@ -189,7 +189,7 @@ default ResponseEntity> findPetsByStatus( } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "array"), @ApiResponse(code = 400, message = "Invalid tag value") }) @RequestMapping( @@ -199,7 +199,7 @@ default ResponseEntity> findPetsByStatus( ) default ResponseEntity> findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, + @ApiParam(value = "Tags to filter by", required = true) @RequestParam(value = "tags") @NotNull List tags, @ApiIgnore final Pageable pageable ) { getRequest().ifPresent(request -> { @@ -252,7 +252,7 @@ default ResponseEntity> findPetsByTags( ) default ResponseEntity getPetById( - @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") @NotNull Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -285,7 +285,7 @@ default ResponseEntity getPetById( nickname = "listAllPets", notes = "", response = Pet.class, - responseContainer = "List", + responseContainer = "array", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @@ -294,7 +294,7 @@ default ResponseEntity getPetById( } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "array"), @ApiResponse(code = 400, message = "Invalid status value") }) @RequestMapping( @@ -359,7 +359,7 @@ default ResponseEntity> listAllPets( ) default ResponseEntity updatePet( - @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -396,9 +396,9 @@ default ResponseEntity updatePet( ) default ResponseEntity updatePetWithForm( - @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, - @ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, - @ApiParam(value = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status + @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") @NotNull Long petId, + @ApiParam(value = "Updated name of the pet") @RequestParam(value = "name", required = false) String name, + @ApiParam(value = "Updated status of the pet") @RequestParam(value = "status", required = false) String status ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -437,8 +437,8 @@ default ResponseEntity updatePetWithForm( ) default ResponseEntity uploadFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, - @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") @NotNull Long petId, + @ApiParam(value = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) { getRequest().ifPresent(request -> { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApi.java index b22eebf4f1eb..ca42d4bf9bc9 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApi.java @@ -56,7 +56,7 @@ default Optional getRequest() { ) default ResponseEntity deleteOrder( - @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") @NotNull String orderId ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -75,13 +75,13 @@ default ResponseEntity deleteOrder( nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, - responseContainer = "Map", + responseContainer = "map", authorizations = { @Authorization(value = "api_key") } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "map") }) @RequestMapping( method = RequestMethod.GET, @@ -125,7 +125,7 @@ default ResponseEntity> getInventory( ) default ResponseEntity getOrderById( - @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") @NotNull @Min(1L) @Max(5L) Long orderId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -171,7 +171,7 @@ default ResponseEntity getOrderById( ) default ResponseEntity placeOrder( - @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body + @ApiParam(value = "order placed for purchasing the pet", required = true) @RequestBody @NotNull @Valid Order body ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java index eaf1040dd0e7..820e15386748 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java @@ -54,7 +54,7 @@ default Optional getRequest() { ) default ResponseEntity createUser( - @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body + @ApiParam(value = "Created user object", required = true) @RequestBody @NotNull @Valid User body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -82,7 +82,7 @@ default ResponseEntity createUser( ) default ResponseEntity createUsersWithArrayInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@Valid User> body + @ApiParam(value = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -110,7 +110,7 @@ default ResponseEntity createUsersWithArrayInput( ) default ResponseEntity createUsersWithListInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@Valid User> body + @ApiParam(value = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -141,7 +141,7 @@ default ResponseEntity createUsersWithListInput( ) default ResponseEntity deleteUser( - @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") @NotNull String username ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -175,7 +175,7 @@ default ResponseEntity deleteUser( ) default ResponseEntity getUserByName( - @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") @NotNull String username ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -222,8 +222,8 @@ default ResponseEntity getUserByName( ) default ResponseEntity loginUser( - @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, - @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + @ApiParam(value = "The user name for login", required = true) @RequestParam(value = "username") @NotNull String username, + @ApiParam(value = "The password for login in clear text", required = true) @RequestParam(value = "password") @NotNull String password ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -282,8 +282,8 @@ default ResponseEntity logoutUser( ) default ResponseEntity updateUser( - @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, - @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body + @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") @NotNull String username, + @ApiParam(value = "Updated user object", required = true) @RequestBody @NotNull @Valid User body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/VersioningApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/VersioningApi.java index 3daa68684249..201021aa150f 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/VersioningApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/VersioningApi.java @@ -59,7 +59,7 @@ default Optional getRequest() { default ResponseEntity versioningHeaders( @NotNull @ApiParam(value = "", required = true, defaultValue = "V1") @RequestHeader(value = "VersionWithDefaultValue", required = true, defaultValue = "V1") String versionWithDefaultValue, @NotNull @ApiParam(value = "", required = true) @RequestHeader(value = "VersionNoDefaultValue", required = true) String versionNoDefaultValue, - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") @NotNull Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -104,11 +104,11 @@ default ResponseEntity versioningHeaders( ) default ResponseEntity versioningMix( - @NotNull @ApiParam(value = "", required = true, defaultValue = "V1") @Valid @RequestParam(value = "VersionWithDefaultValueQuery", required = true, defaultValue = "V1") String versionWithDefaultValueQuery, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "VersionNoDefaultValueQuery", required = true) String versionNoDefaultValueQuery, + @ApiParam(value = "", required = true, defaultValue = "V1") @RequestParam(value = "VersionWithDefaultValueQuery", defaultValue = "V1") @NotNull String versionWithDefaultValueQuery, + @ApiParam(value = "", required = true) @RequestParam(value = "VersionNoDefaultValueQuery") @NotNull String versionNoDefaultValueQuery, @NotNull @ApiParam(value = "", required = true, defaultValue = "V1") @RequestHeader(value = "VersionWithDefaultValueHeader", required = true, defaultValue = "V1") String versionWithDefaultValueHeader, @NotNull @ApiParam(value = "", required = true) @RequestHeader(value = "VersionNoDefaultValueHeader", required = true) String versionNoDefaultValueHeader, - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") @NotNull Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -150,9 +150,9 @@ default ResponseEntity versioningMix( ) default ResponseEntity versioningQueryParams( - @NotNull @ApiParam(value = "", required = true, defaultValue = "V1") @Valid @RequestParam(value = "VersionWithDefaultValue", required = true, defaultValue = "V1") String versionWithDefaultValue, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "VersionNoDefaultValue", required = true) String versionNoDefaultValue, - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + @ApiParam(value = "", required = true, defaultValue = "V1") @RequestParam(value = "VersionWithDefaultValue", defaultValue = "V1") @NotNull String versionWithDefaultValue, + @ApiParam(value = "", required = true) @RequestParam(value = "VersionNoDefaultValue") @NotNull String versionNoDefaultValue, + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") @NotNull Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index cf57def58490..291e57234974 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -37,7 +37,6 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index dc535ab3e476..f3b2cfe986ca 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -38,7 +38,6 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -126,4 +125,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 4d4bef3fde91..79708a257b1e 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -37,7 +37,6 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 319f2c34510c..cf551ec164f3 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -26,28 +26,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class AdditionalPropertiesClass { - @Valid private Map mapString = new HashMap<>(); - @Valid private Map mapNumber = new HashMap<>(); - @Valid private Map mapInteger = new HashMap<>(); - @Valid private Map mapBoolean = new HashMap<>(); - @Valid private Map> mapArrayInteger = new HashMap<>(); - @Valid private Map> mapArrayAnytype = new HashMap<>(); - @Valid private Map> mapMapString = new HashMap<>(); - @Valid private Map> mapMapAnytype = new HashMap<>(); private Object anytype1; @@ -73,7 +65,6 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ - @ApiModelProperty(value = "") @JsonProperty("map_string") public Map getMapString() { @@ -101,7 +92,6 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("map_number") public Map getMapNumber() { @@ -129,7 +119,6 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ - @ApiModelProperty(value = "") @JsonProperty("map_integer") public Map getMapInteger() { @@ -157,7 +146,6 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ - @ApiModelProperty(value = "") @JsonProperty("map_boolean") public Map getMapBoolean() { @@ -185,7 +173,6 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { @@ -213,7 +200,6 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ - @Valid @ApiModelProperty(value = "") @JsonProperty("map_array_anytype") public Map> getMapArrayAnytype() { @@ -241,7 +227,6 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { @@ -269,7 +254,6 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { @@ -289,7 +273,6 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ - @ApiModelProperty(value = "") @JsonProperty("anytype_1") public Object getAnytype1() { @@ -309,7 +292,6 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ - @ApiModelProperty(value = "") @JsonProperty("anytype_2") public Object getAnytype2() { @@ -329,7 +311,6 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ - @ApiModelProperty(value = "") @JsonProperty("anytype_3") public Object getAnytype3() { @@ -397,4 +378,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index e8e32dcd7fa9..f12948a1c898 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -37,7 +37,6 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 50fa525424d3..f31c0d0cd9b2 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -38,7 +38,6 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -126,4 +125,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index b2ca3bf5cb02..98e9b7b1a12a 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -38,7 +38,6 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -126,4 +125,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 7e085a44c93d..822b5e79b89f 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -37,7 +37,6 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Animal.java index ee575e5ad547..c947edd67ac9 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Animal.java @@ -35,7 +35,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class Animal { - private String className; + private @NotNull String className; private String color = "red"; @@ -59,10 +59,9 @@ public Animal className(String className) { * Get className * @return className */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("className") - public String getClassName() { + public @NotNull String getClassName() { return className; } @@ -79,7 +78,6 @@ public Animal color(String color) { * Get color * @return color */ - @ApiModelProperty(value = "") @JsonProperty("color") public String getColor() { @@ -129,4 +127,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 621c01be49ce..249d0bc72466 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnly { - @Valid private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { @@ -46,7 +45,6 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("ArrayArrayNumber") public List> getArrayArrayNumber() { @@ -94,4 +92,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 3f519bbb9baa..58b3ee1a3bcf 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayOfNumberOnly { - @Valid private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnly arrayNumber(List arrayNumber) { @@ -46,7 +45,6 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("ArrayNumber") public List getArrayNumber() { @@ -94,4 +92,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayTest.java index 382556e65bd6..20402ebb213f 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayTest.java @@ -26,13 +26,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayTest { - @Valid private List arrayOfString = new ArrayList<>(); - @Valid private List> arrayArrayOfInteger = new ArrayList<>(); - @Valid private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTest arrayOfString(List arrayOfString) { @@ -52,7 +49,6 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ - @ApiModelProperty(value = "") @JsonProperty("array_of_string") public List getArrayOfString() { @@ -80,7 +76,6 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ - @Valid @ApiModelProperty(value = "") @JsonProperty("array_array_of_integer") public List> getArrayArrayOfInteger() { @@ -91,12 +86,12 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } - public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) { + public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { if (this.arrayArrayOfModel == null) { this.arrayArrayOfModel = new ArrayList<>(); } @@ -108,14 +103,13 @@ public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayO * Get arrayArrayOfModel * @return arrayArrayOfModel */ - @Valid @ApiModelProperty(value = "") @JsonProperty("array_array_of_model") public List> getArrayArrayOfModel() { return arrayArrayOfModel; } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { + public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } @@ -160,4 +154,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Capitalization.java index d6e8a694cf85..f9226321c070 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Capitalization.java @@ -43,7 +43,6 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ - @ApiModelProperty(value = "") @JsonProperty("smallCamel") public String getSmallCamel() { @@ -63,7 +62,6 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ - @ApiModelProperty(value = "") @JsonProperty("CapitalCamel") public String getCapitalCamel() { @@ -83,7 +81,6 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ - @ApiModelProperty(value = "") @JsonProperty("small_Snake") public String getSmallSnake() { @@ -103,7 +100,6 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ - @ApiModelProperty(value = "") @JsonProperty("Capital_Snake") public String getCapitalSnake() { @@ -123,7 +119,6 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ - @ApiModelProperty(value = "") @JsonProperty("SCA_ETH_Flow_Points") public String getScAETHFlowPoints() { @@ -143,7 +138,6 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ - @ApiModelProperty(value = "Name of the pet ") @JsonProperty("ATT_NAME") public String getATTNAME() { @@ -201,4 +195,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Cat.java index f8562653ff90..7276dc5aa48c 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Cat.java @@ -49,7 +49,6 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ - @ApiModelProperty(value = "") @JsonProperty("declawed") public Boolean getDeclawed() { @@ -109,4 +108,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Category.java index a7d5b6e5916d..04e9b386ebbe 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Category.java @@ -24,7 +24,7 @@ public class Category { private Long id; - private String name = "default-name"; + private @NotNull String name = "default-name"; public Category() { super(); @@ -46,7 +46,6 @@ public Category id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -66,10 +65,9 @@ public Category name(String name) { * Get name * @return name */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -116,4 +114,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ClassModel.java index 56aeaf340f38..508e179a1a9e 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ClassModel.java @@ -34,7 +34,6 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @ApiModelProperty(value = "") @JsonProperty("_class") public String getPropertyClass() { @@ -82,4 +81,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Client.java index 23491ea29e60..0463c48505d8 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Client.java @@ -33,7 +33,6 @@ public Client client(String client) { * Get client * @return client */ - @ApiModelProperty(value = "") @JsonProperty("client") public String getClient() { @@ -81,4 +80,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Dog.java index bef3e5409a8e..d4656db2ef88 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Dog.java @@ -49,7 +49,6 @@ public Dog breed(String breed) { * Get breed * @return breed */ - @ApiModelProperty(value = "") @JsonProperty("breed") public String getBreed() { @@ -109,4 +108,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumArrays.java index 5bed35014d25..4a80b3b0ffe9 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumArrays.java @@ -61,7 +61,7 @@ public static JustSymbolEnum fromValue(String value) { } } - private JustSymbolEnum justSymbol; + private String justSymbol; /** * Gets or Sets arrayEnum @@ -98,8 +98,7 @@ public static ArrayEnumEnum fromValue(String value) { } } - @Valid - private List arrayEnum = new ArrayList<>(); + private List arrayEnum = new ArrayList<>(); public EnumArrays justSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; @@ -110,10 +109,9 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ - @ApiModelProperty(value = "") @JsonProperty("just_symbol") - public JustSymbolEnum getJustSymbol() { + public String getJustSymbol() { return justSymbol; } @@ -138,10 +136,9 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ - @ApiModelProperty(value = "") @JsonProperty("array_enum") - public List getArrayEnum() { + public List getArrayEnum() { return arrayEnum; } @@ -188,4 +185,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumTest.java index 2865d76ab8bf..8e3d8978857c 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumTest.java @@ -63,7 +63,7 @@ public static EnumStringEnum fromValue(String value) { } } - private EnumStringEnum enumString; + private String enumString; /** * Gets or Sets enumStringRequired @@ -102,7 +102,7 @@ public static EnumStringRequiredEnum fromValue(String value) { } } - private EnumStringRequiredEnum enumStringRequired; + private @NotNull String enumStringRequired; /** * Gets or Sets enumInteger @@ -139,7 +139,7 @@ public static EnumIntegerEnum fromValue(Integer value) { } } - private EnumIntegerEnum enumInteger; + private Integer enumInteger; /** * Gets or Sets enumNumber @@ -176,7 +176,7 @@ public static EnumNumberEnum fromValue(Double value) { } } - private EnumNumberEnum enumNumber; + private Double enumNumber; private OuterEnum outerEnum; @@ -200,10 +200,9 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ - @ApiModelProperty(value = "") @JsonProperty("enum_string") - public EnumStringEnum getEnumString() { + public String getEnumString() { return enumString; } @@ -220,10 +219,9 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("enum_string_required") - public EnumStringRequiredEnum getEnumStringRequired() { + public @NotNull String getEnumStringRequired() { return enumStringRequired; } @@ -240,10 +238,9 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ - @ApiModelProperty(value = "") @JsonProperty("enum_integer") - public EnumIntegerEnum getEnumInteger() { + public Integer getEnumInteger() { return enumInteger; } @@ -260,10 +257,9 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ - @ApiModelProperty(value = "") @JsonProperty("enum_number") - public EnumNumberEnum getEnumNumber() { + public Double getEnumNumber() { return enumNumber; } @@ -280,7 +276,6 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ - @Valid @ApiModelProperty(value = "") @JsonProperty("outerEnum") public OuterEnum getOuterEnum() { @@ -336,4 +331,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/File.java index 6e16961c2d2f..cd9f95a6f91c 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/File.java @@ -34,7 +34,6 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ - @ApiModelProperty(value = "Test capitalization") @JsonProperty("sourceURI") public String getSourceURI() { @@ -82,4 +81,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 9a40dbd168af..0c2d51df5822 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -26,9 +26,8 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class FileSchemaTestClass { - private File file; + private @Valid File file; - @Valid private List<@Valid File> files = new ArrayList<>(); public FileSchemaTestClass file(File file) { @@ -40,10 +39,9 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ - @Valid @ApiModelProperty(value = "") @JsonProperty("file") - public File getFile() { + public @Valid File getFile() { return file; } @@ -51,7 +49,7 @@ public void setFile(File file) { this.file = file; } - public FileSchemaTestClass files(List<@Valid File> files) { + public FileSchemaTestClass files(List files) { this.files = files; return this; } @@ -68,14 +66,13 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ - @Valid @ApiModelProperty(value = "") @JsonProperty("files") public List<@Valid File> getFiles() { return files; } - public void setFiles(List<@Valid File> files) { + public void setFiles(List files) { this.files = files; } @@ -118,4 +115,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FormatTest.java index fda969ad06d3..fa150f1fa069 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FormatTest.java @@ -30,33 +30,33 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class FormatTest { - private Integer integer; + private @Min(10) @Max(100) Integer integer; - private Integer int32; + private @Min(20) @Max(200) Integer int32; private Long int64; - private BigDecimal number; + private @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal number; - private Float _float; + private @DecimalMin("54.3") @DecimalMax("987.6") Float _float; - private Double _double; + private @DecimalMin("67.8") @DecimalMax("123.4") Double _double; - private String string; + private @Pattern(regexp = "/[a-z]/i") String string; - private byte[] _byte; + private @NotNull byte[] _byte; private org.springframework.core.io.Resource binary; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) - private LocalDate date; + private @NotNull LocalDate date; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; private UUID uuid; - private String password; + private @NotNull @Size(min = 10, max = 64) String password; private BigDecimal bigDecimal; @@ -85,10 +85,9 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ - @Min(10) @Max(100) @ApiModelProperty(value = "") @JsonProperty("integer") - public Integer getInteger() { + public @Min(10) @Max(100) Integer getInteger() { return integer; } @@ -107,10 +106,9 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ - @Min(20) @Max(200) @ApiModelProperty(value = "") @JsonProperty("int32") - public Integer getInt32() { + public @Min(20) @Max(200) Integer getInt32() { return int32; } @@ -127,7 +125,6 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ - @ApiModelProperty(value = "") @JsonProperty("int64") public Long getInt64() { @@ -149,10 +146,9 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ - @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(required = true, value = "") @JsonProperty("number") - public BigDecimal getNumber() { + public @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal getNumber() { return number; } @@ -171,10 +167,9 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ - @DecimalMin("54.3") @DecimalMax("987.6") @ApiModelProperty(value = "") @JsonProperty("float") - public Float getFloat() { + public @DecimalMin("54.3") @DecimalMax("987.6") Float getFloat() { return _float; } @@ -193,10 +188,9 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ - @DecimalMin("67.8") @DecimalMax("123.4") @ApiModelProperty(value = "") @JsonProperty("double") - public Double getDouble() { + public @DecimalMin("67.8") @DecimalMax("123.4") Double getDouble() { return _double; } @@ -213,10 +207,9 @@ public FormatTest string(String string) { * Get string * @return string */ - @Pattern(regexp = "/[a-z]/i") @ApiModelProperty(value = "") @JsonProperty("string") - public String getString() { + public @Pattern(regexp = "/[a-z]/i") String getString() { return string; } @@ -233,10 +226,9 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("byte") - public byte[] getByte() { + public @NotNull byte[] getByte() { return _byte; } @@ -253,7 +245,6 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ - @Valid @ApiModelProperty(value = "") @JsonProperty("binary") public org.springframework.core.io.Resource getBinary() { @@ -273,10 +264,9 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ - @NotNull @Valid @ApiModelProperty(required = true, value = "") @JsonProperty("date") - public LocalDate getDate() { + public @NotNull LocalDate getDate() { return date; } @@ -293,7 +283,6 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ - @Valid @ApiModelProperty(value = "") @JsonProperty("dateTime") public OffsetDateTime getDateTime() { @@ -313,7 +302,6 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ - @Valid @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") @JsonProperty("uuid") public UUID getUuid() { @@ -333,10 +321,9 @@ public FormatTest password(String password) { * Get password * @return password */ - @NotNull @Size(min = 10, max = 64) @ApiModelProperty(required = true, value = "") @JsonProperty("password") - public String getPassword() { + public @NotNull @Size(min = 10, max = 64) String getPassword() { return password; } @@ -353,7 +340,6 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ - @Valid @ApiModelProperty(value = "") @JsonProperty("BigDecimal") public BigDecimal getBigDecimal() { @@ -427,4 +413,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 27ea04eaa86c..628772ab47fe 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -37,7 +37,6 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("bar") public String getBar() { @@ -57,7 +56,6 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("foo") public String getFoo() { @@ -107,4 +105,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/MapTest.java index bd3eea6e64df..a060e9d647a7 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/MapTest.java @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class MapTest { - @Valid private Map> mapMapOfString = new HashMap<>(); /** @@ -63,13 +62,10 @@ public static InnerEnum fromValue(String value) { } } - @Valid - private Map mapOfEnumString = new HashMap<>(); + private Map mapOfEnumString = new HashMap<>(); - @Valid private Map directMap = new HashMap<>(); - @Valid private Map indirectMap = new HashMap<>(); public MapTest mapMapOfString(Map> mapMapOfString) { @@ -89,7 +85,6 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ - @Valid @ApiModelProperty(value = "") @JsonProperty("map_map_of_string") public Map> getMapMapOfString() { @@ -117,10 +112,9 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ - @ApiModelProperty(value = "") @JsonProperty("map_of_enum_string") - public Map getMapOfEnumString() { + public Map getMapOfEnumString() { return mapOfEnumString; } @@ -145,7 +139,6 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ - @ApiModelProperty(value = "") @JsonProperty("direct_map") public Map getDirectMap() { @@ -173,7 +166,6 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ - @ApiModelProperty(value = "") @JsonProperty("indirect_map") public Map getIndirectMap() { @@ -227,4 +219,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index b16370183e0a..0ecca046c869 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -33,8 +33,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; - @Valid - private Map map = new HashMap<>(); + private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { this.uuid = uuid; @@ -45,7 +44,6 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ - @Valid @ApiModelProperty(value = "") @JsonProperty("uuid") public UUID getUuid() { @@ -65,7 +63,6 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ - @Valid @ApiModelProperty(value = "") @JsonProperty("dateTime") public OffsetDateTime getDateTime() { @@ -93,10 +90,9 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ - @Valid @ApiModelProperty(value = "") @JsonProperty("map") - public Map getMap() { + public Map getMap() { return map; } @@ -145,4 +141,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Model200Response.java index 4922749da22c..6f4b8460e6f4 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Model200Response.java @@ -38,7 +38,6 @@ public Model200Response name(Integer name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public Integer getName() { @@ -58,7 +57,6 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @ApiModelProperty(value = "") @JsonProperty("class") public String getPropertyClass() { @@ -108,4 +106,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelApiResponse.java index 21244266ad17..31642652231b 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -39,7 +39,6 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @ApiModelProperty(value = "") @JsonProperty("code") public Integer getCode() { @@ -59,7 +58,6 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @ApiModelProperty(value = "") @JsonProperty("type") public String getType() { @@ -79,7 +77,6 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @ApiModelProperty(value = "") @JsonProperty("message") public String getMessage() { @@ -131,4 +128,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelList.java index d3d66db5c095..b9dc65977c53 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelList.java @@ -35,7 +35,6 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ - @ApiModelProperty(value = "") @JsonProperty("123-list") public String get123list() { @@ -83,4 +82,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelReturn.java index 2c8a25a4d85f..72d78cb7fc0b 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelReturn.java @@ -36,7 +36,6 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ - @ApiModelProperty(value = "") @JsonProperty("return") public Integer getReturn() { @@ -84,4 +83,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Name.java index 420c565a9955..f42d379c1083 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Name.java @@ -23,7 +23,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class Name { - private Integer name; + private @NotNull Integer name; private Integer snakeCase; @@ -51,10 +51,9 @@ public Name name(Integer name) { * Get name * @return name */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("name") - public Integer getName() { + public @NotNull Integer getName() { return name; } @@ -71,7 +70,6 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("snake_case") public Integer getSnakeCase() { @@ -91,7 +89,6 @@ public Name property(String property) { * Get property * @return property */ - @ApiModelProperty(value = "") @JsonProperty("property") public String getProperty() { @@ -111,7 +108,6 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("123Number") public Integer get123number() { @@ -165,4 +161,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/NumberOnly.java index 69de58b11374..eb57c97846a2 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/NumberOnly.java @@ -34,7 +34,6 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("JustNumber") public BigDecimal getJustNumber() { @@ -82,4 +81,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Order.java index 48932f68f862..6b84d7a0c4b4 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Order.java @@ -71,7 +71,7 @@ public static StatusEnum fromValue(String value) { } } - private StatusEnum status; + private String status; private Boolean complete = false; @@ -84,7 +84,6 @@ public Order id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -104,7 +103,6 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @ApiModelProperty(value = "") @JsonProperty("petId") public Long getPetId() { @@ -124,7 +122,6 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @ApiModelProperty(value = "") @JsonProperty("quantity") public Integer getQuantity() { @@ -144,7 +141,6 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Valid @ApiModelProperty(value = "") @JsonProperty("shipDate") public OffsetDateTime getShipDate() { @@ -164,10 +160,9 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @ApiModelProperty(value = "Order Status") @JsonProperty("status") - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -184,7 +179,6 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @ApiModelProperty(value = "") @JsonProperty("complete") public Boolean getComplete() { @@ -242,4 +236,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/OuterComposite.java index 2e78c0586cab..2bfc1db21bb2 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/OuterComposite.java @@ -38,7 +38,6 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("my_number") public BigDecimal getMyNumber() { @@ -58,7 +57,6 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ - @ApiModelProperty(value = "") @JsonProperty("my_string") public String getMyString() { @@ -78,7 +76,6 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ - @ApiModelProperty(value = "") @JsonProperty("my_boolean") public Boolean getMyBoolean() { @@ -130,4 +127,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Pet.java index 19339f6c434e..2467fdb92615 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Pet.java @@ -30,14 +30,12 @@ public class Pet { private Long id; - private Category category; + private @Valid Category category; - private String name; + private @NotNull String name; - @Valid - private List photoUrls = new ArrayList<>(); + private @NotNull List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** @@ -77,7 +75,7 @@ public static StatusEnum fromValue(String value) { } } - private StatusEnum status; + private String status; public Pet() { super(); @@ -100,7 +98,6 @@ public Pet id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -120,10 +117,9 @@ public Pet category(Category category) { * Get category * @return category */ - @Valid @ApiModelProperty(value = "") @JsonProperty("category") - public Category getCategory() { + public @Valid Category getCategory() { return category; } @@ -140,10 +136,9 @@ public Pet name(String name) { * Get name * @return name */ - @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -168,10 +163,9 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("photoUrls") - public List getPhotoUrls() { + public @NotNull List getPhotoUrls() { return photoUrls; } @@ -179,7 +173,7 @@ public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List<@Valid Tag> tags) { + public Pet tags(List tags) { this.tags = tags; return this; } @@ -196,14 +190,13 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Valid @ApiModelProperty(value = "") @JsonProperty("tags") public List<@Valid Tag> getTags() { return tags; } - public void setTags(List<@Valid Tag> tags) { + public void setTags(List tags) { this.tags = tags; } @@ -216,10 +209,9 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ - @ApiModelProperty(value = "pet status in the store") @JsonProperty("status") - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -274,4 +266,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 9388f3cfd29f..1eee9577a877 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -35,7 +35,6 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("bar") public String getBar() { @@ -55,7 +54,6 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ - @ApiModelProperty(value = "") @JsonProperty("baz") public String getBaz() { @@ -105,4 +103,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/SpecialModelName.java index 6d6d8e261c74..d4296422472e 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/SpecialModelName.java @@ -35,7 +35,6 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ - @ApiModelProperty(value = "") @JsonProperty("$special[property.name]") public Long get$SpecialPropertyName() { @@ -83,4 +82,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Tag.java index 850c68911db4..d3778890e2d6 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Tag.java @@ -35,7 +35,6 @@ public Tag id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -55,7 +54,6 @@ public Tag name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -105,4 +103,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java index a0fe16145d30..6b0e966ec471 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -26,16 +26,15 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class TypeHolderDefault { - private String stringItem = "what"; + private @NotNull String stringItem = "what"; - private BigDecimal numberItem; + private @NotNull BigDecimal numberItem; - private Integer integerItem; + private @NotNull Integer integerItem; - private Boolean boolItem = true; + private @NotNull Boolean boolItem = true; - @Valid - private List arrayItem = new ArrayList<>(); + private @NotNull List arrayItem = new ArrayList<>(); public TypeHolderDefault() { super(); @@ -61,10 +60,9 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("string_item") - public String getStringItem() { + public @NotNull String getStringItem() { return stringItem; } @@ -81,10 +79,9 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @NotNull @Valid @ApiModelProperty(required = true, value = "") @JsonProperty("number_item") - public BigDecimal getNumberItem() { + public @NotNull BigDecimal getNumberItem() { return numberItem; } @@ -101,10 +98,9 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("integer_item") - public Integer getIntegerItem() { + public @NotNull Integer getIntegerItem() { return integerItem; } @@ -121,10 +117,9 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("bool_item") - public Boolean getBoolItem() { + public @NotNull Boolean getBoolItem() { return boolItem; } @@ -149,10 +144,9 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("array_item") - public List getArrayItem() { + public @NotNull List getArrayItem() { return arrayItem; } @@ -205,4 +199,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java index 909dc1e7fe60..e9b3492a4684 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -26,18 +26,17 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class TypeHolderExample { - private String stringItem; + private @NotNull String stringItem; - private BigDecimal numberItem; + private @NotNull BigDecimal numberItem; - private Float floatItem; + private @NotNull Float floatItem; - private Integer integerItem; + private @NotNull Integer integerItem; - private Boolean boolItem; + private @NotNull Boolean boolItem; - @Valid - private List arrayItem = new ArrayList<>(); + private @NotNull List arrayItem = new ArrayList<>(); public TypeHolderExample() { super(); @@ -64,10 +63,9 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @NotNull @ApiModelProperty(example = "what", required = true, value = "") @JsonProperty("string_item") - public String getStringItem() { + public @NotNull String getStringItem() { return stringItem; } @@ -84,10 +82,9 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @NotNull @Valid @ApiModelProperty(example = "1.234", required = true, value = "") @JsonProperty("number_item") - public BigDecimal getNumberItem() { + public @NotNull BigDecimal getNumberItem() { return numberItem; } @@ -104,10 +101,9 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ - @NotNull @ApiModelProperty(example = "1.234", required = true, value = "") @JsonProperty("float_item") - public Float getFloatItem() { + public @NotNull Float getFloatItem() { return floatItem; } @@ -124,10 +120,9 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @NotNull @ApiModelProperty(example = "-2", required = true, value = "") @JsonProperty("integer_item") - public Integer getIntegerItem() { + public @NotNull Integer getIntegerItem() { return integerItem; } @@ -144,10 +139,9 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @NotNull @ApiModelProperty(example = "true", required = true, value = "") @JsonProperty("bool_item") - public Boolean getBoolItem() { + public @NotNull Boolean getBoolItem() { return boolItem; } @@ -172,10 +166,9 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @NotNull @ApiModelProperty(example = "[0,1,2,3]", required = true, value = "") @JsonProperty("array_item") - public List getArrayItem() { + public @NotNull List getArrayItem() { return arrayItem; } @@ -230,4 +223,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/User.java index e46b4e9e7907..2a1878ded5d2 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/User.java @@ -47,7 +47,6 @@ public User id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -67,7 +66,6 @@ public User username(String username) { * Get username * @return username */ - @ApiModelProperty(value = "") @JsonProperty("username") public String getUsername() { @@ -87,7 +85,6 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @ApiModelProperty(value = "") @JsonProperty("firstName") public String getFirstName() { @@ -107,7 +104,6 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @ApiModelProperty(value = "") @JsonProperty("lastName") public String getLastName() { @@ -127,7 +123,6 @@ public User email(String email) { * Get email * @return email */ - @ApiModelProperty(value = "") @JsonProperty("email") public String getEmail() { @@ -147,7 +142,6 @@ public User password(String password) { * Get password * @return password */ - @ApiModelProperty(value = "") @JsonProperty("password") public String getPassword() { @@ -167,7 +161,6 @@ public User phone(String phone) { * Get phone * @return phone */ - @ApiModelProperty(value = "") @JsonProperty("phone") public String getPhone() { @@ -187,7 +180,6 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @ApiModelProperty(value = "User Status") @JsonProperty("userStatus") public Integer getUserStatus() { @@ -249,4 +241,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/XmlItem.java index b7a622a0b99e..2e676eb62e75 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/XmlItem.java @@ -34,7 +34,6 @@ public class XmlItem { private Boolean attributeBoolean; - @Valid private List wrappedArray = new ArrayList<>(); private String nameString; @@ -45,10 +44,8 @@ public class XmlItem { private Boolean nameBoolean; - @Valid private List nameArray = new ArrayList<>(); - @Valid private List nameWrappedArray = new ArrayList<>(); private String prefixString; @@ -59,10 +56,8 @@ public class XmlItem { private Boolean prefixBoolean; - @Valid private List prefixArray = new ArrayList<>(); - @Valid private List prefixWrappedArray = new ArrayList<>(); private String namespaceString; @@ -73,10 +68,8 @@ public class XmlItem { private Boolean namespaceBoolean; - @Valid private List namespaceArray = new ArrayList<>(); - @Valid private List namespaceWrappedArray = new ArrayList<>(); private String prefixNsString; @@ -87,10 +80,8 @@ public class XmlItem { private Boolean prefixNsBoolean; - @Valid private List prefixNsArray = new ArrayList<>(); - @Valid private List prefixNsWrappedArray = new ArrayList<>(); public XmlItem attributeString(String attributeString) { @@ -102,7 +93,6 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("attribute_string") public String getAttributeString() { @@ -122,7 +112,6 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("attribute_number") public BigDecimal getAttributeNumber() { @@ -142,7 +131,6 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("attribute_integer") public Integer getAttributeInteger() { @@ -162,7 +150,6 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("attribute_boolean") public Boolean getAttributeBoolean() { @@ -190,7 +177,6 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("wrapped_array") public List getWrappedArray() { @@ -210,7 +196,6 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("name_string") public String getNameString() { @@ -230,7 +215,6 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("name_number") public BigDecimal getNameNumber() { @@ -250,7 +234,6 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("name_integer") public Integer getNameInteger() { @@ -270,7 +253,6 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("name_boolean") public Boolean getNameBoolean() { @@ -298,7 +280,6 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ - @ApiModelProperty(value = "") @JsonProperty("name_array") public List getNameArray() { @@ -326,7 +307,6 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("name_wrapped_array") public List getNameWrappedArray() { @@ -346,7 +326,6 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("prefix_string") public String getPrefixString() { @@ -366,7 +345,6 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("prefix_number") public BigDecimal getPrefixNumber() { @@ -386,7 +364,6 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_integer") public Integer getPrefixInteger() { @@ -406,7 +383,6 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("prefix_boolean") public Boolean getPrefixBoolean() { @@ -434,7 +410,6 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_array") public List getPrefixArray() { @@ -462,7 +437,6 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_wrapped_array") public List getPrefixWrappedArray() { @@ -482,7 +456,6 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("namespace_string") public String getNamespaceString() { @@ -502,7 +475,6 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("namespace_number") public BigDecimal getNamespaceNumber() { @@ -522,7 +494,6 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { @@ -542,7 +513,6 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("namespace_boolean") public Boolean getNamespaceBoolean() { @@ -570,7 +540,6 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ - @ApiModelProperty(value = "") @JsonProperty("namespace_array") public List getNamespaceArray() { @@ -598,7 +567,6 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("namespace_wrapped_array") public List getNamespaceWrappedArray() { @@ -618,7 +586,6 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("prefix_ns_string") public String getPrefixNsString() { @@ -638,7 +605,6 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("prefix_ns_number") public BigDecimal getPrefixNsNumber() { @@ -658,7 +624,6 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { @@ -678,7 +643,6 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("prefix_ns_boolean") public Boolean getPrefixNsBoolean() { @@ -706,7 +670,6 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_ns_array") public List getPrefixNsArray() { @@ -734,7 +697,6 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_ns_wrapped_array") public List getPrefixNsWrappedArray() { @@ -838,4 +800,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java index 6c54d1fc50cc..89bf9ba06e9d 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -56,7 +56,7 @@ default Optional getRequest() { ) default ResponseEntity call123testSpecialTags( - @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + @ApiParam(value = "client model", required = true) @RequestBody @NotNull @Valid Client body ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java index 635fdfff083f..c0b7a16eb54f 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java @@ -64,7 +64,7 @@ default Optional getRequest() { ) default ResponseEntity createXmlItem( - @ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem + @ApiParam(value = "XmlItem Body", required = true) @RequestBody @NotNull @Valid XmlItem xmlItem ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -95,7 +95,7 @@ default ResponseEntity createXmlItem( ) default ResponseEntity fakeOuterBooleanSerialize( - @ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body + @ApiParam(value = "Input boolean as post body") @RequestBody(required = false) Boolean body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -126,7 +126,7 @@ default ResponseEntity fakeOuterBooleanSerialize( ) default ResponseEntity fakeOuterCompositeSerialize( - @ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body + @ApiParam(value = "Input composite as post body") @RequestBody(required = false) @Valid OuterComposite body ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -166,7 +166,7 @@ default ResponseEntity fakeOuterCompositeSerialize( ) default ResponseEntity fakeOuterNumberSerialize( - @ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body + @ApiParam(value = "Input number as post body") @RequestBody(required = false) BigDecimal body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -197,7 +197,7 @@ default ResponseEntity fakeOuterNumberSerialize( ) default ResponseEntity fakeOuterStringSerialize( - @ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body + @ApiParam(value = "Input string as post body") @RequestBody(required = false) String body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -227,7 +227,7 @@ default ResponseEntity fakeOuterStringSerialize( ) default ResponseEntity testBodyWithFileSchema( - @ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass body + @ApiParam(value = "", required = true) @RequestBody @NotNull @Valid FileSchemaTestClass body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -257,8 +257,8 @@ default ResponseEntity testBodyWithFileSchema( ) default ResponseEntity testBodyWithQueryParams( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, - @ApiParam(value = "", required = true) @Valid @RequestBody User body + @ApiParam(value = "", required = true) @RequestParam(value = "query") @NotNull String query, + @ApiParam(value = "", required = true) @RequestBody @NotNull @Valid User body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -290,7 +290,7 @@ default ResponseEntity testBodyWithQueryParams( ) default ResponseEntity testClientModel( - @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + @ApiParam(value = "client model", required = true) @RequestBody @NotNull @Valid Client body ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -347,20 +347,20 @@ default ResponseEntity testClientModel( ) default ResponseEntity testEndpointParameters( - @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "number", required = true) BigDecimal number, - @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "double", required = true) Double _double, - @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, - @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "byte", required = true) byte[] _byte, - @ApiParam(value = "None") @Valid @RequestParam(value = "integer", required = false) Integer integer, - @ApiParam(value = "None") @Valid @RequestParam(value = "int32", required = false) Integer int32, - @ApiParam(value = "None") @Valid @RequestParam(value = "int64", required = false) Long int64, - @ApiParam(value = "None") @Valid @RequestParam(value = "float", required = false) Float _float, - @ApiParam(value = "None") @Valid @RequestParam(value = "string", required = false) String string, + @ApiParam(value = "None", required = true) @RequestParam(value = "number") @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal number, + @ApiParam(value = "None", required = true) @RequestParam(value = "double") @NotNull @DecimalMin("67.8") @DecimalMax("123.4") Double _double, + @ApiParam(value = "None", required = true) @RequestParam(value = "pattern_without_delimiter") @NotNull @Pattern(regexp = "^[A-Z].*") String patternWithoutDelimiter, + @ApiParam(value = "None", required = true) @RequestParam(value = "byte") @NotNull byte[] _byte, + @ApiParam(value = "None") @RequestParam(value = "integer", required = false) @Min(10) @Max(100) Integer integer, + @ApiParam(value = "None") @RequestParam(value = "int32", required = false) @Min(20) @Max(200) Integer int32, + @ApiParam(value = "None") @RequestParam(value = "int64", required = false) Long int64, + @ApiParam(value = "None") @RequestParam(value = "float", required = false) @DecimalMax("987.6") Float _float, + @ApiParam(value = "None") @RequestParam(value = "string", required = false) @Pattern(regexp = "/[a-z]/i") String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @ApiParam(value = "None") @Valid @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, - @ApiParam(value = "None") @Valid @RequestParam(value = "password", required = false) String password, - @ApiParam(value = "None") @Valid @RequestParam(value = "callback", required = false) String paramCallback + @ApiParam(value = "None") @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @RequestParam(value = "password", required = false) @Size(min = 10, max = 64) String password, + @ApiParam(value = "None") @RequestParam(value = "callback", required = false) String paramCallback ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -399,14 +399,14 @@ default ResponseEntity testEndpointParameters( ) default ResponseEntity testEnumParameters( - @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, - @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, - @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, - @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, - @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString + @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestParam(value = "enum_form_string", required = false) String enumFormString ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -440,12 +440,12 @@ default ResponseEntity testEnumParameters( ) default ResponseEntity testGroupParameters( - @NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @ApiParam(value = "Required String in group parameters", required = true) @RequestParam(value = "required_string_group") @NotNull Integer requiredStringGroup, @NotNull @ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, - @NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, - @ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup, + @ApiParam(value = "Required Integer in group parameters", required = true) @RequestParam(value = "required_int64_group") @NotNull Long requiredInt64Group, + @ApiParam(value = "String in group parameters") @RequestParam(value = "string_group", required = false) Integer stringGroup, @ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup, - @ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + @ApiParam(value = "Integer in group parameters") @RequestParam(value = "int64_group", required = false) Long int64Group ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -474,7 +474,7 @@ default ResponseEntity testGroupParameters( ) default ResponseEntity testInlineAdditionalProperties( - @ApiParam(value = "request body", required = true) @Valid @RequestBody Map param + @ApiParam(value = "request body", required = true) @RequestBody @NotNull Map param ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -504,8 +504,8 @@ default ResponseEntity testInlineAdditionalProperties( ) default ResponseEntity testJsonFormData( - @ApiParam(value = "field1", required = true) @Valid @RequestParam(value = "param", required = true) String param, - @ApiParam(value = "field2", required = true) @Valid @RequestParam(value = "param2", required = true) String param2 + @ApiParam(value = "field1", required = true) @RequestParam(value = "param") @NotNull String param, + @ApiParam(value = "field2", required = true) @RequestParam(value = "param2") @NotNull String param2 ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -538,11 +538,11 @@ default ResponseEntity testJsonFormData( ) default ResponseEntity testQueryParameterCollectionFormat( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + @ApiParam(value = "", required = true) @RequestParam(value = "pipe") @NotNull List pipe, + @ApiParam(value = "", required = true) @RequestParam(value = "ioutil") @NotNull List ioutil, + @ApiParam(value = "", required = true) @RequestParam(value = "http") @NotNull List http, + @ApiParam(value = "", required = true) @RequestParam(value = "url") @NotNull List url, + @ApiParam(value = "", required = true) @RequestParam(value = "context") @NotNull List context ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -581,9 +581,9 @@ default ResponseEntity testQueryParameterCollectionFormat( ) default ResponseEntity uploadFileWithRequiredFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, - @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, - @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") @NotNull Long petId, + @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile") MultipartFile requiredFile, + @ApiParam(value = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 57fa6ad4c8e5..fb2da04a0a44 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -59,7 +59,7 @@ default Optional getRequest() { ) default ResponseEntity testClassname( - @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body + @ApiParam(value = "client model", required = true) @RequestBody @NotNull @Valid Client body ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java index 076de878d0cb..12898b30c60b 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java @@ -64,7 +64,7 @@ default Optional getRequest() { ) default ResponseEntity addPet( - @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -101,7 +101,7 @@ default ResponseEntity addPet( ) default ResponseEntity deletePet( - @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") @NotNull Long petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -123,7 +123,7 @@ default ResponseEntity deletePet( nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, - responseContainer = "List", + responseContainer = "array", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @@ -132,7 +132,7 @@ default ResponseEntity deletePet( } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "array"), @ApiResponse(code = 400, message = "Invalid status value") }) @RequestMapping( @@ -142,7 +142,7 @@ default ResponseEntity deletePet( ) default ResponseEntity> findPetsByStatus( - @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status, + @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @RequestParam(value = "status") @NotNull List status, @ApiIgnore final Pageable pageable ) { getRequest().ifPresent(request -> { @@ -180,7 +180,7 @@ default ResponseEntity> findPetsByStatus( nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, - responseContainer = "List", + responseContainer = "array", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @@ -189,7 +189,7 @@ default ResponseEntity> findPetsByStatus( } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "array"), @ApiResponse(code = 400, message = "Invalid tag value") }) @RequestMapping( @@ -199,7 +199,7 @@ default ResponseEntity> findPetsByStatus( ) default ResponseEntity> findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, + @ApiParam(value = "Tags to filter by", required = true) @RequestParam(value = "tags") @NotNull List tags, @ApiIgnore final Pageable pageable ) { getRequest().ifPresent(request -> { @@ -252,7 +252,7 @@ default ResponseEntity> findPetsByTags( ) default ResponseEntity getPetById( - @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") @NotNull Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -285,7 +285,7 @@ default ResponseEntity getPetById( nickname = "listAllPets", notes = "", response = Pet.class, - responseContainer = "List", + responseContainer = "array", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @@ -294,7 +294,7 @@ default ResponseEntity getPetById( } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "array"), @ApiResponse(code = 400, message = "Invalid status value") }) @RequestMapping( @@ -359,7 +359,7 @@ default ResponseEntity> listAllPets( ) default ResponseEntity updatePet( - @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -396,9 +396,9 @@ default ResponseEntity updatePet( ) default ResponseEntity updatePetWithForm( - @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, - @ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, - @ApiParam(value = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status + @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") @NotNull Long petId, + @ApiParam(value = "Updated name of the pet") @RequestParam(value = "name", required = false) String name, + @ApiParam(value = "Updated status of the pet") @RequestParam(value = "status", required = false) String status ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -437,8 +437,8 @@ default ResponseEntity updatePetWithForm( ) default ResponseEntity uploadFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, - @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") @NotNull Long petId, + @ApiParam(value = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) { getRequest().ifPresent(request -> { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java index b22eebf4f1eb..ca42d4bf9bc9 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java @@ -56,7 +56,7 @@ default Optional getRequest() { ) default ResponseEntity deleteOrder( - @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") @NotNull String orderId ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -75,13 +75,13 @@ default ResponseEntity deleteOrder( nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, - responseContainer = "Map", + responseContainer = "map", authorizations = { @Authorization(value = "api_key") } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "map") }) @RequestMapping( method = RequestMethod.GET, @@ -125,7 +125,7 @@ default ResponseEntity> getInventory( ) default ResponseEntity getOrderById( - @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") @NotNull @Min(1L) @Max(5L) Long orderId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -171,7 +171,7 @@ default ResponseEntity getOrderById( ) default ResponseEntity placeOrder( - @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body + @ApiParam(value = "order placed for purchasing the pet", required = true) @RequestBody @NotNull @Valid Order body ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java index eaf1040dd0e7..820e15386748 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java @@ -54,7 +54,7 @@ default Optional getRequest() { ) default ResponseEntity createUser( - @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body + @ApiParam(value = "Created user object", required = true) @RequestBody @NotNull @Valid User body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -82,7 +82,7 @@ default ResponseEntity createUser( ) default ResponseEntity createUsersWithArrayInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@Valid User> body + @ApiParam(value = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -110,7 +110,7 @@ default ResponseEntity createUsersWithArrayInput( ) default ResponseEntity createUsersWithListInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@Valid User> body + @ApiParam(value = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -141,7 +141,7 @@ default ResponseEntity createUsersWithListInput( ) default ResponseEntity deleteUser( - @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") @NotNull String username ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -175,7 +175,7 @@ default ResponseEntity deleteUser( ) default ResponseEntity getUserByName( - @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") @NotNull String username ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -222,8 +222,8 @@ default ResponseEntity getUserByName( ) default ResponseEntity loginUser( - @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, - @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + @ApiParam(value = "The user name for login", required = true) @RequestParam(value = "username") @NotNull String username, + @ApiParam(value = "The password for login in clear text", required = true) @RequestParam(value = "password") @NotNull String password ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -282,8 +282,8 @@ default ResponseEntity logoutUser( ) default ResponseEntity updateUser( - @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, - @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body + @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") @NotNull String username, + @ApiParam(value = "Updated user object", required = true) @RequestBody @NotNull @Valid User body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/VersioningApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/VersioningApi.java index 0cdde6c51ede..359500a0e916 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/VersioningApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/VersioningApi.java @@ -59,7 +59,7 @@ default Optional getRequest() { ) default ResponseEntity versioningHeaders( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") @NotNull Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -106,9 +106,9 @@ default ResponseEntity versioningHeaders( ) default ResponseEntity versioningMix( - @NotNull @ApiParam(value = "", required = true, defaultValue = "V1") @Valid @RequestParam(value = "VersionWithDefaultValueQuery", required = true, defaultValue = "V1") String versionWithDefaultValueQuery, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "VersionNoDefaultValueQuery", required = true) String versionNoDefaultValueQuery, - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + @ApiParam(value = "", required = true, defaultValue = "V1") @RequestParam(value = "VersionWithDefaultValueQuery", defaultValue = "V1") @NotNull String versionWithDefaultValueQuery, + @ApiParam(value = "", required = true) @RequestParam(value = "VersionNoDefaultValueQuery") @NotNull String versionNoDefaultValueQuery, + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") @NotNull Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -150,9 +150,9 @@ default ResponseEntity versioningMix( ) default ResponseEntity versioningQueryParams( - @NotNull @ApiParam(value = "", required = true, defaultValue = "V1") @Valid @RequestParam(value = "VersionWithDefaultValue", required = true, defaultValue = "V1") String versionWithDefaultValue, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "VersionNoDefaultValue", required = true) String versionNoDefaultValue, - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + @ApiParam(value = "", required = true, defaultValue = "V1") @RequestParam(value = "VersionWithDefaultValue", defaultValue = "V1") @NotNull String versionWithDefaultValue, + @ApiParam(value = "", required = true) @RequestParam(value = "VersionNoDefaultValue") @NotNull String versionNoDefaultValue, + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") @NotNull Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index cf57def58490..291e57234974 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -37,7 +37,6 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index dc535ab3e476..f3b2cfe986ca 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -38,7 +38,6 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -126,4 +125,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 4d4bef3fde91..79708a257b1e 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -37,7 +37,6 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 319f2c34510c..cf551ec164f3 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -26,28 +26,20 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class AdditionalPropertiesClass { - @Valid private Map mapString = new HashMap<>(); - @Valid private Map mapNumber = new HashMap<>(); - @Valid private Map mapInteger = new HashMap<>(); - @Valid private Map mapBoolean = new HashMap<>(); - @Valid private Map> mapArrayInteger = new HashMap<>(); - @Valid private Map> mapArrayAnytype = new HashMap<>(); - @Valid private Map> mapMapString = new HashMap<>(); - @Valid private Map> mapMapAnytype = new HashMap<>(); private Object anytype1; @@ -73,7 +65,6 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ - @ApiModelProperty(value = "") @JsonProperty("map_string") public Map getMapString() { @@ -101,7 +92,6 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("map_number") public Map getMapNumber() { @@ -129,7 +119,6 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ - @ApiModelProperty(value = "") @JsonProperty("map_integer") public Map getMapInteger() { @@ -157,7 +146,6 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ - @ApiModelProperty(value = "") @JsonProperty("map_boolean") public Map getMapBoolean() { @@ -185,7 +173,6 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { @@ -213,7 +200,6 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ - @Valid @ApiModelProperty(value = "") @JsonProperty("map_array_anytype") public Map> getMapArrayAnytype() { @@ -241,7 +227,6 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { @@ -269,7 +254,6 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { @@ -289,7 +273,6 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ - @ApiModelProperty(value = "") @JsonProperty("anytype_1") public Object getAnytype1() { @@ -309,7 +292,6 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ - @ApiModelProperty(value = "") @JsonProperty("anytype_2") public Object getAnytype2() { @@ -329,7 +311,6 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ - @ApiModelProperty(value = "") @JsonProperty("anytype_3") public Object getAnytype3() { @@ -397,4 +378,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index e8e32dcd7fa9..f12948a1c898 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -37,7 +37,6 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 50fa525424d3..f31c0d0cd9b2 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -38,7 +38,6 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -126,4 +125,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index b2ca3bf5cb02..98e9b7b1a12a 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -38,7 +38,6 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -126,4 +125,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 7e085a44c93d..822b5e79b89f 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -37,7 +37,6 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Animal.java index ee575e5ad547..c947edd67ac9 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Animal.java @@ -35,7 +35,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class Animal { - private String className; + private @NotNull String className; private String color = "red"; @@ -59,10 +59,9 @@ public Animal className(String className) { * Get className * @return className */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("className") - public String getClassName() { + public @NotNull String getClassName() { return className; } @@ -79,7 +78,6 @@ public Animal color(String color) { * Get color * @return color */ - @ApiModelProperty(value = "") @JsonProperty("color") public String getColor() { @@ -129,4 +127,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 621c01be49ce..249d0bc72466 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnly { - @Valid private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { @@ -46,7 +45,6 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("ArrayArrayNumber") public List> getArrayArrayNumber() { @@ -94,4 +92,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 3f519bbb9baa..58b3ee1a3bcf 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -26,7 +26,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayOfNumberOnly { - @Valid private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnly arrayNumber(List arrayNumber) { @@ -46,7 +45,6 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("ArrayNumber") public List getArrayNumber() { @@ -94,4 +92,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayTest.java index 382556e65bd6..20402ebb213f 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayTest.java @@ -26,13 +26,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayTest { - @Valid private List arrayOfString = new ArrayList<>(); - @Valid private List> arrayArrayOfInteger = new ArrayList<>(); - @Valid private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTest arrayOfString(List arrayOfString) { @@ -52,7 +49,6 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ - @ApiModelProperty(value = "") @JsonProperty("array_of_string") public List getArrayOfString() { @@ -80,7 +76,6 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ - @Valid @ApiModelProperty(value = "") @JsonProperty("array_array_of_integer") public List> getArrayArrayOfInteger() { @@ -91,12 +86,12 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } - public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) { + public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { if (this.arrayArrayOfModel == null) { this.arrayArrayOfModel = new ArrayList<>(); } @@ -108,14 +103,13 @@ public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayO * Get arrayArrayOfModel * @return arrayArrayOfModel */ - @Valid @ApiModelProperty(value = "") @JsonProperty("array_array_of_model") public List> getArrayArrayOfModel() { return arrayArrayOfModel; } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { + public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } @@ -160,4 +154,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Capitalization.java index d6e8a694cf85..f9226321c070 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Capitalization.java @@ -43,7 +43,6 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ - @ApiModelProperty(value = "") @JsonProperty("smallCamel") public String getSmallCamel() { @@ -63,7 +62,6 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ - @ApiModelProperty(value = "") @JsonProperty("CapitalCamel") public String getCapitalCamel() { @@ -83,7 +81,6 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ - @ApiModelProperty(value = "") @JsonProperty("small_Snake") public String getSmallSnake() { @@ -103,7 +100,6 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ - @ApiModelProperty(value = "") @JsonProperty("Capital_Snake") public String getCapitalSnake() { @@ -123,7 +119,6 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ - @ApiModelProperty(value = "") @JsonProperty("SCA_ETH_Flow_Points") public String getScAETHFlowPoints() { @@ -143,7 +138,6 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ - @ApiModelProperty(value = "Name of the pet ") @JsonProperty("ATT_NAME") public String getATTNAME() { @@ -201,4 +195,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Cat.java index f8562653ff90..7276dc5aa48c 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Cat.java @@ -49,7 +49,6 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ - @ApiModelProperty(value = "") @JsonProperty("declawed") public Boolean getDeclawed() { @@ -109,4 +108,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Category.java index a7d5b6e5916d..04e9b386ebbe 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Category.java @@ -24,7 +24,7 @@ public class Category { private Long id; - private String name = "default-name"; + private @NotNull String name = "default-name"; public Category() { super(); @@ -46,7 +46,6 @@ public Category id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -66,10 +65,9 @@ public Category name(String name) { * Get name * @return name */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -116,4 +114,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ClassModel.java index 56aeaf340f38..508e179a1a9e 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ClassModel.java @@ -34,7 +34,6 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @ApiModelProperty(value = "") @JsonProperty("_class") public String getPropertyClass() { @@ -82,4 +81,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Client.java index 23491ea29e60..0463c48505d8 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Client.java @@ -33,7 +33,6 @@ public Client client(String client) { * Get client * @return client */ - @ApiModelProperty(value = "") @JsonProperty("client") public String getClient() { @@ -81,4 +80,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Dog.java index bef3e5409a8e..d4656db2ef88 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Dog.java @@ -49,7 +49,6 @@ public Dog breed(String breed) { * Get breed * @return breed */ - @ApiModelProperty(value = "") @JsonProperty("breed") public String getBreed() { @@ -109,4 +108,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumArrays.java index 5bed35014d25..4a80b3b0ffe9 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumArrays.java @@ -61,7 +61,7 @@ public static JustSymbolEnum fromValue(String value) { } } - private JustSymbolEnum justSymbol; + private String justSymbol; /** * Gets or Sets arrayEnum @@ -98,8 +98,7 @@ public static ArrayEnumEnum fromValue(String value) { } } - @Valid - private List arrayEnum = new ArrayList<>(); + private List arrayEnum = new ArrayList<>(); public EnumArrays justSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; @@ -110,10 +109,9 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ - @ApiModelProperty(value = "") @JsonProperty("just_symbol") - public JustSymbolEnum getJustSymbol() { + public String getJustSymbol() { return justSymbol; } @@ -138,10 +136,9 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ - @ApiModelProperty(value = "") @JsonProperty("array_enum") - public List getArrayEnum() { + public List getArrayEnum() { return arrayEnum; } @@ -188,4 +185,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumTest.java index 2865d76ab8bf..8e3d8978857c 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumTest.java @@ -63,7 +63,7 @@ public static EnumStringEnum fromValue(String value) { } } - private EnumStringEnum enumString; + private String enumString; /** * Gets or Sets enumStringRequired @@ -102,7 +102,7 @@ public static EnumStringRequiredEnum fromValue(String value) { } } - private EnumStringRequiredEnum enumStringRequired; + private @NotNull String enumStringRequired; /** * Gets or Sets enumInteger @@ -139,7 +139,7 @@ public static EnumIntegerEnum fromValue(Integer value) { } } - private EnumIntegerEnum enumInteger; + private Integer enumInteger; /** * Gets or Sets enumNumber @@ -176,7 +176,7 @@ public static EnumNumberEnum fromValue(Double value) { } } - private EnumNumberEnum enumNumber; + private Double enumNumber; private OuterEnum outerEnum; @@ -200,10 +200,9 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ - @ApiModelProperty(value = "") @JsonProperty("enum_string") - public EnumStringEnum getEnumString() { + public String getEnumString() { return enumString; } @@ -220,10 +219,9 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("enum_string_required") - public EnumStringRequiredEnum getEnumStringRequired() { + public @NotNull String getEnumStringRequired() { return enumStringRequired; } @@ -240,10 +238,9 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ - @ApiModelProperty(value = "") @JsonProperty("enum_integer") - public EnumIntegerEnum getEnumInteger() { + public Integer getEnumInteger() { return enumInteger; } @@ -260,10 +257,9 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ - @ApiModelProperty(value = "") @JsonProperty("enum_number") - public EnumNumberEnum getEnumNumber() { + public Double getEnumNumber() { return enumNumber; } @@ -280,7 +276,6 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ - @Valid @ApiModelProperty(value = "") @JsonProperty("outerEnum") public OuterEnum getOuterEnum() { @@ -336,4 +331,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/File.java index 6e16961c2d2f..cd9f95a6f91c 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/File.java @@ -34,7 +34,6 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ - @ApiModelProperty(value = "Test capitalization") @JsonProperty("sourceURI") public String getSourceURI() { @@ -82,4 +81,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 9a40dbd168af..0c2d51df5822 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -26,9 +26,8 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class FileSchemaTestClass { - private File file; + private @Valid File file; - @Valid private List<@Valid File> files = new ArrayList<>(); public FileSchemaTestClass file(File file) { @@ -40,10 +39,9 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ - @Valid @ApiModelProperty(value = "") @JsonProperty("file") - public File getFile() { + public @Valid File getFile() { return file; } @@ -51,7 +49,7 @@ public void setFile(File file) { this.file = file; } - public FileSchemaTestClass files(List<@Valid File> files) { + public FileSchemaTestClass files(List files) { this.files = files; return this; } @@ -68,14 +66,13 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ - @Valid @ApiModelProperty(value = "") @JsonProperty("files") public List<@Valid File> getFiles() { return files; } - public void setFiles(List<@Valid File> files) { + public void setFiles(List files) { this.files = files; } @@ -118,4 +115,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FormatTest.java index fda969ad06d3..fa150f1fa069 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FormatTest.java @@ -30,33 +30,33 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class FormatTest { - private Integer integer; + private @Min(10) @Max(100) Integer integer; - private Integer int32; + private @Min(20) @Max(200) Integer int32; private Long int64; - private BigDecimal number; + private @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal number; - private Float _float; + private @DecimalMin("54.3") @DecimalMax("987.6") Float _float; - private Double _double; + private @DecimalMin("67.8") @DecimalMax("123.4") Double _double; - private String string; + private @Pattern(regexp = "/[a-z]/i") String string; - private byte[] _byte; + private @NotNull byte[] _byte; private org.springframework.core.io.Resource binary; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) - private LocalDate date; + private @NotNull LocalDate date; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; private UUID uuid; - private String password; + private @NotNull @Size(min = 10, max = 64) String password; private BigDecimal bigDecimal; @@ -85,10 +85,9 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ - @Min(10) @Max(100) @ApiModelProperty(value = "") @JsonProperty("integer") - public Integer getInteger() { + public @Min(10) @Max(100) Integer getInteger() { return integer; } @@ -107,10 +106,9 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ - @Min(20) @Max(200) @ApiModelProperty(value = "") @JsonProperty("int32") - public Integer getInt32() { + public @Min(20) @Max(200) Integer getInt32() { return int32; } @@ -127,7 +125,6 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ - @ApiModelProperty(value = "") @JsonProperty("int64") public Long getInt64() { @@ -149,10 +146,9 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ - @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(required = true, value = "") @JsonProperty("number") - public BigDecimal getNumber() { + public @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal getNumber() { return number; } @@ -171,10 +167,9 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ - @DecimalMin("54.3") @DecimalMax("987.6") @ApiModelProperty(value = "") @JsonProperty("float") - public Float getFloat() { + public @DecimalMin("54.3") @DecimalMax("987.6") Float getFloat() { return _float; } @@ -193,10 +188,9 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ - @DecimalMin("67.8") @DecimalMax("123.4") @ApiModelProperty(value = "") @JsonProperty("double") - public Double getDouble() { + public @DecimalMin("67.8") @DecimalMax("123.4") Double getDouble() { return _double; } @@ -213,10 +207,9 @@ public FormatTest string(String string) { * Get string * @return string */ - @Pattern(regexp = "/[a-z]/i") @ApiModelProperty(value = "") @JsonProperty("string") - public String getString() { + public @Pattern(regexp = "/[a-z]/i") String getString() { return string; } @@ -233,10 +226,9 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("byte") - public byte[] getByte() { + public @NotNull byte[] getByte() { return _byte; } @@ -253,7 +245,6 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ - @Valid @ApiModelProperty(value = "") @JsonProperty("binary") public org.springframework.core.io.Resource getBinary() { @@ -273,10 +264,9 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ - @NotNull @Valid @ApiModelProperty(required = true, value = "") @JsonProperty("date") - public LocalDate getDate() { + public @NotNull LocalDate getDate() { return date; } @@ -293,7 +283,6 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ - @Valid @ApiModelProperty(value = "") @JsonProperty("dateTime") public OffsetDateTime getDateTime() { @@ -313,7 +302,6 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ - @Valid @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") @JsonProperty("uuid") public UUID getUuid() { @@ -333,10 +321,9 @@ public FormatTest password(String password) { * Get password * @return password */ - @NotNull @Size(min = 10, max = 64) @ApiModelProperty(required = true, value = "") @JsonProperty("password") - public String getPassword() { + public @NotNull @Size(min = 10, max = 64) String getPassword() { return password; } @@ -353,7 +340,6 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ - @Valid @ApiModelProperty(value = "") @JsonProperty("BigDecimal") public BigDecimal getBigDecimal() { @@ -427,4 +413,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 27ea04eaa86c..628772ab47fe 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -37,7 +37,6 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("bar") public String getBar() { @@ -57,7 +56,6 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("foo") public String getFoo() { @@ -107,4 +105,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/MapTest.java index bd3eea6e64df..a060e9d647a7 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/MapTest.java @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class MapTest { - @Valid private Map> mapMapOfString = new HashMap<>(); /** @@ -63,13 +62,10 @@ public static InnerEnum fromValue(String value) { } } - @Valid - private Map mapOfEnumString = new HashMap<>(); + private Map mapOfEnumString = new HashMap<>(); - @Valid private Map directMap = new HashMap<>(); - @Valid private Map indirectMap = new HashMap<>(); public MapTest mapMapOfString(Map> mapMapOfString) { @@ -89,7 +85,6 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ - @Valid @ApiModelProperty(value = "") @JsonProperty("map_map_of_string") public Map> getMapMapOfString() { @@ -117,10 +112,9 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ - @ApiModelProperty(value = "") @JsonProperty("map_of_enum_string") - public Map getMapOfEnumString() { + public Map getMapOfEnumString() { return mapOfEnumString; } @@ -145,7 +139,6 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ - @ApiModelProperty(value = "") @JsonProperty("direct_map") public Map getDirectMap() { @@ -173,7 +166,6 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ - @ApiModelProperty(value = "") @JsonProperty("indirect_map") public Map getIndirectMap() { @@ -227,4 +219,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index b16370183e0a..0ecca046c869 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -33,8 +33,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; - @Valid - private Map map = new HashMap<>(); + private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { this.uuid = uuid; @@ -45,7 +44,6 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ - @Valid @ApiModelProperty(value = "") @JsonProperty("uuid") public UUID getUuid() { @@ -65,7 +63,6 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ - @Valid @ApiModelProperty(value = "") @JsonProperty("dateTime") public OffsetDateTime getDateTime() { @@ -93,10 +90,9 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ - @Valid @ApiModelProperty(value = "") @JsonProperty("map") - public Map getMap() { + public Map getMap() { return map; } @@ -145,4 +141,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Model200Response.java index 4922749da22c..6f4b8460e6f4 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Model200Response.java @@ -38,7 +38,6 @@ public Model200Response name(Integer name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public Integer getName() { @@ -58,7 +57,6 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @ApiModelProperty(value = "") @JsonProperty("class") public String getPropertyClass() { @@ -108,4 +106,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java index 21244266ad17..31642652231b 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -39,7 +39,6 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @ApiModelProperty(value = "") @JsonProperty("code") public Integer getCode() { @@ -59,7 +58,6 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @ApiModelProperty(value = "") @JsonProperty("type") public String getType() { @@ -79,7 +77,6 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @ApiModelProperty(value = "") @JsonProperty("message") public String getMessage() { @@ -131,4 +128,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelList.java index d3d66db5c095..b9dc65977c53 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelList.java @@ -35,7 +35,6 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ - @ApiModelProperty(value = "") @JsonProperty("123-list") public String get123list() { @@ -83,4 +82,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelReturn.java index 2c8a25a4d85f..72d78cb7fc0b 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelReturn.java @@ -36,7 +36,6 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ - @ApiModelProperty(value = "") @JsonProperty("return") public Integer getReturn() { @@ -84,4 +83,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Name.java index 420c565a9955..f42d379c1083 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Name.java @@ -23,7 +23,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class Name { - private Integer name; + private @NotNull Integer name; private Integer snakeCase; @@ -51,10 +51,9 @@ public Name name(Integer name) { * Get name * @return name */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("name") - public Integer getName() { + public @NotNull Integer getName() { return name; } @@ -71,7 +70,6 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("snake_case") public Integer getSnakeCase() { @@ -91,7 +89,6 @@ public Name property(String property) { * Get property * @return property */ - @ApiModelProperty(value = "") @JsonProperty("property") public String getProperty() { @@ -111,7 +108,6 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("123Number") public Integer get123number() { @@ -165,4 +161,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/NumberOnly.java index 69de58b11374..eb57c97846a2 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/NumberOnly.java @@ -34,7 +34,6 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("JustNumber") public BigDecimal getJustNumber() { @@ -82,4 +81,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Order.java index 48932f68f862..6b84d7a0c4b4 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Order.java @@ -71,7 +71,7 @@ public static StatusEnum fromValue(String value) { } } - private StatusEnum status; + private String status; private Boolean complete = false; @@ -84,7 +84,6 @@ public Order id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -104,7 +103,6 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @ApiModelProperty(value = "") @JsonProperty("petId") public Long getPetId() { @@ -124,7 +122,6 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @ApiModelProperty(value = "") @JsonProperty("quantity") public Integer getQuantity() { @@ -144,7 +141,6 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Valid @ApiModelProperty(value = "") @JsonProperty("shipDate") public OffsetDateTime getShipDate() { @@ -164,10 +160,9 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @ApiModelProperty(value = "Order Status") @JsonProperty("status") - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -184,7 +179,6 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @ApiModelProperty(value = "") @JsonProperty("complete") public Boolean getComplete() { @@ -242,4 +236,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/OuterComposite.java index 2e78c0586cab..2bfc1db21bb2 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/OuterComposite.java @@ -38,7 +38,6 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("my_number") public BigDecimal getMyNumber() { @@ -58,7 +57,6 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ - @ApiModelProperty(value = "") @JsonProperty("my_string") public String getMyString() { @@ -78,7 +76,6 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ - @ApiModelProperty(value = "") @JsonProperty("my_boolean") public Boolean getMyBoolean() { @@ -130,4 +127,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Pet.java index 19339f6c434e..2467fdb92615 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Pet.java @@ -30,14 +30,12 @@ public class Pet { private Long id; - private Category category; + private @Valid Category category; - private String name; + private @NotNull String name; - @Valid - private List photoUrls = new ArrayList<>(); + private @NotNull List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** @@ -77,7 +75,7 @@ public static StatusEnum fromValue(String value) { } } - private StatusEnum status; + private String status; public Pet() { super(); @@ -100,7 +98,6 @@ public Pet id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -120,10 +117,9 @@ public Pet category(Category category) { * Get category * @return category */ - @Valid @ApiModelProperty(value = "") @JsonProperty("category") - public Category getCategory() { + public @Valid Category getCategory() { return category; } @@ -140,10 +136,9 @@ public Pet name(String name) { * Get name * @return name */ - @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -168,10 +163,9 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("photoUrls") - public List getPhotoUrls() { + public @NotNull List getPhotoUrls() { return photoUrls; } @@ -179,7 +173,7 @@ public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List<@Valid Tag> tags) { + public Pet tags(List tags) { this.tags = tags; return this; } @@ -196,14 +190,13 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Valid @ApiModelProperty(value = "") @JsonProperty("tags") public List<@Valid Tag> getTags() { return tags; } - public void setTags(List<@Valid Tag> tags) { + public void setTags(List tags) { this.tags = tags; } @@ -216,10 +209,9 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ - @ApiModelProperty(value = "pet status in the store") @JsonProperty("status") - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -274,4 +266,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 9388f3cfd29f..1eee9577a877 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -35,7 +35,6 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("bar") public String getBar() { @@ -55,7 +54,6 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ - @ApiModelProperty(value = "") @JsonProperty("baz") public String getBaz() { @@ -105,4 +103,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/SpecialModelName.java index 6d6d8e261c74..d4296422472e 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/SpecialModelName.java @@ -35,7 +35,6 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ - @ApiModelProperty(value = "") @JsonProperty("$special[property.name]") public Long get$SpecialPropertyName() { @@ -83,4 +82,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Tag.java index 850c68911db4..d3778890e2d6 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Tag.java @@ -35,7 +35,6 @@ public Tag id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -55,7 +54,6 @@ public Tag name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -105,4 +103,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderDefault.java index a0fe16145d30..6b0e966ec471 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -26,16 +26,15 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class TypeHolderDefault { - private String stringItem = "what"; + private @NotNull String stringItem = "what"; - private BigDecimal numberItem; + private @NotNull BigDecimal numberItem; - private Integer integerItem; + private @NotNull Integer integerItem; - private Boolean boolItem = true; + private @NotNull Boolean boolItem = true; - @Valid - private List arrayItem = new ArrayList<>(); + private @NotNull List arrayItem = new ArrayList<>(); public TypeHolderDefault() { super(); @@ -61,10 +60,9 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("string_item") - public String getStringItem() { + public @NotNull String getStringItem() { return stringItem; } @@ -81,10 +79,9 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @NotNull @Valid @ApiModelProperty(required = true, value = "") @JsonProperty("number_item") - public BigDecimal getNumberItem() { + public @NotNull BigDecimal getNumberItem() { return numberItem; } @@ -101,10 +98,9 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("integer_item") - public Integer getIntegerItem() { + public @NotNull Integer getIntegerItem() { return integerItem; } @@ -121,10 +117,9 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("bool_item") - public Boolean getBoolItem() { + public @NotNull Boolean getBoolItem() { return boolItem; } @@ -149,10 +144,9 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("array_item") - public List getArrayItem() { + public @NotNull List getArrayItem() { return arrayItem; } @@ -205,4 +199,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderExample.java index 909dc1e7fe60..e9b3492a4684 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -26,18 +26,17 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class TypeHolderExample { - private String stringItem; + private @NotNull String stringItem; - private BigDecimal numberItem; + private @NotNull BigDecimal numberItem; - private Float floatItem; + private @NotNull Float floatItem; - private Integer integerItem; + private @NotNull Integer integerItem; - private Boolean boolItem; + private @NotNull Boolean boolItem; - @Valid - private List arrayItem = new ArrayList<>(); + private @NotNull List arrayItem = new ArrayList<>(); public TypeHolderExample() { super(); @@ -64,10 +63,9 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @NotNull @ApiModelProperty(example = "what", required = true, value = "") @JsonProperty("string_item") - public String getStringItem() { + public @NotNull String getStringItem() { return stringItem; } @@ -84,10 +82,9 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @NotNull @Valid @ApiModelProperty(example = "1.234", required = true, value = "") @JsonProperty("number_item") - public BigDecimal getNumberItem() { + public @NotNull BigDecimal getNumberItem() { return numberItem; } @@ -104,10 +101,9 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ - @NotNull @ApiModelProperty(example = "1.234", required = true, value = "") @JsonProperty("float_item") - public Float getFloatItem() { + public @NotNull Float getFloatItem() { return floatItem; } @@ -124,10 +120,9 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @NotNull @ApiModelProperty(example = "-2", required = true, value = "") @JsonProperty("integer_item") - public Integer getIntegerItem() { + public @NotNull Integer getIntegerItem() { return integerItem; } @@ -144,10 +139,9 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @NotNull @ApiModelProperty(example = "true", required = true, value = "") @JsonProperty("bool_item") - public Boolean getBoolItem() { + public @NotNull Boolean getBoolItem() { return boolItem; } @@ -172,10 +166,9 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @NotNull @ApiModelProperty(example = "[0,1,2,3]", required = true, value = "") @JsonProperty("array_item") - public List getArrayItem() { + public @NotNull List getArrayItem() { return arrayItem; } @@ -230,4 +223,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/User.java index e46b4e9e7907..2a1878ded5d2 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/User.java @@ -47,7 +47,6 @@ public User id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -67,7 +66,6 @@ public User username(String username) { * Get username * @return username */ - @ApiModelProperty(value = "") @JsonProperty("username") public String getUsername() { @@ -87,7 +85,6 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @ApiModelProperty(value = "") @JsonProperty("firstName") public String getFirstName() { @@ -107,7 +104,6 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @ApiModelProperty(value = "") @JsonProperty("lastName") public String getLastName() { @@ -127,7 +123,6 @@ public User email(String email) { * Get email * @return email */ - @ApiModelProperty(value = "") @JsonProperty("email") public String getEmail() { @@ -147,7 +142,6 @@ public User password(String password) { * Get password * @return password */ - @ApiModelProperty(value = "") @JsonProperty("password") public String getPassword() { @@ -167,7 +161,6 @@ public User phone(String phone) { * Get phone * @return phone */ - @ApiModelProperty(value = "") @JsonProperty("phone") public String getPhone() { @@ -187,7 +180,6 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @ApiModelProperty(value = "User Status") @JsonProperty("userStatus") public Integer getUserStatus() { @@ -249,4 +241,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/XmlItem.java index b7a622a0b99e..2e676eb62e75 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/XmlItem.java @@ -34,7 +34,6 @@ public class XmlItem { private Boolean attributeBoolean; - @Valid private List wrappedArray = new ArrayList<>(); private String nameString; @@ -45,10 +44,8 @@ public class XmlItem { private Boolean nameBoolean; - @Valid private List nameArray = new ArrayList<>(); - @Valid private List nameWrappedArray = new ArrayList<>(); private String prefixString; @@ -59,10 +56,8 @@ public class XmlItem { private Boolean prefixBoolean; - @Valid private List prefixArray = new ArrayList<>(); - @Valid private List prefixWrappedArray = new ArrayList<>(); private String namespaceString; @@ -73,10 +68,8 @@ public class XmlItem { private Boolean namespaceBoolean; - @Valid private List namespaceArray = new ArrayList<>(); - @Valid private List namespaceWrappedArray = new ArrayList<>(); private String prefixNsString; @@ -87,10 +80,8 @@ public class XmlItem { private Boolean prefixNsBoolean; - @Valid private List prefixNsArray = new ArrayList<>(); - @Valid private List prefixNsWrappedArray = new ArrayList<>(); public XmlItem attributeString(String attributeString) { @@ -102,7 +93,6 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("attribute_string") public String getAttributeString() { @@ -122,7 +112,6 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("attribute_number") public BigDecimal getAttributeNumber() { @@ -142,7 +131,6 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("attribute_integer") public Integer getAttributeInteger() { @@ -162,7 +150,6 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("attribute_boolean") public Boolean getAttributeBoolean() { @@ -190,7 +177,6 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("wrapped_array") public List getWrappedArray() { @@ -210,7 +196,6 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("name_string") public String getNameString() { @@ -230,7 +215,6 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("name_number") public BigDecimal getNameNumber() { @@ -250,7 +234,6 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("name_integer") public Integer getNameInteger() { @@ -270,7 +253,6 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("name_boolean") public Boolean getNameBoolean() { @@ -298,7 +280,6 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ - @ApiModelProperty(value = "") @JsonProperty("name_array") public List getNameArray() { @@ -326,7 +307,6 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("name_wrapped_array") public List getNameWrappedArray() { @@ -346,7 +326,6 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("prefix_string") public String getPrefixString() { @@ -366,7 +345,6 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("prefix_number") public BigDecimal getPrefixNumber() { @@ -386,7 +364,6 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_integer") public Integer getPrefixInteger() { @@ -406,7 +383,6 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("prefix_boolean") public Boolean getPrefixBoolean() { @@ -434,7 +410,6 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_array") public List getPrefixArray() { @@ -462,7 +437,6 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_wrapped_array") public List getPrefixWrappedArray() { @@ -482,7 +456,6 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("namespace_string") public String getNamespaceString() { @@ -502,7 +475,6 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("namespace_number") public BigDecimal getNamespaceNumber() { @@ -522,7 +494,6 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { @@ -542,7 +513,6 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("namespace_boolean") public Boolean getNamespaceBoolean() { @@ -570,7 +540,6 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ - @ApiModelProperty(value = "") @JsonProperty("namespace_array") public List getNamespaceArray() { @@ -598,7 +567,6 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("namespace_wrapped_array") public List getNamespaceWrappedArray() { @@ -618,7 +586,6 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("prefix_ns_string") public String getPrefixNsString() { @@ -638,7 +605,6 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("prefix_ns_number") public BigDecimal getPrefixNsNumber() { @@ -658,7 +624,6 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { @@ -678,7 +643,6 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("prefix_ns_boolean") public Boolean getPrefixNsBoolean() { @@ -706,7 +670,6 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_ns_array") public List getPrefixNsArray() { @@ -734,7 +697,6 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_ns_wrapped_array") public List getPrefixNsWrappedArray() { @@ -838,4 +800,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-provide-args/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-provide-args/src/main/java/org/openapitools/api/UserApi.java index 92f3883d9243..dff02cce07c2 100644 --- a/samples/server/petstore/springboot-spring-provide-args/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-provide-args/src/main/java/org/openapitools/api/UserApi.java @@ -72,8 +72,8 @@ default Optional getRequest() { ) default ResponseEntity loginUser( - @NotNull @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username, - @NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) String password, + @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @RequestParam(value = "username") @NotNull String username, + @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @RequestParam(value = "password") @NotNull String password, @Parameter(hidden = true) @Value("${server.port}") String someValue, @Parameter(hidden = true) @RequestHeader(value="x-project-id", required = false) String someHeaderValue, @Parameter(hidden = true) @RequestHeader final HttpHeaders headers, diff --git a/samples/server/petstore/springboot-spring-provide-args/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-spring-provide-args/src/main/java/org/openapitools/model/Category.java index 40bd14612a60..1586539bcf01 100644 --- a/samples/server/petstore/springboot-spring-provide-args/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-spring-provide-args/src/main/java/org/openapitools/model/Category.java @@ -34,7 +34,6 @@ public Category id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -54,7 +53,6 @@ public Category name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -104,4 +102,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-provide-args/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-spring-provide-args/src/main/java/org/openapitools/model/ModelApiResponse.java index b3ff5612d992..fd7668cb99ed 100644 --- a/samples/server/petstore/springboot-spring-provide-args/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-spring-provide-args/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -38,7 +38,6 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @Schema(name = "code", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("code") public Integer getCode() { @@ -58,7 +57,6 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @Schema(name = "type", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("type") public String getType() { @@ -78,7 +76,6 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @Schema(name = "message", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("message") public String getMessage() { @@ -130,4 +127,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-provide-args/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-spring-provide-args/src/main/java/org/openapitools/model/Order.java index ad95e1ce2cf7..6c8852deb8ca 100644 --- a/samples/server/petstore/springboot-spring-provide-args/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-spring-provide-args/src/main/java/org/openapitools/model/Order.java @@ -70,7 +70,7 @@ public static StatusEnum fromValue(String value) { } } - private StatusEnum status; + private String status; private Boolean complete; @@ -83,7 +83,6 @@ public Order id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -103,7 +102,6 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @Schema(name = "petId", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("petId") public Long getPetId() { @@ -123,7 +121,6 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @Schema(name = "quantity", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("quantity") public Integer getQuantity() { @@ -143,7 +140,6 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Valid @Schema(name = "shipDate", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("shipDate") public OffsetDateTime getShipDate() { @@ -163,10 +159,9 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @Schema(name = "status", description = "Order Status", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("status") - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -183,7 +178,6 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @Schema(name = "complete", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("complete") public Boolean getComplete() { @@ -241,4 +235,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-provide-args/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-spring-provide-args/src/main/java/org/openapitools/model/Pet.java index a67237a5b51a..ff4f60da90bc 100644 --- a/samples/server/petstore/springboot-spring-provide-args/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-spring-provide-args/src/main/java/org/openapitools/model/Pet.java @@ -29,14 +29,12 @@ public class Pet { private Long id; - private Category category; + private @Valid Category category; - private String name; + private @NotNull String name; - @Valid - private List photoUrls = new ArrayList<>(); + private @NotNull List photoUrls = new ArrayList<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** @@ -76,7 +74,7 @@ public static StatusEnum fromValue(String value) { } } - private StatusEnum status; + private String status; public Pet() { super(); @@ -99,7 +97,6 @@ public Pet id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -119,10 +116,9 @@ public Pet category(Category category) { * Get category * @return category */ - @Valid @Schema(name = "category", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("category") - public Category getCategory() { + public @Valid Category getCategory() { return category; } @@ -139,10 +135,9 @@ public Pet name(String name) { * Get name * @return name */ - @NotNull @Schema(name = "name", example = "doggie", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -167,10 +162,9 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @NotNull @Schema(name = "photoUrls", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("photoUrls") - public List getPhotoUrls() { + public @NotNull List getPhotoUrls() { return photoUrls; } @@ -178,7 +172,7 @@ public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List<@Valid Tag> tags) { + public Pet tags(List tags) { this.tags = tags; return this; } @@ -195,14 +189,13 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Valid @Schema(name = "tags", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("tags") public List<@Valid Tag> getTags() { return tags; } - public void setTags(List<@Valid Tag> tags) { + public void setTags(List tags) { this.tags = tags; } @@ -215,10 +208,9 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ - @Schema(name = "status", description = "pet status in the store", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("status") - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -273,4 +265,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-provide-args/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-spring-provide-args/src/main/java/org/openapitools/model/Tag.java index 9e7ac9ebf805..583cbc48e7a6 100644 --- a/samples/server/petstore/springboot-spring-provide-args/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-spring-provide-args/src/main/java/org/openapitools/model/Tag.java @@ -34,7 +34,6 @@ public Tag id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -54,7 +53,6 @@ public Tag name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -104,4 +102,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-spring-provide-args/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-spring-provide-args/src/main/java/org/openapitools/model/User.java index ec465261f6a6..035f3adc34ea 100644 --- a/samples/server/petstore/springboot-spring-provide-args/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-spring-provide-args/src/main/java/org/openapitools/model/User.java @@ -46,7 +46,6 @@ public User id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -66,7 +65,6 @@ public User username(String username) { * Get username * @return username */ - @Schema(name = "username", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("username") public String getUsername() { @@ -86,7 +84,6 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @Schema(name = "firstName", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("firstName") public String getFirstName() { @@ -106,7 +103,6 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @Schema(name = "lastName", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("lastName") public String getLastName() { @@ -126,7 +122,6 @@ public User email(String email) { * Get email * @return email */ - @Schema(name = "email", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("email") public String getEmail() { @@ -146,7 +141,6 @@ public User password(String password) { * Get password * @return password */ - @Schema(name = "password", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("password") public String getPassword() { @@ -166,7 +160,6 @@ public User phone(String phone) { * Get phone * @return phone */ - @Schema(name = "phone", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("phone") public String getPhone() { @@ -186,7 +179,6 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @Schema(name = "userStatus", description = "User Status", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("userStatus") public Integer getUserStatus() { @@ -248,4 +240,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java index 95449b1c5f94..ff3d248c48be 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -56,7 +56,7 @@ default Optional getRequest() { ) default ResponseEntity call123testSpecialTags( - @ApiParam(value = "client model", required = true) @Valid @RequestBody Client client + @ApiParam(value = "client model", required = true) @RequestBody @NotNull @Valid Client client ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java index ecd7b5173fd9..d0a9bd67c67d 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java @@ -66,7 +66,7 @@ default Optional getRequest() { ) default ResponseEntity createXmlItem( - @ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem + @ApiParam(value = "XmlItem Body", required = true) @RequestBody @NotNull @Valid XmlItem xmlItem ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -98,7 +98,7 @@ default ResponseEntity createXmlItem( ) default ResponseEntity fakeOuterBooleanSerialize( - @ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Optional body + @ApiParam(value = "Input boolean as post body") @RequestBody(required = false) Optional body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -130,7 +130,7 @@ default ResponseEntity fakeOuterBooleanSerialize( ) default ResponseEntity fakeOuterCompositeSerialize( - @ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) Optional outerComposite + @ApiParam(value = "Input composite as post body") @RequestBody(required = false) Optional<@Valid OuterComposite> outerComposite ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -171,7 +171,7 @@ default ResponseEntity fakeOuterCompositeSerialize( ) default ResponseEntity fakeOuterNumberSerialize( - @ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) Optional body + @ApiParam(value = "Input number as post body") @RequestBody(required = false) Optional body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -203,7 +203,7 @@ default ResponseEntity fakeOuterNumberSerialize( ) default ResponseEntity fakeOuterStringSerialize( - @ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) Optional body + @ApiParam(value = "Input string as post body") @RequestBody(required = false) Optional body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -233,7 +233,7 @@ default ResponseEntity fakeOuterStringSerialize( ) default ResponseEntity responseObjectDifferentNames( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") @NotNull Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -272,7 +272,7 @@ default ResponseEntity responseObjectDiff ) default ResponseEntity testBodyWithFileSchema( - @ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass fileSchemaTestClass + @ApiParam(value = "", required = true) @RequestBody @NotNull @Valid FileSchemaTestClass fileSchemaTestClass ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -302,8 +302,8 @@ default ResponseEntity testBodyWithFileSchema( ) default ResponseEntity testBodyWithQueryParams( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, - @ApiParam(value = "", required = true) @Valid @RequestBody User user + @ApiParam(value = "", required = true) @RequestParam(value = "query") @NotNull String query, + @ApiParam(value = "", required = true) @RequestBody @NotNull @Valid User user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -335,7 +335,7 @@ default ResponseEntity testBodyWithQueryParams( ) default ResponseEntity testClientModel( - @ApiParam(value = "client model", required = true) @Valid @RequestBody Client client + @ApiParam(value = "client model", required = true) @RequestBody @NotNull @Valid Client client ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -392,20 +392,20 @@ default ResponseEntity testClientModel( ) default ResponseEntity testEndpointParameters( - @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "number", required = true) BigDecimal number, - @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "double", required = true) Double _double, - @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, - @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "byte", required = true) byte[] _byte, - @ApiParam(value = "None") @Valid @RequestParam(value = "integer", required = false) Integer integer, - @ApiParam(value = "None") @Valid @RequestParam(value = "int32", required = false) Integer int32, - @ApiParam(value = "None") @Valid @RequestParam(value = "int64", required = false) Long int64, - @ApiParam(value = "None") @Valid @RequestParam(value = "float", required = false) Float _float, - @ApiParam(value = "None") @Valid @RequestParam(value = "string", required = false) String string, + @ApiParam(value = "None", required = true) @RequestParam(value = "number") @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal number, + @ApiParam(value = "None", required = true) @RequestParam(value = "double") @NotNull @DecimalMin("67.8") @DecimalMax("123.4") Double _double, + @ApiParam(value = "None", required = true) @RequestParam(value = "pattern_without_delimiter") @NotNull @Pattern(regexp = "^[A-Z].*") String patternWithoutDelimiter, + @ApiParam(value = "None", required = true) @RequestParam(value = "byte") @NotNull byte[] _byte, + @ApiParam(value = "None") @RequestParam(value = "integer", required = false) Optional<@Min(10) @Max(100) Integer> integer, + @ApiParam(value = "None") @RequestParam(value = "int32", required = false) Optional<@Min(20) @Max(200) Integer> int32, + @ApiParam(value = "None") @RequestParam(value = "int64", required = false) Optional int64, + @ApiParam(value = "None") @RequestParam(value = "float", required = false) Optional<@DecimalMax("987.6") Float> _float, + @ApiParam(value = "None") @RequestParam(value = "string", required = false) Optional<@Pattern(regexp = "/[a-z]/i") String> string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @ApiParam(value = "None") @Valid @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, - @ApiParam(value = "None") @Valid @RequestParam(value = "password", required = false) String password, - @ApiParam(value = "None") @Valid @RequestParam(value = "callback", required = false) String paramCallback + @ApiParam(value = "None") @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) Optional date, + @ApiParam(value = "None") @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) Optional dateTime, + @ApiParam(value = "None") @RequestParam(value = "password", required = false) Optional<@Size(min = 10, max = 64) String> password, + @ApiParam(value = "None") @RequestParam(value = "callback", required = false) Optional paramCallback ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -444,14 +444,14 @@ default ResponseEntity testEndpointParameters( ) default ResponseEntity testEnumParameters( - @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) Optional> enumHeaderStringArray, + @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) Optional enumHeaderStringArray, @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") Optional enumHeaderString, - @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) Optional> enumQueryStringArray, - @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") Optional enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Optional enumQueryInteger, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Optional enumQueryDouble, - @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, - @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString + @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @RequestParam(value = "enum_query_string_array", required = false) List> enumQueryStringArray, + @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") Optional enumQueryString, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @RequestParam(value = "enum_query_integer", required = false) Optional enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @RequestParam(value = "enum_query_double", required = false) Optional enumQueryDouble, + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @RequestPart(value = "enum_form_string_array", required = false) List> enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestParam(value = "enum_form_string", required = false) Optional enumFormString ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -485,12 +485,12 @@ default ResponseEntity testEnumParameters( ) default ResponseEntity testGroupParameters( - @NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @ApiParam(value = "Required String in group parameters", required = true) @RequestParam(value = "required_string_group") @NotNull Integer requiredStringGroup, @NotNull @ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, - @NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, - @ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Optional stringGroup, + @ApiParam(value = "Required Integer in group parameters", required = true) @RequestParam(value = "required_int64_group") @NotNull Long requiredInt64Group, + @ApiParam(value = "String in group parameters") @RequestParam(value = "string_group", required = false) Optional stringGroup, @ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Optional booleanGroup, - @ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Optional int64Group + @ApiParam(value = "Integer in group parameters") @RequestParam(value = "int64_group", required = false) Optional int64Group ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -520,7 +520,7 @@ default ResponseEntity testGroupParameters( ) default ResponseEntity testInlineAdditionalProperties( - @ApiParam(value = "request body", required = true) @Valid @RequestBody Map requestBody + @ApiParam(value = "request body", required = true) @RequestBody @NotNull Map> requestBody ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -551,8 +551,8 @@ default ResponseEntity testInlineAdditionalProperties( ) default ResponseEntity testJsonFormData( - @ApiParam(value = "field1", required = true) @Valid @RequestParam(value = "param", required = true) String param, - @ApiParam(value = "field2", required = true) @Valid @RequestParam(value = "param2", required = true) String param2 + @ApiParam(value = "field1", required = true) @RequestParam(value = "param") @NotNull String param, + @ApiParam(value = "field2", required = true) @RequestParam(value = "param2") @NotNull String param2 ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -582,7 +582,7 @@ default ResponseEntity testJsonFormData( ) default ResponseEntity testNullable( - @ApiParam(value = "request body", required = true) @Valid @RequestBody ChildWithNullable childWithNullable + @ApiParam(value = "request body", required = true) @RequestBody @NotNull @Valid ChildWithNullable childWithNullable ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -614,10 +614,10 @@ default ResponseEntity testNullable( ) default ResponseEntity testQueryParameterCollectionFormat( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + @ApiParam(value = "", required = true) @RequestParam(value = "pipe") @NotNull List> pipe, + @ApiParam(value = "", required = true) @RequestParam(value = "http") @NotNull List> http, + @ApiParam(value = "", required = true) @RequestParam(value = "url") @NotNull List> url, + @ApiParam(value = "", required = true) @RequestParam(value = "context") @NotNull List> context ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -696,9 +696,9 @@ default ResponseEntity testWithResultExample( ) default ResponseEntity uploadFileWithRequiredFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, - @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, - @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") @NotNull Long petId, + @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile") MultipartFile requiredFile, + @ApiParam(value = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) Optional additionalMetadata ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 6230e1d2c4fc..106e805c95ba 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -59,7 +59,7 @@ default Optional getRequest() { ) default ResponseEntity testClassname( - @ApiParam(value = "client model", required = true) @Valid @RequestBody Client client + @ApiParam(value = "client model", required = true) @RequestBody @NotNull @Valid Client client ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java index d54ca093cbff..f8f0c4d2094e 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java @@ -64,7 +64,7 @@ default Optional getRequest() { ) default ResponseEntity addPet( - @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet pet ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -102,7 +102,7 @@ default ResponseEntity addPet( ) default ResponseEntity deletePet( - @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") @NotNull Long petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) Optional apiKey ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -124,7 +124,7 @@ default ResponseEntity deletePet( nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, - responseContainer = "List", + responseContainer = "array", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @@ -133,7 +133,7 @@ default ResponseEntity deletePet( } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "array"), @ApiResponse(code = 400, message = "Invalid status value") }) @RequestMapping( @@ -143,7 +143,7 @@ default ResponseEntity deletePet( ) default ResponseEntity> findPetsByStatus( - @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status + @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @RequestParam(value = "status") @NotNull List> status ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -180,7 +180,7 @@ default ResponseEntity> findPetsByStatus( nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, - responseContainer = "Set", + responseContainer = "set", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @@ -189,7 +189,7 @@ default ResponseEntity> findPetsByStatus( } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "Set"), + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "set"), @ApiResponse(code = 400, message = "Invalid tag value") }) @RequestMapping( @@ -199,7 +199,7 @@ default ResponseEntity> findPetsByStatus( ) default ResponseEntity> findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags + @ApiParam(value = "Tags to filter by", required = true) @RequestParam(value = "tags") @NotNull Set> tags ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -251,7 +251,7 @@ default ResponseEntity> findPetsByTags( ) default ResponseEntity getPetById( - @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") @NotNull Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -307,7 +307,7 @@ default ResponseEntity getPetById( ) default ResponseEntity updatePet( - @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet pet ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -345,9 +345,9 @@ default ResponseEntity updatePet( ) default ResponseEntity updatePetWithForm( - @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, - @ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, - @ApiParam(value = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status + @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") @NotNull Long petId, + @ApiParam(value = "Updated name of the pet") @RequestParam(value = "name", required = false) Optional name, + @ApiParam(value = "Updated status of the pet") @RequestParam(value = "status", required = false) Optional status ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -387,8 +387,8 @@ default ResponseEntity updatePetWithForm( ) default ResponseEntity uploadFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, - @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") @NotNull Long petId, + @ApiParam(value = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) Optional additionalMetadata, @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) { getRequest().ifPresent(request -> { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java index 5ecfb9933b71..297a887e3eb5 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java @@ -56,7 +56,7 @@ default Optional getRequest() { ) default ResponseEntity deleteOrder( - @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") @NotNull String orderId ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -75,13 +75,13 @@ default ResponseEntity deleteOrder( nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, - responseContainer = "Map", + responseContainer = "map", authorizations = { @Authorization(value = "api_key") } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "map") }) @RequestMapping( method = RequestMethod.GET, @@ -125,7 +125,7 @@ default ResponseEntity> getInventory( ) default ResponseEntity getOrderById( - @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") @NotNull @Min(1L) @Max(5L) Long orderId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -173,7 +173,7 @@ default ResponseEntity getOrderById( ) default ResponseEntity placeOrder( - @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order + @ApiParam(value = "order placed for purchasing the pet", required = true) @RequestBody @NotNull @Valid Order order ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java index 3f247fb6c71e..491ea70380ee 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java @@ -55,7 +55,7 @@ default Optional getRequest() { ) default ResponseEntity createUser( - @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User user + @ApiParam(value = "Created user object", required = true) @RequestBody @NotNull @Valid User user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -85,7 +85,7 @@ default ResponseEntity createUser( ) default ResponseEntity createUsersWithArrayInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + @ApiParam(value = "List of user object", required = true) @RequestBody @NotNull List> user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -115,7 +115,7 @@ default ResponseEntity createUsersWithArrayInput( ) default ResponseEntity createUsersWithListInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + @ApiParam(value = "List of user object", required = true) @RequestBody @NotNull List> user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -146,7 +146,7 @@ default ResponseEntity createUsersWithListInput( ) default ResponseEntity deleteUser( - @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") @NotNull String username ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -181,7 +181,7 @@ default ResponseEntity deleteUser( ) default ResponseEntity getUserByName( - @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") @NotNull String username ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -229,8 +229,8 @@ default ResponseEntity getUserByName( ) default ResponseEntity loginUser( - @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, - @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + @ApiParam(value = "The user name for login", required = true) @RequestParam(value = "username") @NotNull String username, + @ApiParam(value = "The password for login in clear text", required = true) @RequestParam(value = "password") @NotNull String password ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -291,8 +291,8 @@ default ResponseEntity logoutUser( ) default ResponseEntity updateUser( - @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, - @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User user + @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") @NotNull String username, + @ApiParam(value = "Updated user object", required = true) @RequestBody @NotNull @Valid User user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index fbce8d8e2138..06152038157f 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -28,8 +28,8 @@ public class AdditionalPropertiesAnyType { private Optional name = Optional.empty(); - public AdditionalPropertiesAnyType name(String name) { - this.name = Optional.of(name); + public AdditionalPropertiesAnyType name(Optional name) { + this.name = name; return this; } @@ -37,7 +37,6 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public Optional getName() { @@ -142,11 +141,10 @@ protected Builder copyOf(AdditionalPropertiesAnyType value) { return this; } - public AdditionalPropertiesAnyType.Builder name(String name) { + public AdditionalPropertiesAnyType.Builder name(Optional name) { this.instance.name(name); return this; } - public AdditionalPropertiesAnyType.Builder additionalProperties(Map additionalProperties) { this.instance.additionalProperties = additionalProperties; return this; @@ -188,4 +186,3 @@ public AdditionalPropertiesAnyType.Builder toBuilder() { } } - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 503b90ce5245..6fa64decc906 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -29,8 +29,8 @@ public class AdditionalPropertiesArray { private Optional name = Optional.empty(); - public AdditionalPropertiesArray name(String name) { - this.name = Optional.of(name); + public AdditionalPropertiesArray name(Optional name) { + this.name = name; return this; } @@ -38,7 +38,6 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public Optional getName() { @@ -143,11 +142,10 @@ protected Builder copyOf(AdditionalPropertiesArray value) { return this; } - public AdditionalPropertiesArray.Builder name(String name) { + public AdditionalPropertiesArray.Builder name(Optional name) { this.instance.name(name); return this; } - public AdditionalPropertiesArray.Builder additionalProperties(Map additionalProperties) { this.instance.additionalProperties = additionalProperties; return this; @@ -189,4 +187,3 @@ public AdditionalPropertiesArray.Builder toBuilder() { } } - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index d752c5ec4eee..bf9878c24d14 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -28,8 +28,8 @@ public class AdditionalPropertiesBoolean { private Optional name = Optional.empty(); - public AdditionalPropertiesBoolean name(String name) { - this.name = Optional.of(name); + public AdditionalPropertiesBoolean name(Optional name) { + this.name = name; return this; } @@ -37,7 +37,6 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public Optional getName() { @@ -142,11 +141,10 @@ protected Builder copyOf(AdditionalPropertiesBoolean value) { return this; } - public AdditionalPropertiesBoolean.Builder name(String name) { + public AdditionalPropertiesBoolean.Builder name(Optional name) { this.instance.name(name); return this; } - public AdditionalPropertiesBoolean.Builder additionalProperties(Map additionalProperties) { this.instance.additionalProperties = additionalProperties; return this; @@ -188,4 +186,3 @@ public AdditionalPropertiesBoolean.Builder toBuilder() { } } - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 297824f65b54..04c856d98374 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -29,42 +29,34 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class AdditionalPropertiesClass { - @Valid - private Map mapString = new HashMap<>(); + private Map> mapString = new HashMap<>(); - @Valid - private Map mapNumber = new HashMap<>(); + private Map> mapNumber = new HashMap<>(); - @Valid - private Map mapInteger = new HashMap<>(); + private Map> mapInteger = new HashMap<>(); - @Valid - private Map mapBoolean = new HashMap<>(); + private Map> mapBoolean = new HashMap<>(); - @Valid - private Map> mapArrayInteger = new HashMap<>(); + private Map>> mapArrayInteger = new HashMap<>(); - @Valid - private Map> mapArrayAnytype = new HashMap<>(); + private Map>> mapArrayAnytype = new HashMap<>(); - @Valid - private Map> mapMapString = new HashMap<>(); + private Map>> mapMapString = new HashMap<>(); - @Valid - private Map> mapMapAnytype = new HashMap<>(); + private Map>> mapMapAnytype = new HashMap<>(); private Optional anytype1 = Optional.empty(); - private JsonNullable anytype2 = JsonNullable.undefined(); + private JsonNullable anytype2 = JsonNullable.of(null); private Optional anytype3 = Optional.empty(); - public AdditionalPropertiesClass mapString(Map mapString) { + public AdditionalPropertiesClass mapString(Map> mapString) { this.mapString = mapString; return this; } - public AdditionalPropertiesClass putMapStringItem(String key, String mapStringItem) { + public AdditionalPropertiesClass putMapStringItem(String key, Optional mapStringItem) { if (this.mapString == null) { this.mapString = new HashMap<>(); } @@ -76,23 +68,22 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ - @ApiModelProperty(value = "") @JsonProperty("map_string") - public Map getMapString() { + public Map> getMapString() { return mapString; } - public void setMapString(Map mapString) { + public void setMapString(Map> mapString) { this.mapString = mapString; } - public AdditionalPropertiesClass mapNumber(Map mapNumber) { + public AdditionalPropertiesClass mapNumber(Map> mapNumber) { this.mapNumber = mapNumber; return this; } - public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumberItem) { + public AdditionalPropertiesClass putMapNumberItem(String key, Optional mapNumberItem) { if (this.mapNumber == null) { this.mapNumber = new HashMap<>(); } @@ -104,23 +95,22 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("map_number") - public Map getMapNumber() { + public Map> getMapNumber() { return mapNumber; } - public void setMapNumber(Map mapNumber) { + public void setMapNumber(Map> mapNumber) { this.mapNumber = mapNumber; } - public AdditionalPropertiesClass mapInteger(Map mapInteger) { + public AdditionalPropertiesClass mapInteger(Map> mapInteger) { this.mapInteger = mapInteger; return this; } - public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntegerItem) { + public AdditionalPropertiesClass putMapIntegerItem(String key, Optional mapIntegerItem) { if (this.mapInteger == null) { this.mapInteger = new HashMap<>(); } @@ -132,23 +122,22 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ - @ApiModelProperty(value = "") @JsonProperty("map_integer") - public Map getMapInteger() { + public Map> getMapInteger() { return mapInteger; } - public void setMapInteger(Map mapInteger) { + public void setMapInteger(Map> mapInteger) { this.mapInteger = mapInteger; } - public AdditionalPropertiesClass mapBoolean(Map mapBoolean) { + public AdditionalPropertiesClass mapBoolean(Map> mapBoolean) { this.mapBoolean = mapBoolean; return this; } - public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBooleanItem) { + public AdditionalPropertiesClass putMapBooleanItem(String key, Optional mapBooleanItem) { if (this.mapBoolean == null) { this.mapBoolean = new HashMap<>(); } @@ -160,23 +149,22 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ - @ApiModelProperty(value = "") @JsonProperty("map_boolean") - public Map getMapBoolean() { + public Map> getMapBoolean() { return mapBoolean; } - public void setMapBoolean(Map mapBoolean) { + public void setMapBoolean(Map> mapBoolean) { this.mapBoolean = mapBoolean; } - public AdditionalPropertiesClass mapArrayInteger(Map> mapArrayInteger) { + public AdditionalPropertiesClass mapArrayInteger(Map>> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; return this; } - public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List mapArrayIntegerItem) { + public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> mapArrayIntegerItem) { if (this.mapArrayInteger == null) { this.mapArrayInteger = new HashMap<>(); } @@ -188,23 +176,22 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { + public Map>> getMapArrayInteger() { return mapArrayInteger; } - public void setMapArrayInteger(Map> mapArrayInteger) { + public void setMapArrayInteger(Map>> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; } - public AdditionalPropertiesClass mapArrayAnytype(Map> mapArrayAnytype) { + public AdditionalPropertiesClass mapArrayAnytype(Map>> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; return this; } - public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List mapArrayAnytypeItem) { + public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List> mapArrayAnytypeItem) { if (this.mapArrayAnytype == null) { this.mapArrayAnytype = new HashMap<>(); } @@ -216,23 +203,22 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ - @Valid @ApiModelProperty(value = "") @JsonProperty("map_array_anytype") - public Map> getMapArrayAnytype() { + public Map>> getMapArrayAnytype() { return mapArrayAnytype; } - public void setMapArrayAnytype(Map> mapArrayAnytype) { + public void setMapArrayAnytype(Map>> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; } - public AdditionalPropertiesClass mapMapString(Map> mapMapString) { + public AdditionalPropertiesClass mapMapString(Map>> mapMapString) { this.mapMapString = mapMapString; return this; } - public AdditionalPropertiesClass putMapMapStringItem(String key, Map mapMapStringItem) { + public AdditionalPropertiesClass putMapMapStringItem(String key, Map> mapMapStringItem) { if (this.mapMapString == null) { this.mapMapString = new HashMap<>(); } @@ -244,23 +230,22 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { + public Map>> getMapMapString() { return mapMapString; } - public void setMapMapString(Map> mapMapString) { + public void setMapMapString(Map>> mapMapString) { this.mapMapString = mapMapString; } - public AdditionalPropertiesClass mapMapAnytype(Map> mapMapAnytype) { + public AdditionalPropertiesClass mapMapAnytype(Map>> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; return this; } - public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map mapMapAnytypeItem) { + public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> mapMapAnytypeItem) { if (this.mapMapAnytype == null) { this.mapMapAnytype = new HashMap<>(); } @@ -272,19 +257,18 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { + public Map>> getMapMapAnytype() { return mapMapAnytype; } - public void setMapMapAnytype(Map> mapMapAnytype) { + public void setMapMapAnytype(Map>> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } - public AdditionalPropertiesClass anytype1(Object anytype1) { - this.anytype1 = Optional.of(anytype1); + public AdditionalPropertiesClass anytype1(Optional anytype1) { + this.anytype1 = anytype1; return this; } @@ -292,7 +276,6 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ - @ApiModelProperty(value = "") @JsonProperty("anytype_1") public Optional getAnytype1() { @@ -303,8 +286,8 @@ public void setAnytype1(Optional anytype1) { this.anytype1 = anytype1; } - public AdditionalPropertiesClass anytype2(Object anytype2) { - this.anytype2 = JsonNullable.of(anytype2); + public AdditionalPropertiesClass anytype2(JsonNullable anytype2) { + this.anytype2 = anytype2; return this; } @@ -312,7 +295,6 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ - @ApiModelProperty(value = "") @JsonProperty("anytype_2") public JsonNullable getAnytype2() { @@ -323,8 +305,8 @@ public void setAnytype2(JsonNullable anytype2) { this.anytype2 = anytype2; } - public AdditionalPropertiesClass anytype3(Object anytype3) { - this.anytype3 = Optional.of(anytype3); + public AdditionalPropertiesClass anytype3(Optional anytype3) { + this.anytype3 = anytype3; return this; } @@ -332,7 +314,6 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ - @ApiModelProperty(value = "") @JsonProperty("anytype_3") public Optional getAnytype3() { @@ -438,66 +419,50 @@ protected Builder copyOf(AdditionalPropertiesClass value) { return this; } - public AdditionalPropertiesClass.Builder mapString(Map mapString) { + public AdditionalPropertiesClass.Builder mapString(Map> mapString) { this.instance.mapString(mapString); return this; } - - public AdditionalPropertiesClass.Builder mapNumber(Map mapNumber) { + public AdditionalPropertiesClass.Builder mapNumber(Map> mapNumber) { this.instance.mapNumber(mapNumber); return this; } - - public AdditionalPropertiesClass.Builder mapInteger(Map mapInteger) { + public AdditionalPropertiesClass.Builder mapInteger(Map> mapInteger) { this.instance.mapInteger(mapInteger); return this; } - - public AdditionalPropertiesClass.Builder mapBoolean(Map mapBoolean) { + public AdditionalPropertiesClass.Builder mapBoolean(Map> mapBoolean) { this.instance.mapBoolean(mapBoolean); return this; } - - public AdditionalPropertiesClass.Builder mapArrayInteger(Map> mapArrayInteger) { + public AdditionalPropertiesClass.Builder mapArrayInteger(Map>> mapArrayInteger) { this.instance.mapArrayInteger(mapArrayInteger); return this; } - - public AdditionalPropertiesClass.Builder mapArrayAnytype(Map> mapArrayAnytype) { + public AdditionalPropertiesClass.Builder mapArrayAnytype(Map>> mapArrayAnytype) { this.instance.mapArrayAnytype(mapArrayAnytype); return this; } - - public AdditionalPropertiesClass.Builder mapMapString(Map> mapMapString) { + public AdditionalPropertiesClass.Builder mapMapString(Map>> mapMapString) { this.instance.mapMapString(mapMapString); return this; } - - public AdditionalPropertiesClass.Builder mapMapAnytype(Map> mapMapAnytype) { + public AdditionalPropertiesClass.Builder mapMapAnytype(Map>> mapMapAnytype) { this.instance.mapMapAnytype(mapMapAnytype); return this; } - - public AdditionalPropertiesClass.Builder anytype1(Object anytype1) { + public AdditionalPropertiesClass.Builder anytype1(Optional anytype1) { this.instance.anytype1(anytype1); return this; } - - public AdditionalPropertiesClass.Builder anytype2(Object anytype2) { - this.instance.anytype2(anytype2); - return this; - } - public AdditionalPropertiesClass.Builder anytype2(JsonNullable anytype2) { - this.instance.anytype2 = anytype2; + this.instance.anytype2(anytype2); return this; } - - public AdditionalPropertiesClass.Builder anytype3(Object anytype3) { + public AdditionalPropertiesClass.Builder anytype3(Optional anytype3) { this.instance.anytype3(anytype3); return this; } - /** * returns a built AdditionalPropertiesClass instance. * @@ -534,4 +499,3 @@ public AdditionalPropertiesClass.Builder toBuilder() { } } - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 6c7d97b4ae08..edcaf6b74674 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -28,8 +28,8 @@ public class AdditionalPropertiesInteger { private Optional name = Optional.empty(); - public AdditionalPropertiesInteger name(String name) { - this.name = Optional.of(name); + public AdditionalPropertiesInteger name(Optional name) { + this.name = name; return this; } @@ -37,7 +37,6 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public Optional getName() { @@ -142,11 +141,10 @@ protected Builder copyOf(AdditionalPropertiesInteger value) { return this; } - public AdditionalPropertiesInteger.Builder name(String name) { + public AdditionalPropertiesInteger.Builder name(Optional name) { this.instance.name(name); return this; } - public AdditionalPropertiesInteger.Builder additionalProperties(Map additionalProperties) { this.instance.additionalProperties = additionalProperties; return this; @@ -188,4 +186,3 @@ public AdditionalPropertiesInteger.Builder toBuilder() { } } - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index abf0e5ab5db1..1a605e96563c 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -29,8 +29,8 @@ public class AdditionalPropertiesNumber { private Optional name = Optional.empty(); - public AdditionalPropertiesNumber name(String name) { - this.name = Optional.of(name); + public AdditionalPropertiesNumber name(Optional name) { + this.name = name; return this; } @@ -38,7 +38,6 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public Optional getName() { @@ -143,11 +142,10 @@ protected Builder copyOf(AdditionalPropertiesNumber value) { return this; } - public AdditionalPropertiesNumber.Builder name(String name) { + public AdditionalPropertiesNumber.Builder name(Optional name) { this.instance.name(name); return this; } - public AdditionalPropertiesNumber.Builder additionalProperties(Map additionalProperties) { this.instance.additionalProperties = additionalProperties; return this; @@ -189,4 +187,3 @@ public AdditionalPropertiesNumber.Builder toBuilder() { } } - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 98f48a7aab85..328e935b0550 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -29,8 +29,8 @@ public class AdditionalPropertiesObject { private Optional name = Optional.empty(); - public AdditionalPropertiesObject name(String name) { - this.name = Optional.of(name); + public AdditionalPropertiesObject name(Optional name) { + this.name = name; return this; } @@ -38,7 +38,6 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public Optional getName() { @@ -143,11 +142,10 @@ protected Builder copyOf(AdditionalPropertiesObject value) { return this; } - public AdditionalPropertiesObject.Builder name(String name) { + public AdditionalPropertiesObject.Builder name(Optional name) { this.instance.name(name); return this; } - public AdditionalPropertiesObject.Builder additionalProperties(Map additionalProperties) { this.instance.additionalProperties = additionalProperties; return this; @@ -189,4 +187,3 @@ public AdditionalPropertiesObject.Builder toBuilder() { } } - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index b1b4fdc37f09..dafcf5f45f81 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -28,8 +28,8 @@ public class AdditionalPropertiesString { private Optional name = Optional.empty(); - public AdditionalPropertiesString name(String name) { - this.name = Optional.of(name); + public AdditionalPropertiesString name(Optional name) { + this.name = name; return this; } @@ -37,7 +37,6 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public Optional getName() { @@ -142,11 +141,10 @@ protected Builder copyOf(AdditionalPropertiesString value) { return this; } - public AdditionalPropertiesString.Builder name(String name) { + public AdditionalPropertiesString.Builder name(Optional name) { this.instance.name(name); return this; } - public AdditionalPropertiesString.Builder additionalProperties(Map additionalProperties) { this.instance.additionalProperties = additionalProperties; return this; @@ -188,4 +186,3 @@ public AdditionalPropertiesString.Builder toBuilder() { } } - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java index 9ddcf3f09ae0..66aafd7fb7bb 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java @@ -36,7 +36,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class Animal { - private String className; + private @NotNull String className; private Optional color = Optional.of("red"); @@ -60,10 +60,9 @@ public Animal className(String className) { * Get className * @return className */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("className") - public String getClassName() { + public @NotNull String getClassName() { return className; } @@ -71,8 +70,8 @@ public void setClassName(String className) { this.className = className; } - public Animal color(String color) { - this.color = Optional.of(color); + public Animal color(Optional color) { + this.color = color; return this; } @@ -80,7 +79,6 @@ public Animal color(String color) { * Get color * @return color */ - @ApiModelProperty(value = "") @JsonProperty("color") public Optional getColor() { @@ -152,12 +150,10 @@ public Animal.Builder className(String className) { this.instance.className(className); return this; } - - public Animal.Builder color(String color) { + public Animal.Builder color(Optional color) { this.instance.color(color); return this; } - /** * returns a built Animal instance. * @@ -194,4 +190,3 @@ public Animal.Builder toBuilder() { } } - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 88cd889b6745..6328af9ff5a7 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -26,15 +26,14 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnly { - @Valid - private List> arrayArrayNumber = new ArrayList<>(); + private List>> arrayArrayNumber = new ArrayList<>(); - public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { + public ArrayOfArrayOfNumberOnly arrayArrayNumber(List>> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; return this; } - public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayArrayNumberItem) { + public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List> arrayArrayNumberItem) { if (this.arrayArrayNumber == null) { this.arrayArrayNumber = new ArrayList<>(); } @@ -46,14 +45,13 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("ArrayArrayNumber") - public List> getArrayArrayNumber() { + public List>> getArrayArrayNumber() { return arrayArrayNumber; } - public void setArrayArrayNumber(List> arrayArrayNumber) { + public void setArrayArrayNumber(List>> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } @@ -111,11 +109,10 @@ protected Builder copyOf(ArrayOfArrayOfNumberOnly value) { return this; } - public ArrayOfArrayOfNumberOnly.Builder arrayArrayNumber(List> arrayArrayNumber) { + public ArrayOfArrayOfNumberOnly.Builder arrayArrayNumber(List>> arrayArrayNumber) { this.instance.arrayArrayNumber(arrayArrayNumber); return this; } - /** * returns a built ArrayOfArrayOfNumberOnly instance. * @@ -152,4 +149,3 @@ public ArrayOfArrayOfNumberOnly.Builder toBuilder() { } } - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 6c62245c6501..948d810f2f04 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -26,15 +26,14 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayOfNumberOnly { - @Valid - private List arrayNumber = new ArrayList<>(); + private List> arrayNumber = new ArrayList<>(); - public ArrayOfNumberOnly arrayNumber(List arrayNumber) { + public ArrayOfNumberOnly arrayNumber(List> arrayNumber) { this.arrayNumber = arrayNumber; return this; } - public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { + public ArrayOfNumberOnly addArrayNumberItem(Optional arrayNumberItem) { if (this.arrayNumber == null) { this.arrayNumber = new ArrayList<>(); } @@ -46,14 +45,13 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("ArrayNumber") - public List getArrayNumber() { + public List> getArrayNumber() { return arrayNumber; } - public void setArrayNumber(List arrayNumber) { + public void setArrayNumber(List> arrayNumber) { this.arrayNumber = arrayNumber; } @@ -111,11 +109,10 @@ protected Builder copyOf(ArrayOfNumberOnly value) { return this; } - public ArrayOfNumberOnly.Builder arrayNumber(List arrayNumber) { + public ArrayOfNumberOnly.Builder arrayNumber(List> arrayNumber) { this.instance.arrayNumber(arrayNumber); return this; } - /** * returns a built ArrayOfNumberOnly instance. * @@ -152,4 +149,3 @@ public ArrayOfNumberOnly.Builder toBuilder() { } } - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayTest.java index 60df1bb52abf..8e9b9c4e0eef 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayTest.java @@ -26,21 +26,18 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayTest { - @Valid - private List arrayOfString = new ArrayList<>(); + private List> arrayOfString = new ArrayList<>(); - @Valid - private List> arrayArrayOfInteger = new ArrayList<>(); + private List>> arrayArrayOfInteger = new ArrayList<>(); - @Valid - private List> arrayArrayOfModel = new ArrayList<>(); + private List>> arrayArrayOfModel = new ArrayList<>(); - public ArrayTest arrayOfString(List arrayOfString) { + public ArrayTest arrayOfString(List> arrayOfString) { this.arrayOfString = arrayOfString; return this; } - public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { + public ArrayTest addArrayOfStringItem(Optional arrayOfStringItem) { if (this.arrayOfString == null) { this.arrayOfString = new ArrayList<>(); } @@ -52,23 +49,22 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ - @ApiModelProperty(value = "") @JsonProperty("array_of_string") - public List getArrayOfString() { + public List> getArrayOfString() { return arrayOfString; } - public void setArrayOfString(List arrayOfString) { + public void setArrayOfString(List> arrayOfString) { this.arrayOfString = arrayOfString; } - public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { + public ArrayTest arrayArrayOfInteger(List>> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; return this; } - public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) { + public ArrayTest addArrayArrayOfIntegerItem(List> arrayArrayOfIntegerItem) { if (this.arrayArrayOfInteger == null) { this.arrayArrayOfInteger = new ArrayList<>(); } @@ -80,23 +76,22 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ - @Valid @ApiModelProperty(value = "") @JsonProperty("array_array_of_integer") - public List> getArrayArrayOfInteger() { + public List>> getArrayArrayOfInteger() { return arrayArrayOfInteger; } - public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { + public void setArrayArrayOfInteger(List>> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest arrayArrayOfModel(List>> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } - public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) { + public ArrayTest addArrayArrayOfModelItem(List> arrayArrayOfModelItem) { if (this.arrayArrayOfModel == null) { this.arrayArrayOfModel = new ArrayList<>(); } @@ -108,14 +103,13 @@ public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayO * Get arrayArrayOfModel * @return arrayArrayOfModel */ - @Valid @ApiModelProperty(value = "") @JsonProperty("array_array_of_model") - public List> getArrayArrayOfModel() { + public List>> getArrayArrayOfModel() { return arrayArrayOfModel; } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { + public void setArrayArrayOfModel(List>> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } @@ -179,21 +173,18 @@ protected Builder copyOf(ArrayTest value) { return this; } - public ArrayTest.Builder arrayOfString(List arrayOfString) { + public ArrayTest.Builder arrayOfString(List> arrayOfString) { this.instance.arrayOfString(arrayOfString); return this; } - - public ArrayTest.Builder arrayArrayOfInteger(List> arrayArrayOfInteger) { + public ArrayTest.Builder arrayArrayOfInteger(List>> arrayArrayOfInteger) { this.instance.arrayArrayOfInteger(arrayArrayOfInteger); return this; } - - public ArrayTest.Builder arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest.Builder arrayArrayOfModel(List>> arrayArrayOfModel) { this.instance.arrayArrayOfModel(arrayArrayOfModel); return this; } - /** * returns a built ArrayTest instance. * @@ -230,4 +221,3 @@ public ArrayTest.Builder toBuilder() { } } - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java index bdbc30ff5e97..19b4fb106d7f 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java @@ -67,7 +67,7 @@ public static KindEnum fromValue(String value) { } } - private Optional kind = Optional.empty(); + private Optional kind = Optional.empty(); public BigCat() { super(); @@ -80,8 +80,8 @@ public BigCat(String className) { super(className); } - public BigCat kind(KindEnum kind) { - this.kind = Optional.of(kind); + public BigCat kind(Optional kind) { + this.kind = kind; return this; } @@ -89,10 +89,9 @@ public BigCat kind(KindEnum kind) { * Get kind * @return kind */ - @ApiModelProperty(value = "") @JsonProperty("kind") - public Optional getKind() { + public Optional getKind() { return kind; } @@ -101,7 +100,7 @@ public void setKind(Optional kind) { } - public BigCat declawed(Boolean declawed) { + public BigCat declawed(Optional declawed) { super.declawed(declawed); return this; } @@ -111,7 +110,7 @@ public BigCat className(String className) { return this; } - public BigCat color(String color) { + public BigCat color(Optional color) { super.color(color); return this; } @@ -173,29 +172,25 @@ protected Builder copyOf(BigCat value) { return this; } - public BigCat.Builder kind(KindEnum kind) { + public BigCat.Builder kind(Optional kind) { this.instance.kind(kind); return this; } - @Override - public BigCat.Builder declawed(Boolean declawed) { + public BigCat.Builder declawed(Optional declawed) { this.instance.declawed(declawed); return this; } - @Override public BigCat.Builder className(String className) { this.instance.className(className); return this; } - @Override - public BigCat.Builder color(String color) { + public BigCat.Builder color(Optional color) { this.instance.color(color); return this; } - /** * returns a built BigCat instance. * @@ -233,4 +228,3 @@ public BigCat.Builder toBuilder() { } } - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Capitalization.java index c065ba4dcf57..1ce73d607d96 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Capitalization.java @@ -34,8 +34,8 @@ public class Capitalization { private Optional ATT_NAME = Optional.empty(); - public Capitalization smallCamel(String smallCamel) { - this.smallCamel = Optional.of(smallCamel); + public Capitalization smallCamel(Optional smallCamel) { + this.smallCamel = smallCamel; return this; } @@ -43,7 +43,6 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ - @ApiModelProperty(value = "") @JsonProperty("smallCamel") public Optional getSmallCamel() { @@ -54,8 +53,8 @@ public void setSmallCamel(Optional smallCamel) { this.smallCamel = smallCamel; } - public Capitalization capitalCamel(String capitalCamel) { - this.capitalCamel = Optional.of(capitalCamel); + public Capitalization capitalCamel(Optional capitalCamel) { + this.capitalCamel = capitalCamel; return this; } @@ -63,7 +62,6 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ - @ApiModelProperty(value = "") @JsonProperty("CapitalCamel") public Optional getCapitalCamel() { @@ -74,8 +72,8 @@ public void setCapitalCamel(Optional capitalCamel) { this.capitalCamel = capitalCamel; } - public Capitalization smallSnake(String smallSnake) { - this.smallSnake = Optional.of(smallSnake); + public Capitalization smallSnake(Optional smallSnake) { + this.smallSnake = smallSnake; return this; } @@ -83,7 +81,6 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ - @ApiModelProperty(value = "") @JsonProperty("small_Snake") public Optional getSmallSnake() { @@ -94,8 +91,8 @@ public void setSmallSnake(Optional smallSnake) { this.smallSnake = smallSnake; } - public Capitalization capitalSnake(String capitalSnake) { - this.capitalSnake = Optional.of(capitalSnake); + public Capitalization capitalSnake(Optional capitalSnake) { + this.capitalSnake = capitalSnake; return this; } @@ -103,7 +100,6 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ - @ApiModelProperty(value = "") @JsonProperty("Capital_Snake") public Optional getCapitalSnake() { @@ -114,8 +110,8 @@ public void setCapitalSnake(Optional capitalSnake) { this.capitalSnake = capitalSnake; } - public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { - this.scAETHFlowPoints = Optional.of(scAETHFlowPoints); + public Capitalization scAETHFlowPoints(Optional scAETHFlowPoints) { + this.scAETHFlowPoints = scAETHFlowPoints; return this; } @@ -123,7 +119,6 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ - @ApiModelProperty(value = "") @JsonProperty("SCA_ETH_Flow_Points") public Optional getScAETHFlowPoints() { @@ -134,8 +129,8 @@ public void setScAETHFlowPoints(Optional scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; } - public Capitalization ATT_NAME(String ATT_NAME) { - this.ATT_NAME = Optional.of(ATT_NAME); + public Capitalization ATT_NAME(Optional ATT_NAME) { + this.ATT_NAME = ATT_NAME; return this; } @@ -143,7 +138,6 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ - @ApiModelProperty(value = "Name of the pet ") @JsonProperty("ATT_NAME") public Optional getATTNAME() { @@ -223,36 +217,30 @@ protected Builder copyOf(Capitalization value) { return this; } - public Capitalization.Builder smallCamel(String smallCamel) { + public Capitalization.Builder smallCamel(Optional smallCamel) { this.instance.smallCamel(smallCamel); return this; } - - public Capitalization.Builder capitalCamel(String capitalCamel) { + public Capitalization.Builder capitalCamel(Optional capitalCamel) { this.instance.capitalCamel(capitalCamel); return this; } - - public Capitalization.Builder smallSnake(String smallSnake) { + public Capitalization.Builder smallSnake(Optional smallSnake) { this.instance.smallSnake(smallSnake); return this; } - - public Capitalization.Builder capitalSnake(String capitalSnake) { + public Capitalization.Builder capitalSnake(Optional capitalSnake) { this.instance.capitalSnake(capitalSnake); return this; } - - public Capitalization.Builder scAETHFlowPoints(String scAETHFlowPoints) { + public Capitalization.Builder scAETHFlowPoints(Optional scAETHFlowPoints) { this.instance.scAETHFlowPoints(scAETHFlowPoints); return this; } - - public Capitalization.Builder ATT_NAME(String ATT_NAME) { + public Capitalization.Builder ATT_NAME(Optional ATT_NAME) { this.instance.ATT_NAME(ATT_NAME); return this; } - /** * returns a built Capitalization instance. * @@ -289,4 +277,3 @@ public Capitalization.Builder toBuilder() { } } - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java index 88272a629ef6..002479009e4b 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java @@ -48,8 +48,8 @@ public Cat(String className) { super(className); } - public Cat declawed(Boolean declawed) { - this.declawed = Optional.of(declawed); + public Cat declawed(Optional declawed) { + this.declawed = declawed; return this; } @@ -57,7 +57,6 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ - @ApiModelProperty(value = "") @JsonProperty("declawed") public Optional getDeclawed() { @@ -74,7 +73,7 @@ public Cat className(String className) { return this; } - public Cat color(String color) { + public Cat color(Optional color) { super.color(color); return this; } @@ -136,23 +135,20 @@ protected Builder copyOf(Cat value) { return this; } - public Cat.Builder declawed(Boolean declawed) { + public Cat.Builder declawed(Optional declawed) { this.instance.declawed(declawed); return this; } - @Override public Cat.Builder className(String className) { this.instance.className(className); return this; } - @Override - public Cat.Builder color(String color) { + public Cat.Builder color(Optional color) { this.instance.color(color); return this; } - /** * returns a built Cat instance. * @@ -190,4 +186,3 @@ public Cat.Builder toBuilder() { } } - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Category.java index 28c07ebaef8f..5c00c3510f15 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Category.java @@ -24,7 +24,7 @@ public class Category { private Optional id = Optional.empty(); - private String name = "default-name"; + private @NotNull String name = "default-name"; public Category() { super(); @@ -37,8 +37,8 @@ public Category(String name) { this.name = name; } - public Category id(Long id) { - this.id = Optional.of(id); + public Category id(Optional id) { + this.id = id; return this; } @@ -46,7 +46,6 @@ public Category id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Optional getId() { @@ -66,10 +65,9 @@ public Category name(String name) { * Get name * @return name */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -134,16 +132,14 @@ protected Builder copyOf(Category value) { return this; } - public Category.Builder id(Long id) { + public Category.Builder id(Optional id) { this.instance.id(id); return this; } - public Category.Builder name(String name) { this.instance.name(name); return this; } - /** * returns a built Category instance. * @@ -180,4 +176,3 @@ public Category.Builder toBuilder() { } } - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ChildWithNullable.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ChildWithNullable.java index c54221c25885..de4d127a932d 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ChildWithNullable.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ChildWithNullable.java @@ -32,8 +32,8 @@ public class ChildWithNullable extends ParentWithNullable { private Optional otherProperty = Optional.empty(); - public ChildWithNullable otherProperty(String otherProperty) { - this.otherProperty = Optional.of(otherProperty); + public ChildWithNullable otherProperty(Optional otherProperty) { + this.otherProperty = otherProperty; return this; } @@ -41,7 +41,6 @@ public ChildWithNullable otherProperty(String otherProperty) { * Get otherProperty * @return otherProperty */ - @ApiModelProperty(value = "") @JsonProperty("otherProperty") public Optional getOtherProperty() { @@ -53,12 +52,12 @@ public void setOtherProperty(Optional otherProperty) { } - public ChildWithNullable type(TypeEnum type) { + public ChildWithNullable type(Optional type) { super.type(type); return this; } - public ChildWithNullable nullableProperty(String nullableProperty) { + public ChildWithNullable nullableProperty(JsonNullable nullableProperty) { super.nullableProperty(nullableProperty); return this; } @@ -131,28 +130,20 @@ protected Builder copyOf(ChildWithNullable value) { return this; } - public ChildWithNullable.Builder otherProperty(String otherProperty) { + public ChildWithNullable.Builder otherProperty(Optional otherProperty) { this.instance.otherProperty(otherProperty); return this; } - @Override - public ChildWithNullable.Builder type(TypeEnum type) { + public ChildWithNullable.Builder type(Optional type) { this.instance.type(type); return this; } - @Override - public ChildWithNullable.Builder nullableProperty(String nullableProperty) { - this.instance.nullableProperty(nullableProperty); - return this; - } - public ChildWithNullable.Builder nullableProperty(JsonNullable nullableProperty) { - this.instance.setNullableProperty(nullableProperty); + this.instance.nullableProperty(nullableProperty); return this; } - /** * returns a built ChildWithNullable instance. * @@ -190,4 +181,3 @@ public ChildWithNullable.Builder toBuilder() { } } - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ClassModel.java index 4fd84da0b91a..1b27501d300c 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ClassModel.java @@ -25,8 +25,8 @@ public class ClassModel { private Optional propertyClass = Optional.empty(); - public ClassModel propertyClass(String propertyClass) { - this.propertyClass = Optional.of(propertyClass); + public ClassModel propertyClass(Optional propertyClass) { + this.propertyClass = propertyClass; return this; } @@ -34,7 +34,6 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @ApiModelProperty(value = "") @JsonProperty("_class") public Optional getPropertyClass() { @@ -99,11 +98,10 @@ protected Builder copyOf(ClassModel value) { return this; } - public ClassModel.Builder propertyClass(String propertyClass) { + public ClassModel.Builder propertyClass(Optional propertyClass) { this.instance.propertyClass(propertyClass); return this; } - /** * returns a built ClassModel instance. * @@ -140,4 +138,3 @@ public ClassModel.Builder toBuilder() { } } - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Client.java index 0ffbf2166b65..8598d639aed7 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Client.java @@ -24,8 +24,8 @@ public class Client { private Optional client = Optional.empty(); - public Client client(String client) { - this.client = Optional.of(client); + public Client client(Optional client) { + this.client = client; return this; } @@ -33,7 +33,6 @@ public Client client(String client) { * Get client * @return client */ - @ApiModelProperty(value = "") @JsonProperty("client") public Optional getClient() { @@ -98,11 +97,10 @@ protected Builder copyOf(Client value) { return this; } - public Client.Builder client(String client) { + public Client.Builder client(Optional client) { this.instance.client(client); return this; } - /** * returns a built Client instance. * @@ -139,4 +137,3 @@ public Client.Builder toBuilder() { } } - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ContainerDefaultValue.java index 21a1bae5189f..6d33e0ba888f 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ContainerDefaultValue.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -27,17 +27,13 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ContainerDefaultValue { - @Valid - private JsonNullable> nullableArray = JsonNullable.>undefined(); + private JsonNullable>> nullableArray = JsonNullable.undefined(); - @Valid - private JsonNullable> nullableRequiredArray = JsonNullable.>undefined(); + private JsonNullable>> nullableRequiredArray = JsonNullable.undefined(); - @Valid - private List requiredArray = new ArrayList<>(); + private @NotNull List> requiredArray = new ArrayList<>(); - @Valid - private JsonNullable> nullableArrayWithDefault = JsonNullable.>undefined(); + private JsonNullable>> nullableArrayWithDefault = JsonNullable.of(new ArrayList<>(Arrays.asList("foo", "bar"))); public ContainerDefaultValue() { super(); @@ -46,17 +42,17 @@ public ContainerDefaultValue() { /** * Constructor with only required parameters */ - public ContainerDefaultValue(List nullableRequiredArray, List requiredArray) { - this.nullableRequiredArray = JsonNullable.of(nullableRequiredArray); + public ContainerDefaultValue(JsonNullable>> nullableRequiredArray, List> requiredArray) { + this.nullableRequiredArray = nullableRequiredArray; this.requiredArray = requiredArray; } - public ContainerDefaultValue nullableArray(List nullableArray) { - this.nullableArray = JsonNullable.of(nullableArray); + public ContainerDefaultValue nullableArray(JsonNullable>> nullableArray) { + this.nullableArray = nullableArray; return this; } - public ContainerDefaultValue addNullableArrayItem(String nullableArrayItem) { + public ContainerDefaultValue addNullableArrayItem(Optional nullableArrayItem) { if (this.nullableArray == null || !this.nullableArray.isPresent()) { this.nullableArray = JsonNullable.of(new ArrayList<>()); } @@ -68,23 +64,22 @@ public ContainerDefaultValue addNullableArrayItem(String nullableArrayItem) { * Get nullableArray * @return nullableArray */ - @ApiModelProperty(value = "") @JsonProperty("nullable_array") - public JsonNullable> getNullableArray() { + public JsonNullable>> getNullableArray() { return nullableArray; } - public void setNullableArray(JsonNullable> nullableArray) { + public void setNullableArray(JsonNullable>> nullableArray) { this.nullableArray = nullableArray; } - public ContainerDefaultValue nullableRequiredArray(List nullableRequiredArray) { - this.nullableRequiredArray = JsonNullable.of(nullableRequiredArray); + public ContainerDefaultValue nullableRequiredArray(JsonNullable>> nullableRequiredArray) { + this.nullableRequiredArray = nullableRequiredArray; return this; } - public ContainerDefaultValue addNullableRequiredArrayItem(String nullableRequiredArrayItem) { + public ContainerDefaultValue addNullableRequiredArrayItem(Optional nullableRequiredArrayItem) { if (this.nullableRequiredArray == null || !this.nullableRequiredArray.isPresent()) { this.nullableRequiredArray = JsonNullable.of(new ArrayList<>()); } @@ -96,23 +91,22 @@ public ContainerDefaultValue addNullableRequiredArrayItem(String nullableRequire * Get nullableRequiredArray * @return nullableRequiredArray */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("nullable_required_array") - public JsonNullable> getNullableRequiredArray() { + public JsonNullable>> getNullableRequiredArray() { return nullableRequiredArray; } - public void setNullableRequiredArray(JsonNullable> nullableRequiredArray) { + public void setNullableRequiredArray(JsonNullable>> nullableRequiredArray) { this.nullableRequiredArray = nullableRequiredArray; } - public ContainerDefaultValue requiredArray(List requiredArray) { + public ContainerDefaultValue requiredArray(List> requiredArray) { this.requiredArray = requiredArray; return this; } - public ContainerDefaultValue addRequiredArrayItem(String requiredArrayItem) { + public ContainerDefaultValue addRequiredArrayItem(Optional requiredArrayItem) { if (this.requiredArray == null) { this.requiredArray = new ArrayList<>(); } @@ -124,23 +118,22 @@ public ContainerDefaultValue addRequiredArrayItem(String requiredArrayItem) { * Get requiredArray * @return requiredArray */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("required_array") - public List getRequiredArray() { + public @NotNull List> getRequiredArray() { return requiredArray; } - public void setRequiredArray(List requiredArray) { + public void setRequiredArray(List> requiredArray) { this.requiredArray = requiredArray; } - public ContainerDefaultValue nullableArrayWithDefault(List nullableArrayWithDefault) { - this.nullableArrayWithDefault = JsonNullable.of(nullableArrayWithDefault); + public ContainerDefaultValue nullableArrayWithDefault(JsonNullable>> nullableArrayWithDefault) { + this.nullableArrayWithDefault = nullableArrayWithDefault; return this; } - public ContainerDefaultValue addNullableArrayWithDefaultItem(String nullableArrayWithDefaultItem) { + public ContainerDefaultValue addNullableArrayWithDefaultItem(Optional nullableArrayWithDefaultItem) { if (this.nullableArrayWithDefault == null || !this.nullableArrayWithDefault.isPresent()) { this.nullableArrayWithDefault = JsonNullable.of(new ArrayList<>(Arrays.asList("foo", "bar"))); } @@ -152,14 +145,13 @@ public ContainerDefaultValue addNullableArrayWithDefaultItem(String nullableArra * Get nullableArrayWithDefault * @return nullableArrayWithDefault */ - @ApiModelProperty(value = "") @JsonProperty("nullable_array_with_default") - public JsonNullable> getNullableArrayWithDefault() { + public JsonNullable>> getNullableArrayWithDefault() { return nullableArrayWithDefault; } - public void setNullableArrayWithDefault(JsonNullable> nullableArrayWithDefault) { + public void setNullableArrayWithDefault(JsonNullable>> nullableArrayWithDefault) { this.nullableArrayWithDefault = nullableArrayWithDefault; } @@ -237,41 +229,22 @@ protected Builder copyOf(ContainerDefaultValue value) { return this; } - public ContainerDefaultValue.Builder nullableArray(List nullableArray) { + public ContainerDefaultValue.Builder nullableArray(JsonNullable>> nullableArray) { this.instance.nullableArray(nullableArray); return this; } - - public ContainerDefaultValue.Builder nullableArray(JsonNullable> nullableArray) { - this.instance.nullableArray = nullableArray; - return this; - } - - public ContainerDefaultValue.Builder nullableRequiredArray(List nullableRequiredArray) { + public ContainerDefaultValue.Builder nullableRequiredArray(JsonNullable>> nullableRequiredArray) { this.instance.nullableRequiredArray(nullableRequiredArray); return this; } - - public ContainerDefaultValue.Builder nullableRequiredArray(JsonNullable> nullableRequiredArray) { - this.instance.nullableRequiredArray = nullableRequiredArray; - return this; - } - - public ContainerDefaultValue.Builder requiredArray(List requiredArray) { + public ContainerDefaultValue.Builder requiredArray(List> requiredArray) { this.instance.requiredArray(requiredArray); return this; } - - public ContainerDefaultValue.Builder nullableArrayWithDefault(List nullableArrayWithDefault) { + public ContainerDefaultValue.Builder nullableArrayWithDefault(JsonNullable>> nullableArrayWithDefault) { this.instance.nullableArrayWithDefault(nullableArrayWithDefault); return this; } - - public ContainerDefaultValue.Builder nullableArrayWithDefault(JsonNullable> nullableArrayWithDefault) { - this.instance.nullableArrayWithDefault = nullableArrayWithDefault; - return this; - } - /** * returns a built ContainerDefaultValue instance. * @@ -308,4 +281,3 @@ public ContainerDefaultValue.Builder toBuilder() { } } - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java index a81880dd3cf2..da2c0b50e922 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java @@ -40,8 +40,8 @@ public Dog(String className) { super(className); } - public Dog breed(String breed) { - this.breed = Optional.of(breed); + public Dog breed(Optional breed) { + this.breed = breed; return this; } @@ -49,7 +49,6 @@ public Dog breed(String breed) { * Get breed * @return breed */ - @ApiModelProperty(value = "") @JsonProperty("breed") public Optional getBreed() { @@ -66,7 +65,7 @@ public Dog className(String className) { return this; } - public Dog color(String color) { + public Dog color(Optional color) { super.color(color); return this; } @@ -128,23 +127,20 @@ protected Builder copyOf(Dog value) { return this; } - public Dog.Builder breed(String breed) { + public Dog.Builder breed(Optional breed) { this.instance.breed(breed); return this; } - @Override public Dog.Builder className(String className) { this.instance.className(className); return this; } - @Override - public Dog.Builder color(String color) { + public Dog.Builder color(Optional color) { this.instance.color(color); return this; } - /** * returns a built Dog instance. * @@ -182,4 +178,3 @@ public Dog.Builder toBuilder() { } } - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java index a2a8f15c3e1e..e8408107749e 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java @@ -61,7 +61,7 @@ public static JustSymbolEnum fromValue(String value) { } } - private Optional justSymbol = Optional.empty(); + private Optional justSymbol = Optional.empty(); /** * Gets or Sets arrayEnum @@ -98,11 +98,10 @@ public static ArrayEnumEnum fromValue(String value) { } } - @Valid - private List arrayEnum = new ArrayList<>(); + private List> arrayEnum = new ArrayList<>(); - public EnumArrays justSymbol(JustSymbolEnum justSymbol) { - this.justSymbol = Optional.of(justSymbol); + public EnumArrays justSymbol(Optional justSymbol) { + this.justSymbol = justSymbol; return this; } @@ -110,10 +109,9 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ - @ApiModelProperty(value = "") @JsonProperty("just_symbol") - public Optional getJustSymbol() { + public Optional getJustSymbol() { return justSymbol; } @@ -121,12 +119,12 @@ public void setJustSymbol(Optional justSymbol) { this.justSymbol = justSymbol; } - public EnumArrays arrayEnum(List arrayEnum) { + public EnumArrays arrayEnum(List> arrayEnum) { this.arrayEnum = arrayEnum; return this; } - public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { + public EnumArrays addArrayEnumItem(Optional arrayEnumItem) { if (this.arrayEnum == null) { this.arrayEnum = new ArrayList<>(); } @@ -138,14 +136,13 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ - @ApiModelProperty(value = "") @JsonProperty("array_enum") - public List getArrayEnum() { + public List> getArrayEnum() { return arrayEnum; } - public void setArrayEnum(List arrayEnum) { + public void setArrayEnum(List> arrayEnum) { this.arrayEnum = arrayEnum; } @@ -206,16 +203,14 @@ protected Builder copyOf(EnumArrays value) { return this; } - public EnumArrays.Builder justSymbol(JustSymbolEnum justSymbol) { + public EnumArrays.Builder justSymbol(Optional justSymbol) { this.instance.justSymbol(justSymbol); return this; } - - public EnumArrays.Builder arrayEnum(List arrayEnum) { + public EnumArrays.Builder arrayEnum(List> arrayEnum) { this.instance.arrayEnum(arrayEnum); return this; } - /** * returns a built EnumArrays instance. * @@ -252,4 +247,3 @@ public EnumArrays.Builder toBuilder() { } } - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java index 0e343fb84b7b..8f0d5aadebc5 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java @@ -63,7 +63,7 @@ public static EnumStringEnum fromValue(String value) { } } - private Optional enumString = Optional.empty(); + private Optional enumString = Optional.empty(); /** * Gets or Sets enumStringRequired @@ -102,7 +102,7 @@ public static EnumStringRequiredEnum fromValue(String value) { } } - private EnumStringRequiredEnum enumStringRequired; + private @NotNull String enumStringRequired; /** * Gets or Sets enumInteger @@ -139,7 +139,7 @@ public static EnumIntegerEnum fromValue(Integer value) { } } - private Optional enumInteger = Optional.empty(); + private Optional enumInteger = Optional.empty(); /** * Gets or Sets enumNumber @@ -176,7 +176,7 @@ public static EnumNumberEnum fromValue(Double value) { } } - private Optional enumNumber = Optional.empty(); + private Optional enumNumber = Optional.empty(); private Optional outerEnum = Optional.empty(); @@ -191,8 +191,8 @@ public EnumTest(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; } - public EnumTest enumString(EnumStringEnum enumString) { - this.enumString = Optional.of(enumString); + public EnumTest enumString(Optional enumString) { + this.enumString = enumString; return this; } @@ -200,10 +200,9 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ - @ApiModelProperty(value = "") @JsonProperty("enum_string") - public Optional getEnumString() { + public Optional getEnumString() { return enumString; } @@ -220,10 +219,9 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("enum_string_required") - public EnumStringRequiredEnum getEnumStringRequired() { + public @NotNull String getEnumStringRequired() { return enumStringRequired; } @@ -231,8 +229,8 @@ public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; } - public EnumTest enumInteger(EnumIntegerEnum enumInteger) { - this.enumInteger = Optional.of(enumInteger); + public EnumTest enumInteger(Optional enumInteger) { + this.enumInteger = enumInteger; return this; } @@ -240,10 +238,9 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ - @ApiModelProperty(value = "") @JsonProperty("enum_integer") - public Optional getEnumInteger() { + public Optional getEnumInteger() { return enumInteger; } @@ -251,8 +248,8 @@ public void setEnumInteger(Optional enumInteger) { this.enumInteger = enumInteger; } - public EnumTest enumNumber(EnumNumberEnum enumNumber) { - this.enumNumber = Optional.of(enumNumber); + public EnumTest enumNumber(Optional enumNumber) { + this.enumNumber = enumNumber; return this; } @@ -260,10 +257,9 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ - @ApiModelProperty(value = "") @JsonProperty("enum_number") - public Optional getEnumNumber() { + public Optional getEnumNumber() { return enumNumber; } @@ -271,8 +267,8 @@ public void setEnumNumber(Optional enumNumber) { this.enumNumber = enumNumber; } - public EnumTest outerEnum(OuterEnum outerEnum) { - this.outerEnum = Optional.of(outerEnum); + public EnumTest outerEnum(Optional outerEnum) { + this.outerEnum = outerEnum; return this; } @@ -280,7 +276,6 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ - @Valid @ApiModelProperty(value = "") @JsonProperty("outerEnum") public Optional getOuterEnum() { @@ -357,31 +352,26 @@ protected Builder copyOf(EnumTest value) { return this; } - public EnumTest.Builder enumString(EnumStringEnum enumString) { + public EnumTest.Builder enumString(Optional enumString) { this.instance.enumString(enumString); return this; } - public EnumTest.Builder enumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.instance.enumStringRequired(enumStringRequired); return this; } - - public EnumTest.Builder enumInteger(EnumIntegerEnum enumInteger) { + public EnumTest.Builder enumInteger(Optional enumInteger) { this.instance.enumInteger(enumInteger); return this; } - - public EnumTest.Builder enumNumber(EnumNumberEnum enumNumber) { + public EnumTest.Builder enumNumber(Optional enumNumber) { this.instance.enumNumber(enumNumber); return this; } - - public EnumTest.Builder outerEnum(OuterEnum outerEnum) { + public EnumTest.Builder outerEnum(Optional outerEnum) { this.instance.outerEnum(outerEnum); return this; } - /** * returns a built EnumTest instance. * @@ -418,4 +408,3 @@ public EnumTest.Builder toBuilder() { } } - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/File.java index f2b13b5b4fbe..4ec74bc030b2 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/File.java @@ -25,8 +25,8 @@ public class File { private Optional sourceURI = Optional.empty(); - public File sourceURI(String sourceURI) { - this.sourceURI = Optional.of(sourceURI); + public File sourceURI(Optional sourceURI) { + this.sourceURI = sourceURI; return this; } @@ -34,7 +34,6 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ - @ApiModelProperty(value = "Test capitalization") @JsonProperty("sourceURI") public Optional getSourceURI() { @@ -99,11 +98,10 @@ protected Builder copyOf(File value) { return this; } - public File.Builder sourceURI(String sourceURI) { + public File.Builder sourceURI(Optional sourceURI) { this.instance.sourceURI(sourceURI); return this; } - /** * returns a built File instance. * @@ -140,4 +138,3 @@ public File.Builder toBuilder() { } } - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FileSchemaTestClass.java index a62b58b16dc1..47c6e564c64d 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -26,13 +26,12 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class FileSchemaTestClass { - private Optional file = Optional.empty(); + private Optional<@Valid File> file = Optional.empty(); - @Valid - private List<@Valid File> files = new ArrayList<>(); + private List> files = new ArrayList<>(); - public FileSchemaTestClass file(File file) { - this.file = Optional.of(file); + public FileSchemaTestClass file(Optional file) { + this.file = file; return this; } @@ -40,10 +39,9 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ - @Valid @ApiModelProperty(value = "") @JsonProperty("file") - public Optional getFile() { + public Optional<@Valid File> getFile() { return file; } @@ -51,12 +49,12 @@ public void setFile(Optional file) { this.file = file; } - public FileSchemaTestClass files(List<@Valid File> files) { + public FileSchemaTestClass files(List> files) { this.files = files; return this; } - public FileSchemaTestClass addFilesItem(File filesItem) { + public FileSchemaTestClass addFilesItem(Optional filesItem) { if (this.files == null) { this.files = new ArrayList<>(); } @@ -68,14 +66,13 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ - @Valid @ApiModelProperty(value = "") @JsonProperty("files") - public List<@Valid File> getFiles() { + public List> getFiles() { return files; } - public void setFiles(List<@Valid File> files) { + public void setFiles(List> files) { this.files = files; } @@ -136,16 +133,14 @@ protected Builder copyOf(FileSchemaTestClass value) { return this; } - public FileSchemaTestClass.Builder file(File file) { + public FileSchemaTestClass.Builder file(Optional file) { this.instance.file(file); return this; } - - public FileSchemaTestClass.Builder files(List<@Valid File> files) { + public FileSchemaTestClass.Builder files(List> files) { this.instance.files(files); return this; } - /** * returns a built FileSchemaTestClass instance. * @@ -182,4 +177,3 @@ public FileSchemaTestClass.Builder toBuilder() { } } - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java index d5be8c0beefa..097d68e43280 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java @@ -36,7 +36,7 @@ public class FormatTest { private Optional int64 = Optional.empty(); - private BigDecimal number; + private @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal number; private Optional<@DecimalMin("54.3") @DecimalMax("987.6") Float> _float = Optional.empty(); @@ -44,19 +44,19 @@ public class FormatTest { private Optional<@Pattern(regexp = "/[a-z]/i") String> string = Optional.empty(); - private byte[] _byte; + private @NotNull byte[] _byte; private Optional binary = Optional.empty(); @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) - private LocalDate date; + private @NotNull LocalDate date; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private Optional dateTime = Optional.empty(); private Optional uuid = Optional.empty(); - private String password; + private @NotNull @Size(min = 10, max = 64) String password; private Optional bigDecimal = Optional.empty(); @@ -74,8 +74,8 @@ public FormatTest(BigDecimal number, byte[] _byte, LocalDate date, String passwo this.password = password; } - public FormatTest integer(Integer integer) { - this.integer = Optional.of(integer); + public FormatTest integer(Optional integer) { + this.integer = integer; return this; } @@ -85,7 +85,6 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ - @ApiModelProperty(value = "") @JsonProperty("integer") public Optional<@Min(10) @Max(100) Integer> getInteger() { @@ -96,8 +95,8 @@ public void setInteger(Optional integer) { this.integer = integer; } - public FormatTest int32(Integer int32) { - this.int32 = Optional.of(int32); + public FormatTest int32(Optional int32) { + this.int32 = int32; return this; } @@ -107,7 +106,6 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ - @ApiModelProperty(value = "") @JsonProperty("int32") public Optional<@Min(20) @Max(200) Integer> getInt32() { @@ -118,8 +116,8 @@ public void setInt32(Optional int32) { this.int32 = int32; } - public FormatTest int64(Long int64) { - this.int64 = Optional.of(int64); + public FormatTest int64(Optional int64) { + this.int64 = int64; return this; } @@ -127,7 +125,6 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ - @ApiModelProperty(value = "") @JsonProperty("int64") public Optional getInt64() { @@ -149,10 +146,9 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ - @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(required = true, value = "") @JsonProperty("number") - public BigDecimal getNumber() { + public @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal getNumber() { return number; } @@ -160,8 +156,8 @@ public void setNumber(BigDecimal number) { this.number = number; } - public FormatTest _float(Float _float) { - this._float = Optional.of(_float); + public FormatTest _float(Optional _float) { + this._float = _float; return this; } @@ -171,7 +167,6 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ - @ApiModelProperty(value = "") @JsonProperty("float") public Optional<@DecimalMin("54.3") @DecimalMax("987.6") Float> getFloat() { @@ -182,8 +177,8 @@ public void setFloat(Optional _float) { this._float = _float; } - public FormatTest _double(Double _double) { - this._double = Optional.of(_double); + public FormatTest _double(Optional _double) { + this._double = _double; return this; } @@ -193,7 +188,6 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ - @ApiModelProperty(value = "") @JsonProperty("double") public Optional<@DecimalMin("67.8") @DecimalMax("123.4") Double> getDouble() { @@ -204,8 +198,8 @@ public void setDouble(Optional _double) { this._double = _double; } - public FormatTest string(String string) { - this.string = Optional.of(string); + public FormatTest string(Optional string) { + this.string = string; return this; } @@ -213,7 +207,6 @@ public FormatTest string(String string) { * Get string * @return string */ - @ApiModelProperty(value = "") @JsonProperty("string") public Optional<@Pattern(regexp = "/[a-z]/i") String> getString() { @@ -233,10 +226,9 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("byte") - public byte[] getByte() { + public @NotNull byte[] getByte() { return _byte; } @@ -244,8 +236,8 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(org.springframework.core.io.Resource binary) { - this.binary = Optional.of(binary); + public FormatTest binary(Optional binary) { + this.binary = binary; return this; } @@ -253,7 +245,6 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ - @Valid @ApiModelProperty(value = "") @JsonProperty("binary") public Optional getBinary() { @@ -273,10 +264,9 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ - @NotNull @Valid @ApiModelProperty(required = true, value = "") @JsonProperty("date") - public LocalDate getDate() { + public @NotNull LocalDate getDate() { return date; } @@ -284,8 +274,8 @@ public void setDate(LocalDate date) { this.date = date; } - public FormatTest dateTime(OffsetDateTime dateTime) { - this.dateTime = Optional.of(dateTime); + public FormatTest dateTime(Optional dateTime) { + this.dateTime = dateTime; return this; } @@ -293,7 +283,6 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ - @Valid @ApiModelProperty(value = "") @JsonProperty("dateTime") public Optional getDateTime() { @@ -304,8 +293,8 @@ public void setDateTime(Optional dateTime) { this.dateTime = dateTime; } - public FormatTest uuid(UUID uuid) { - this.uuid = Optional.of(uuid); + public FormatTest uuid(Optional uuid) { + this.uuid = uuid; return this; } @@ -313,7 +302,6 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ - @Valid @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") @JsonProperty("uuid") public Optional getUuid() { @@ -333,10 +321,9 @@ public FormatTest password(String password) { * Get password * @return password */ - @NotNull @Size(min = 10, max = 64) @ApiModelProperty(required = true, value = "") @JsonProperty("password") - public String getPassword() { + public @NotNull @Size(min = 10, max = 64) String getPassword() { return password; } @@ -344,8 +331,8 @@ public void setPassword(String password) { this.password = password; } - public FormatTest bigDecimal(BigDecimal bigDecimal) { - this.bigDecimal = Optional.of(bigDecimal); + public FormatTest bigDecimal(Optional bigDecimal) { + this.bigDecimal = bigDecimal; return this; } @@ -353,7 +340,6 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ - @Valid @ApiModelProperty(value = "") @JsonProperty("BigDecimal") public Optional getBigDecimal() { @@ -457,76 +443,62 @@ protected Builder copyOf(FormatTest value) { return this; } - public FormatTest.Builder integer(Integer integer) { + public FormatTest.Builder integer(Optional integer) { this.instance.integer(integer); return this; } - - public FormatTest.Builder int32(Integer int32) { + public FormatTest.Builder int32(Optional int32) { this.instance.int32(int32); return this; } - - public FormatTest.Builder int64(Long int64) { + public FormatTest.Builder int64(Optional int64) { this.instance.int64(int64); return this; } - public FormatTest.Builder number(BigDecimal number) { this.instance.number(number); return this; } - - public FormatTest.Builder _float(Float _float) { + public FormatTest.Builder _float(Optional _float) { this.instance._float(_float); return this; } - - public FormatTest.Builder _double(Double _double) { + public FormatTest.Builder _double(Optional _double) { this.instance._double(_double); return this; } - - public FormatTest.Builder string(String string) { + public FormatTest.Builder string(Optional string) { this.instance.string(string); return this; } - public FormatTest.Builder _byte(byte[] _byte) { this.instance._byte(_byte); return this; } - - public FormatTest.Builder binary(org.springframework.core.io.Resource binary) { + public FormatTest.Builder binary(Optional binary) { this.instance.binary(binary); return this; } - public FormatTest.Builder date(LocalDate date) { this.instance.date(date); return this; } - - public FormatTest.Builder dateTime(OffsetDateTime dateTime) { + public FormatTest.Builder dateTime(Optional dateTime) { this.instance.dateTime(dateTime); return this; } - - public FormatTest.Builder uuid(UUID uuid) { + public FormatTest.Builder uuid(Optional uuid) { this.instance.uuid(uuid); return this; } - public FormatTest.Builder password(String password) { this.instance.password(password); return this; } - - public FormatTest.Builder bigDecimal(BigDecimal bigDecimal) { + public FormatTest.Builder bigDecimal(Optional bigDecimal) { this.instance.bigDecimal(bigDecimal); return this; } - /** * returns a built FormatTest instance. * @@ -563,4 +535,3 @@ public FormatTest.Builder toBuilder() { } } - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index ebb0369be954..3b392f9551f9 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -28,8 +28,8 @@ public class HasOnlyReadOnly { private Optional foo = Optional.empty(); - public HasOnlyReadOnly bar(String bar) { - this.bar = Optional.of(bar); + public HasOnlyReadOnly bar(Optional bar) { + this.bar = bar; return this; } @@ -37,7 +37,6 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("bar") public Optional getBar() { @@ -48,8 +47,8 @@ public void setBar(Optional bar) { this.bar = bar; } - public HasOnlyReadOnly foo(String foo) { - this.foo = Optional.of(foo); + public HasOnlyReadOnly foo(Optional foo) { + this.foo = foo; return this; } @@ -57,7 +56,6 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("foo") public Optional getFoo() { @@ -125,16 +123,14 @@ protected Builder copyOf(HasOnlyReadOnly value) { return this; } - public HasOnlyReadOnly.Builder bar(String bar) { + public HasOnlyReadOnly.Builder bar(Optional bar) { this.instance.bar(bar); return this; } - - public HasOnlyReadOnly.Builder foo(String foo) { + public HasOnlyReadOnly.Builder foo(Optional foo) { this.instance.foo(foo); return this; } - /** * returns a built HasOnlyReadOnly instance. * @@ -171,4 +167,3 @@ public HasOnlyReadOnly.Builder toBuilder() { } } - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java index e178aaaba156..23ed8cdb5ef3 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java @@ -25,8 +25,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class MapTest { - @Valid - private Map> mapMapOfString = new HashMap<>(); + private Map>> mapMapOfString = new HashMap<>(); /** * Gets or Sets inner @@ -63,21 +62,18 @@ public static InnerEnum fromValue(String value) { } } - @Valid - private Map mapOfEnumString = new HashMap<>(); + private Map> mapOfEnumString = new HashMap<>(); - @Valid - private Map directMap = new HashMap<>(); + private Map> directMap = new HashMap<>(); - @Valid - private Map indirectMap = new HashMap<>(); + private Map> indirectMap = new HashMap<>(); - public MapTest mapMapOfString(Map> mapMapOfString) { + public MapTest mapMapOfString(Map>> mapMapOfString) { this.mapMapOfString = mapMapOfString; return this; } - public MapTest putMapMapOfStringItem(String key, Map mapMapOfStringItem) { + public MapTest putMapMapOfStringItem(String key, Map> mapMapOfStringItem) { if (this.mapMapOfString == null) { this.mapMapOfString = new HashMap<>(); } @@ -89,23 +85,22 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ - @Valid @ApiModelProperty(value = "") @JsonProperty("map_map_of_string") - public Map> getMapMapOfString() { + public Map>> getMapMapOfString() { return mapMapOfString; } - public void setMapMapOfString(Map> mapMapOfString) { + public void setMapMapOfString(Map>> mapMapOfString) { this.mapMapOfString = mapMapOfString; } - public MapTest mapOfEnumString(Map mapOfEnumString) { + public MapTest mapOfEnumString(Map> mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; return this; } - public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) { + public MapTest putMapOfEnumStringItem(String key, Optional mapOfEnumStringItem) { if (this.mapOfEnumString == null) { this.mapOfEnumString = new HashMap<>(); } @@ -117,23 +112,22 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ - @ApiModelProperty(value = "") @JsonProperty("map_of_enum_string") - public Map getMapOfEnumString() { + public Map> getMapOfEnumString() { return mapOfEnumString; } - public void setMapOfEnumString(Map mapOfEnumString) { + public void setMapOfEnumString(Map> mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } - public MapTest directMap(Map directMap) { + public MapTest directMap(Map> directMap) { this.directMap = directMap; return this; } - public MapTest putDirectMapItem(String key, Boolean directMapItem) { + public MapTest putDirectMapItem(String key, Optional directMapItem) { if (this.directMap == null) { this.directMap = new HashMap<>(); } @@ -145,23 +139,22 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ - @ApiModelProperty(value = "") @JsonProperty("direct_map") - public Map getDirectMap() { + public Map> getDirectMap() { return directMap; } - public void setDirectMap(Map directMap) { + public void setDirectMap(Map> directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { + public MapTest indirectMap(Map> indirectMap) { this.indirectMap = indirectMap; return this; } - public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { + public MapTest putIndirectMapItem(String key, Optional indirectMapItem) { if (this.indirectMap == null) { this.indirectMap = new HashMap<>(); } @@ -173,14 +166,13 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ - @ApiModelProperty(value = "") @JsonProperty("indirect_map") - public Map getIndirectMap() { + public Map> getIndirectMap() { return indirectMap; } - public void setIndirectMap(Map indirectMap) { + public void setIndirectMap(Map> indirectMap) { this.indirectMap = indirectMap; } @@ -247,26 +239,22 @@ protected Builder copyOf(MapTest value) { return this; } - public MapTest.Builder mapMapOfString(Map> mapMapOfString) { + public MapTest.Builder mapMapOfString(Map>> mapMapOfString) { this.instance.mapMapOfString(mapMapOfString); return this; } - - public MapTest.Builder mapOfEnumString(Map mapOfEnumString) { + public MapTest.Builder mapOfEnumString(Map> mapOfEnumString) { this.instance.mapOfEnumString(mapOfEnumString); return this; } - - public MapTest.Builder directMap(Map directMap) { + public MapTest.Builder directMap(Map> directMap) { this.instance.directMap(directMap); return this; } - - public MapTest.Builder indirectMap(Map indirectMap) { + public MapTest.Builder indirectMap(Map> indirectMap) { this.instance.indirectMap(indirectMap); return this; } - /** * returns a built MapTest instance. * @@ -303,4 +291,3 @@ public MapTest.Builder toBuilder() { } } - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 85437c414f85..a791d3a9878e 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -33,11 +33,10 @@ public class MixedPropertiesAndAdditionalPropertiesClass { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private Optional dateTime = Optional.empty(); - @Valid - private Map map = new HashMap<>(); + private Map> map = new HashMap<>(); - public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { - this.uuid = Optional.of(uuid); + public MixedPropertiesAndAdditionalPropertiesClass uuid(Optional uuid) { + this.uuid = uuid; return this; } @@ -45,7 +44,6 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ - @Valid @ApiModelProperty(value = "") @JsonProperty("uuid") public Optional getUuid() { @@ -56,8 +54,8 @@ public void setUuid(Optional uuid) { this.uuid = uuid; } - public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateTime) { - this.dateTime = Optional.of(dateTime); + public MixedPropertiesAndAdditionalPropertiesClass dateTime(Optional dateTime) { + this.dateTime = dateTime; return this; } @@ -65,7 +63,6 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ - @Valid @ApiModelProperty(value = "") @JsonProperty("dateTime") public Optional getDateTime() { @@ -76,12 +73,12 @@ public void setDateTime(Optional dateTime) { this.dateTime = dateTime; } - public MixedPropertiesAndAdditionalPropertiesClass map(Map map) { + public MixedPropertiesAndAdditionalPropertiesClass map(Map> map) { this.map = map; return this; } - public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) { + public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Optional mapItem) { if (this.map == null) { this.map = new HashMap<>(); } @@ -93,14 +90,13 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ - @Valid @ApiModelProperty(value = "") @JsonProperty("map") - public Map getMap() { + public Map> getMap() { return map; } - public void setMap(Map map) { + public void setMap(Map> map) { this.map = map; } @@ -164,21 +160,18 @@ protected Builder copyOf(MixedPropertiesAndAdditionalPropertiesClass value) { return this; } - public MixedPropertiesAndAdditionalPropertiesClass.Builder uuid(UUID uuid) { + public MixedPropertiesAndAdditionalPropertiesClass.Builder uuid(Optional uuid) { this.instance.uuid(uuid); return this; } - - public MixedPropertiesAndAdditionalPropertiesClass.Builder dateTime(OffsetDateTime dateTime) { + public MixedPropertiesAndAdditionalPropertiesClass.Builder dateTime(Optional dateTime) { this.instance.dateTime(dateTime); return this; } - - public MixedPropertiesAndAdditionalPropertiesClass.Builder map(Map map) { + public MixedPropertiesAndAdditionalPropertiesClass.Builder map(Map> map) { this.instance.map(map); return this; } - /** * returns a built MixedPropertiesAndAdditionalPropertiesClass instance. * @@ -215,4 +208,3 @@ public MixedPropertiesAndAdditionalPropertiesClass.Builder toBuilder() { } } - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Model200Response.java index d57659d38388..4ce7e7756d07 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Model200Response.java @@ -29,8 +29,8 @@ public class Model200Response { private Optional propertyClass = Optional.empty(); - public Model200Response name(Integer name) { - this.name = Optional.of(name); + public Model200Response name(Optional name) { + this.name = name; return this; } @@ -38,7 +38,6 @@ public Model200Response name(Integer name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public Optional getName() { @@ -49,8 +48,8 @@ public void setName(Optional name) { this.name = name; } - public Model200Response propertyClass(String propertyClass) { - this.propertyClass = Optional.of(propertyClass); + public Model200Response propertyClass(Optional propertyClass) { + this.propertyClass = propertyClass; return this; } @@ -58,7 +57,6 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @ApiModelProperty(value = "") @JsonProperty("class") public Optional getPropertyClass() { @@ -126,16 +124,14 @@ protected Builder copyOf(Model200Response value) { return this; } - public Model200Response.Builder name(Integer name) { + public Model200Response.Builder name(Optional name) { this.instance.name(name); return this; } - - public Model200Response.Builder propertyClass(String propertyClass) { + public Model200Response.Builder propertyClass(Optional propertyClass) { this.instance.propertyClass(propertyClass); return this; } - /** * returns a built Model200Response instance. * @@ -172,4 +168,3 @@ public Model200Response.Builder toBuilder() { } } - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelApiResponse.java index 67a07507fb61..4187079145ea 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -30,8 +30,8 @@ public class ModelApiResponse { private Optional message = Optional.empty(); - public ModelApiResponse code(Integer code) { - this.code = Optional.of(code); + public ModelApiResponse code(Optional code) { + this.code = code; return this; } @@ -39,7 +39,6 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @ApiModelProperty(value = "") @JsonProperty("code") public Optional getCode() { @@ -50,8 +49,8 @@ public void setCode(Optional code) { this.code = code; } - public ModelApiResponse type(String type) { - this.type = Optional.of(type); + public ModelApiResponse type(Optional type) { + this.type = type; return this; } @@ -59,7 +58,6 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @ApiModelProperty(value = "") @JsonProperty("type") public Optional getType() { @@ -70,8 +68,8 @@ public void setType(Optional type) { this.type = type; } - public ModelApiResponse message(String message) { - this.message = Optional.of(message); + public ModelApiResponse message(Optional message) { + this.message = message; return this; } @@ -79,7 +77,6 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @ApiModelProperty(value = "") @JsonProperty("message") public Optional getMessage() { @@ -150,21 +147,18 @@ protected Builder copyOf(ModelApiResponse value) { return this; } - public ModelApiResponse.Builder code(Integer code) { + public ModelApiResponse.Builder code(Optional code) { this.instance.code(code); return this; } - - public ModelApiResponse.Builder type(String type) { + public ModelApiResponse.Builder type(Optional type) { this.instance.type(type); return this; } - - public ModelApiResponse.Builder message(String message) { + public ModelApiResponse.Builder message(Optional message) { this.instance.message(message); return this; } - /** * returns a built ModelApiResponse instance. * @@ -201,4 +195,3 @@ public ModelApiResponse.Builder toBuilder() { } } - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelList.java index 881f0884a23b..1fcd0779bc2c 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelList.java @@ -26,8 +26,8 @@ public class ModelList { private Optional _123list = Optional.empty(); - public ModelList _123list(String _123list) { - this._123list = Optional.of(_123list); + public ModelList _123list(Optional _123list) { + this._123list = _123list; return this; } @@ -35,7 +35,6 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ - @ApiModelProperty(value = "") @JsonProperty("123-list") public Optional get123list() { @@ -100,11 +99,10 @@ protected Builder copyOf(ModelList value) { return this; } - public ModelList.Builder _123list(String _123list) { + public ModelList.Builder _123list(Optional _123list) { this.instance._123list(_123list); return this; } - /** * returns a built ModelList instance. * @@ -141,4 +139,3 @@ public ModelList.Builder toBuilder() { } } - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelReturn.java index 1f448ab0dc04..500e4d30c753 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelReturn.java @@ -27,8 +27,8 @@ public class ModelReturn { private Optional _return = Optional.empty(); - public ModelReturn _return(Integer _return) { - this._return = Optional.of(_return); + public ModelReturn _return(Optional _return) { + this._return = _return; return this; } @@ -36,7 +36,6 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ - @ApiModelProperty(value = "") @JsonProperty("return") public Optional getReturn() { @@ -101,11 +100,10 @@ protected Builder copyOf(ModelReturn value) { return this; } - public ModelReturn.Builder _return(Integer _return) { + public ModelReturn.Builder _return(Optional _return) { this.instance._return(_return); return this; } - /** * returns a built ModelReturn instance. * @@ -142,4 +140,3 @@ public ModelReturn.Builder toBuilder() { } } - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Name.java index 33df8f79bec4..9fcfec1af2f6 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Name.java @@ -23,7 +23,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class Name { - private Integer name; + private @NotNull Integer name; private Optional snakeCase = Optional.empty(); @@ -51,10 +51,9 @@ public Name name(Integer name) { * Get name * @return name */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("name") - public Integer getName() { + public @NotNull Integer getName() { return name; } @@ -62,8 +61,8 @@ public void setName(Integer name) { this.name = name; } - public Name snakeCase(Integer snakeCase) { - this.snakeCase = Optional.of(snakeCase); + public Name snakeCase(Optional snakeCase) { + this.snakeCase = snakeCase; return this; } @@ -71,7 +70,6 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("snake_case") public Optional getSnakeCase() { @@ -82,8 +80,8 @@ public void setSnakeCase(Optional snakeCase) { this.snakeCase = snakeCase; } - public Name property(String property) { - this.property = Optional.of(property); + public Name property(Optional property) { + this.property = property; return this; } @@ -91,7 +89,6 @@ public Name property(String property) { * Get property * @return property */ - @ApiModelProperty(value = "") @JsonProperty("property") public Optional getProperty() { @@ -102,8 +99,8 @@ public void setProperty(Optional property) { this.property = property; } - public Name _123number(Integer _123number) { - this._123number = Optional.of(_123number); + public Name _123number(Optional _123number) { + this._123number = _123number; return this; } @@ -111,7 +108,6 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("123Number") public Optional get123number() { @@ -189,22 +185,18 @@ public Name.Builder name(Integer name) { this.instance.name(name); return this; } - - public Name.Builder snakeCase(Integer snakeCase) { + public Name.Builder snakeCase(Optional snakeCase) { this.instance.snakeCase(snakeCase); return this; } - - public Name.Builder property(String property) { + public Name.Builder property(Optional property) { this.instance.property(property); return this; } - - public Name.Builder _123number(Integer _123number) { + public Name.Builder _123number(Optional _123number) { this.instance._123number(_123number); return this; } - /** * returns a built Name instance. * @@ -241,4 +233,3 @@ public Name.Builder toBuilder() { } } - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NullableMapProperty.java index 9ff73a6a660f..9a5f1727fcb3 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NullableMapProperty.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -27,15 +27,14 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class NullableMapProperty { - @Valid - private JsonNullable> languageValues = JsonNullable.>undefined(); + private JsonNullable>> languageValues = JsonNullable.undefined(); - public NullableMapProperty languageValues(Map languageValues) { - this.languageValues = JsonNullable.of(languageValues); + public NullableMapProperty languageValues(JsonNullable>> languageValues) { + this.languageValues = languageValues; return this; } - public NullableMapProperty putLanguageValuesItem(String key, String languageValuesItem) { + public NullableMapProperty putLanguageValuesItem(String key, Optional languageValuesItem) { if (this.languageValues == null || !this.languageValues.isPresent()) { this.languageValues = JsonNullable.of(new HashMap<>()); } @@ -47,14 +46,13 @@ public NullableMapProperty putLanguageValuesItem(String key, String languageValu * Get languageValues * @return languageValues */ - @ApiModelProperty(value = "") @JsonProperty("languageValues") - public JsonNullable> getLanguageValues() { + public JsonNullable>> getLanguageValues() { return languageValues; } - public void setLanguageValues(JsonNullable> languageValues) { + public void setLanguageValues(JsonNullable>> languageValues) { this.languageValues = languageValues; } @@ -123,16 +121,10 @@ protected Builder copyOf(NullableMapProperty value) { return this; } - public NullableMapProperty.Builder languageValues(Map languageValues) { + public NullableMapProperty.Builder languageValues(JsonNullable>> languageValues) { this.instance.languageValues(languageValues); return this; } - - public NullableMapProperty.Builder languageValues(JsonNullable> languageValues) { - this.instance.languageValues = languageValues; - return this; - } - /** * returns a built NullableMapProperty instance. * @@ -169,4 +161,3 @@ public NullableMapProperty.Builder toBuilder() { } } - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NumberOnly.java index ccc7108bd105..1054302b9c8e 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NumberOnly.java @@ -25,8 +25,8 @@ public class NumberOnly { private Optional justNumber = Optional.empty(); - public NumberOnly justNumber(BigDecimal justNumber) { - this.justNumber = Optional.of(justNumber); + public NumberOnly justNumber(Optional justNumber) { + this.justNumber = justNumber; return this; } @@ -34,7 +34,6 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("JustNumber") public Optional getJustNumber() { @@ -99,11 +98,10 @@ protected Builder copyOf(NumberOnly value) { return this; } - public NumberOnly.Builder justNumber(BigDecimal justNumber) { + public NumberOnly.Builder justNumber(Optional justNumber) { this.instance.justNumber(justNumber); return this; } - /** * returns a built NumberOnly instance. * @@ -140,4 +138,3 @@ public NumberOnly.Builder toBuilder() { } } - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java index 5d56fe490c76..2471b1fa51e4 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java @@ -71,12 +71,12 @@ public static StatusEnum fromValue(String value) { } } - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Optional complete = Optional.of(false); - public Order id(Long id) { - this.id = Optional.of(id); + public Order id(Optional id) { + this.id = id; return this; } @@ -84,7 +84,6 @@ public Order id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Optional getId() { @@ -95,8 +94,8 @@ public void setId(Optional id) { this.id = id; } - public Order petId(Long petId) { - this.petId = Optional.of(petId); + public Order petId(Optional petId) { + this.petId = petId; return this; } @@ -104,7 +103,6 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @ApiModelProperty(value = "") @JsonProperty("petId") public Optional getPetId() { @@ -115,8 +113,8 @@ public void setPetId(Optional petId) { this.petId = petId; } - public Order quantity(Integer quantity) { - this.quantity = Optional.of(quantity); + public Order quantity(Optional quantity) { + this.quantity = quantity; return this; } @@ -124,7 +122,6 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @ApiModelProperty(value = "") @JsonProperty("quantity") public Optional getQuantity() { @@ -135,8 +132,8 @@ public void setQuantity(Optional quantity) { this.quantity = quantity; } - public Order shipDate(OffsetDateTime shipDate) { - this.shipDate = Optional.of(shipDate); + public Order shipDate(Optional shipDate) { + this.shipDate = shipDate; return this; } @@ -144,7 +141,6 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Valid @ApiModelProperty(value = "") @JsonProperty("shipDate") public Optional getShipDate() { @@ -155,8 +151,8 @@ public void setShipDate(Optional shipDate) { this.shipDate = shipDate; } - public Order status(StatusEnum status) { - this.status = Optional.of(status); + public Order status(Optional status) { + this.status = status; return this; } @@ -164,10 +160,9 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @ApiModelProperty(value = "Order Status") @JsonProperty("status") - public Optional getStatus() { + public Optional getStatus() { return status; } @@ -175,8 +170,8 @@ public void setStatus(Optional status) { this.status = status; } - public Order complete(Boolean complete) { - this.complete = Optional.of(complete); + public Order complete(Optional complete) { + this.complete = complete; return this; } @@ -184,7 +179,6 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @ApiModelProperty(value = "") @JsonProperty("complete") public Optional getComplete() { @@ -264,36 +258,30 @@ protected Builder copyOf(Order value) { return this; } - public Order.Builder id(Long id) { + public Order.Builder id(Optional id) { this.instance.id(id); return this; } - - public Order.Builder petId(Long petId) { + public Order.Builder petId(Optional petId) { this.instance.petId(petId); return this; } - - public Order.Builder quantity(Integer quantity) { + public Order.Builder quantity(Optional quantity) { this.instance.quantity(quantity); return this; } - - public Order.Builder shipDate(OffsetDateTime shipDate) { + public Order.Builder shipDate(Optional shipDate) { this.instance.shipDate(shipDate); return this; } - - public Order.Builder status(StatusEnum status) { + public Order.Builder status(Optional status) { this.instance.status(status); return this; } - - public Order.Builder complete(Boolean complete) { + public Order.Builder complete(Optional complete) { this.instance.complete(complete); return this; } - /** * returns a built Order instance. * @@ -330,4 +318,3 @@ public Order.Builder toBuilder() { } } - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterComposite.java index 4117c62ba980..3fcd6ac418eb 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterComposite.java @@ -29,8 +29,8 @@ public class OuterComposite { private Optional myBoolean = Optional.empty(); - public OuterComposite myNumber(BigDecimal myNumber) { - this.myNumber = Optional.of(myNumber); + public OuterComposite myNumber(Optional myNumber) { + this.myNumber = myNumber; return this; } @@ -38,7 +38,6 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("my_number") public Optional getMyNumber() { @@ -49,8 +48,8 @@ public void setMyNumber(Optional myNumber) { this.myNumber = myNumber; } - public OuterComposite myString(String myString) { - this.myString = Optional.of(myString); + public OuterComposite myString(Optional myString) { + this.myString = myString; return this; } @@ -58,7 +57,6 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ - @ApiModelProperty(value = "") @JsonProperty("my_string") public Optional getMyString() { @@ -69,8 +67,8 @@ public void setMyString(Optional myString) { this.myString = myString; } - public OuterComposite myBoolean(Boolean myBoolean) { - this.myBoolean = Optional.of(myBoolean); + public OuterComposite myBoolean(Optional myBoolean) { + this.myBoolean = myBoolean; return this; } @@ -78,7 +76,6 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ - @ApiModelProperty(value = "") @JsonProperty("my_boolean") public Optional getMyBoolean() { @@ -149,21 +146,18 @@ protected Builder copyOf(OuterComposite value) { return this; } - public OuterComposite.Builder myNumber(BigDecimal myNumber) { + public OuterComposite.Builder myNumber(Optional myNumber) { this.instance.myNumber(myNumber); return this; } - - public OuterComposite.Builder myString(String myString) { + public OuterComposite.Builder myString(Optional myString) { this.instance.myString(myString); return this; } - - public OuterComposite.Builder myBoolean(Boolean myBoolean) { + public OuterComposite.Builder myBoolean(Optional myBoolean) { this.instance.myBoolean(myBoolean); return this; } - /** * returns a built OuterComposite instance. * @@ -200,4 +194,3 @@ public OuterComposite.Builder toBuilder() { } } - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ParentWithNullable.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ParentWithNullable.java index 969567eb4c93..8c6ca74e5fa2 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ParentWithNullable.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ParentWithNullable.java @@ -71,12 +71,12 @@ public static TypeEnum fromValue(String value) { } } - private Optional type = Optional.empty(); + private Optional type = Optional.empty(); - private JsonNullable nullableProperty = JsonNullable.undefined(); + private JsonNullable nullableProperty = JsonNullable.undefined(); - public ParentWithNullable type(TypeEnum type) { - this.type = Optional.of(type); + public ParentWithNullable type(Optional type) { + this.type = type; return this; } @@ -84,10 +84,9 @@ public ParentWithNullable type(TypeEnum type) { * Get type * @return type */ - @ApiModelProperty(value = "") @JsonProperty("type") - public Optional getType() { + public Optional getType() { return type; } @@ -95,8 +94,8 @@ public void setType(Optional type) { this.type = type; } - public ParentWithNullable nullableProperty(String nullableProperty) { - this.nullableProperty = JsonNullable.of(nullableProperty); + public ParentWithNullable nullableProperty(JsonNullable nullableProperty) { + this.nullableProperty = nullableProperty; return this; } @@ -104,7 +103,6 @@ public ParentWithNullable nullableProperty(String nullableProperty) { * Get nullableProperty * @return nullableProperty */ - @ApiModelProperty(value = "") @JsonProperty("nullableProperty") public JsonNullable getNullableProperty() { @@ -183,21 +181,14 @@ protected Builder copyOf(ParentWithNullable value) { return this; } - public ParentWithNullable.Builder type(TypeEnum type) { + public ParentWithNullable.Builder type(Optional type) { this.instance.type(type); return this; } - - public ParentWithNullable.Builder nullableProperty(String nullableProperty) { - this.instance.nullableProperty(nullableProperty); - return this; - } - public ParentWithNullable.Builder nullableProperty(JsonNullable nullableProperty) { - this.instance.nullableProperty = nullableProperty; + this.instance.nullableProperty(nullableProperty); return this; } - /** * returns a built ParentWithNullable instance. * @@ -234,4 +225,3 @@ public ParentWithNullable.Builder toBuilder() { } } - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java index a8100dc57423..95b514eacd8b 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java @@ -33,15 +33,13 @@ public class Pet { private Optional id = Optional.empty(); - private Optional category = Optional.empty(); + private Optional<@Valid Category> category = Optional.empty(); - private String name; + private @NotNull String name; - @Valid - private Set photoUrls = new LinkedHashSet<>(); + private @NotNull Set> photoUrls = new LinkedHashSet<>(); - @Valid - private List<@Valid Tag> tags = new ArrayList<>(); + private List> tags = new ArrayList<>(); /** * pet status in the store @@ -81,7 +79,7 @@ public static StatusEnum fromValue(String value) { } @Deprecated - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); public Pet() { super(); @@ -90,13 +88,13 @@ public Pet() { /** * Constructor with only required parameters */ - public Pet(String name, Set photoUrls) { + public Pet(String name, Set> photoUrls) { this.name = name; this.photoUrls = photoUrls; } - public Pet id(Long id) { - this.id = Optional.of(id); + public Pet id(Optional id) { + this.id = id; return this; } @@ -104,7 +102,6 @@ public Pet id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Optional getId() { @@ -115,8 +112,8 @@ public void setId(Optional id) { this.id = id; } - public Pet category(Category category) { - this.category = Optional.of(category); + public Pet category(Optional category) { + this.category = category; return this; } @@ -124,10 +121,9 @@ public Pet category(Category category) { * Get category * @return category */ - @Valid @ApiModelProperty(value = "") @JsonProperty("category") - public Optional getCategory() { + public Optional<@Valid Category> getCategory() { return category; } @@ -144,10 +140,9 @@ public Pet name(String name) { * Get name * @return name */ - @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -155,12 +150,12 @@ public void setName(String name) { this.name = name; } - public Pet photoUrls(Set photoUrls) { + public Pet photoUrls(Set> photoUrls) { this.photoUrls = photoUrls; return this; } - public Pet addPhotoUrlsItem(String photoUrlsItem) { + public Pet addPhotoUrlsItem(Optional photoUrlsItem) { if (this.photoUrls == null) { this.photoUrls = new LinkedHashSet<>(); } @@ -172,24 +167,23 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("photoUrls") - public Set getPhotoUrls() { + public @NotNull Set> getPhotoUrls() { return photoUrls; } @JsonDeserialize(as = LinkedHashSet.class) - public void setPhotoUrls(Set photoUrls) { + public void setPhotoUrls(Set> photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List<@Valid Tag> tags) { + public Pet tags(List> tags) { this.tags = tags; return this; } - public Pet addTagsItem(Tag tagsItem) { + public Pet addTagsItem(Optional tagsItem) { if (this.tags == null) { this.tags = new ArrayList<>(); } @@ -201,19 +195,18 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Valid @ApiModelProperty(value = "") @JsonProperty("tags") - public List<@Valid Tag> getTags() { + public List> getTags() { return tags; } - public void setTags(List<@Valid Tag> tags) { + public void setTags(List> tags) { this.tags = tags; } - public Pet status(StatusEnum status) { - this.status = Optional.of(status); + public Pet status(Optional status) { + this.status = status; return this; } @@ -222,11 +215,10 @@ public Pet status(StatusEnum status) { * @return status * @deprecated */ - @ApiModelProperty(value = "pet status in the store") @JsonProperty("status") @Deprecated - public Optional getStatus() { + public Optional getStatus() { return status; } @@ -307,37 +299,31 @@ protected Builder copyOf(Pet value) { return this; } - public Pet.Builder id(Long id) { + public Pet.Builder id(Optional id) { this.instance.id(id); return this; } - - public Pet.Builder category(Category category) { + public Pet.Builder category(Optional category) { this.instance.category(category); return this; } - public Pet.Builder name(String name) { this.instance.name(name); return this; } - - public Pet.Builder photoUrls(Set photoUrls) { + public Pet.Builder photoUrls(Set> photoUrls) { this.instance.photoUrls(photoUrls); return this; } - - public Pet.Builder tags(List<@Valid Tag> tags) { + public Pet.Builder tags(List> tags) { this.instance.tags(tags); return this; } - @Deprecated - public Pet.Builder status(StatusEnum status) { + public Pet.Builder status(Optional status) { this.instance.status(status); return this; } - /** * returns a built Pet instance. * @@ -374,4 +360,3 @@ public Pet.Builder toBuilder() { } } - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 1bf0165d3793..9d9d574cbafc 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -26,8 +26,8 @@ public class ReadOnlyFirst { private Optional baz = Optional.empty(); - public ReadOnlyFirst bar(String bar) { - this.bar = Optional.of(bar); + public ReadOnlyFirst bar(Optional bar) { + this.bar = bar; return this; } @@ -35,7 +35,6 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("bar") public Optional getBar() { @@ -46,8 +45,8 @@ public void setBar(Optional bar) { this.bar = bar; } - public ReadOnlyFirst baz(String baz) { - this.baz = Optional.of(baz); + public ReadOnlyFirst baz(Optional baz) { + this.baz = baz; return this; } @@ -55,7 +54,6 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ - @ApiModelProperty(value = "") @JsonProperty("baz") public Optional getBaz() { @@ -123,16 +121,14 @@ protected Builder copyOf(ReadOnlyFirst value) { return this; } - public ReadOnlyFirst.Builder bar(String bar) { + public ReadOnlyFirst.Builder bar(Optional bar) { this.instance.bar(bar); return this; } - - public ReadOnlyFirst.Builder baz(String baz) { + public ReadOnlyFirst.Builder baz(Optional baz) { this.instance.baz(baz); return this; } - /** * returns a built ReadOnlyFirst instance. * @@ -169,4 +165,3 @@ public ReadOnlyFirst.Builder toBuilder() { } } - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java index 61d2bb1c123c..df32221d3346 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java @@ -30,8 +30,8 @@ public class ResponseObjectWithDifferentFieldNames { private Optional propertyNameWithSpaces = Optional.empty(); - public ResponseObjectWithDifferentFieldNames normalPropertyName(String normalPropertyName) { - this.normalPropertyName = Optional.of(normalPropertyName); + public ResponseObjectWithDifferentFieldNames normalPropertyName(Optional normalPropertyName) { + this.normalPropertyName = normalPropertyName; return this; } @@ -39,7 +39,6 @@ public ResponseObjectWithDifferentFieldNames normalPropertyName(String normalPro * Get normalPropertyName * @return normalPropertyName */ - @ApiModelProperty(value = "") @JsonProperty("normalPropertyName") public Optional getNormalPropertyName() { @@ -50,8 +49,8 @@ public void setNormalPropertyName(Optional normalPropertyName) { this.normalPropertyName = normalPropertyName; } - public ResponseObjectWithDifferentFieldNames UPPER_CASE_PROPERTY_SNAKE(String UPPER_CASE_PROPERTY_SNAKE) { - this.UPPER_CASE_PROPERTY_SNAKE = Optional.of(UPPER_CASE_PROPERTY_SNAKE); + public ResponseObjectWithDifferentFieldNames UPPER_CASE_PROPERTY_SNAKE(Optional UPPER_CASE_PROPERTY_SNAKE) { + this.UPPER_CASE_PROPERTY_SNAKE = UPPER_CASE_PROPERTY_SNAKE; return this; } @@ -59,7 +58,6 @@ public ResponseObjectWithDifferentFieldNames UPPER_CASE_PROPERTY_SNAKE(String UP * Get UPPER_CASE_PROPERTY_SNAKE * @return UPPER_CASE_PROPERTY_SNAKE */ - @ApiModelProperty(value = "") @JsonProperty("UPPER_CASE_PROPERTY_SNAKE") public Optional getUPPERCASEPROPERTYSNAKE() { @@ -70,8 +68,8 @@ public void setUPPERCASEPROPERTYSNAKE(Optional UPPER_CASE_PROPERTY_SNAKE this.UPPER_CASE_PROPERTY_SNAKE = UPPER_CASE_PROPERTY_SNAKE; } - public ResponseObjectWithDifferentFieldNames lowerCasePropertyDashes(String lowerCasePropertyDashes) { - this.lowerCasePropertyDashes = Optional.of(lowerCasePropertyDashes); + public ResponseObjectWithDifferentFieldNames lowerCasePropertyDashes(Optional lowerCasePropertyDashes) { + this.lowerCasePropertyDashes = lowerCasePropertyDashes; return this; } @@ -79,7 +77,6 @@ public ResponseObjectWithDifferentFieldNames lowerCasePropertyDashes(String lowe * Get lowerCasePropertyDashes * @return lowerCasePropertyDashes */ - @ApiModelProperty(value = "") @JsonProperty("lower-case-property-dashes") public Optional getLowerCasePropertyDashes() { @@ -90,8 +87,8 @@ public void setLowerCasePropertyDashes(Optional lowerCasePropertyDashes) this.lowerCasePropertyDashes = lowerCasePropertyDashes; } - public ResponseObjectWithDifferentFieldNames propertyNameWithSpaces(String propertyNameWithSpaces) { - this.propertyNameWithSpaces = Optional.of(propertyNameWithSpaces); + public ResponseObjectWithDifferentFieldNames propertyNameWithSpaces(Optional propertyNameWithSpaces) { + this.propertyNameWithSpaces = propertyNameWithSpaces; return this; } @@ -99,7 +96,6 @@ public ResponseObjectWithDifferentFieldNames propertyNameWithSpaces(String prope * Get propertyNameWithSpaces * @return propertyNameWithSpaces */ - @ApiModelProperty(value = "") @JsonProperty("property name with spaces") public Optional getPropertyNameWithSpaces() { @@ -173,26 +169,22 @@ protected Builder copyOf(ResponseObjectWithDifferentFieldNames value) { return this; } - public ResponseObjectWithDifferentFieldNames.Builder normalPropertyName(String normalPropertyName) { + public ResponseObjectWithDifferentFieldNames.Builder normalPropertyName(Optional normalPropertyName) { this.instance.normalPropertyName(normalPropertyName); return this; } - - public ResponseObjectWithDifferentFieldNames.Builder UPPER_CASE_PROPERTY_SNAKE(String UPPER_CASE_PROPERTY_SNAKE) { + public ResponseObjectWithDifferentFieldNames.Builder UPPER_CASE_PROPERTY_SNAKE(Optional UPPER_CASE_PROPERTY_SNAKE) { this.instance.UPPER_CASE_PROPERTY_SNAKE(UPPER_CASE_PROPERTY_SNAKE); return this; } - - public ResponseObjectWithDifferentFieldNames.Builder lowerCasePropertyDashes(String lowerCasePropertyDashes) { + public ResponseObjectWithDifferentFieldNames.Builder lowerCasePropertyDashes(Optional lowerCasePropertyDashes) { this.instance.lowerCasePropertyDashes(lowerCasePropertyDashes); return this; } - - public ResponseObjectWithDifferentFieldNames.Builder propertyNameWithSpaces(String propertyNameWithSpaces) { + public ResponseObjectWithDifferentFieldNames.Builder propertyNameWithSpaces(Optional propertyNameWithSpaces) { this.instance.propertyNameWithSpaces(propertyNameWithSpaces); return this; } - /** * returns a built ResponseObjectWithDifferentFieldNames instance. * @@ -229,4 +221,3 @@ public ResponseObjectWithDifferentFieldNames.Builder toBuilder() { } } - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/SpecialModelName.java index a02111708cf0..2aede7f045f3 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/SpecialModelName.java @@ -26,8 +26,8 @@ public class SpecialModelName { private Optional $specialPropertyName = Optional.empty(); - public SpecialModelName $specialPropertyName(Long $specialPropertyName) { - this.$specialPropertyName = Optional.of($specialPropertyName); + public SpecialModelName $specialPropertyName(Optional $specialPropertyName) { + this.$specialPropertyName = $specialPropertyName; return this; } @@ -35,7 +35,6 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ - @ApiModelProperty(value = "") @JsonProperty("$special[property.name]") public Optional get$SpecialPropertyName() { @@ -100,11 +99,10 @@ protected Builder copyOf(SpecialModelName value) { return this; } - public SpecialModelName.Builder $specialPropertyName(Long $specialPropertyName) { + public SpecialModelName.Builder $specialPropertyName(Optional $specialPropertyName) { this.instance.$specialPropertyName($specialPropertyName); return this; } - /** * returns a built SpecialModelName instance. * @@ -141,4 +139,3 @@ public SpecialModelName.Builder toBuilder() { } } - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Tag.java index c4a27cbc9ce4..92324f8ae5e5 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Tag.java @@ -26,8 +26,8 @@ public class Tag { private Optional name = Optional.empty(); - public Tag id(Long id) { - this.id = Optional.of(id); + public Tag id(Optional id) { + this.id = id; return this; } @@ -35,7 +35,6 @@ public Tag id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Optional getId() { @@ -46,8 +45,8 @@ public void setId(Optional id) { this.id = id; } - public Tag name(String name) { - this.name = Optional.of(name); + public Tag name(Optional name) { + this.name = name; return this; } @@ -55,7 +54,6 @@ public Tag name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public Optional getName() { @@ -123,16 +121,14 @@ protected Builder copyOf(Tag value) { return this; } - public Tag.Builder id(Long id) { + public Tag.Builder id(Optional id) { this.instance.id(id); return this; } - - public Tag.Builder name(String name) { + public Tag.Builder name(Optional name) { this.instance.name(name); return this; } - /** * returns a built Tag instance. * @@ -169,4 +165,3 @@ public Tag.Builder toBuilder() { } } - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java index 2f913444deba..07c08ce49607 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -26,16 +26,15 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class TypeHolderDefault { - private String stringItem = "what"; + private @NotNull String stringItem = "what"; - private BigDecimal numberItem = new BigDecimal("1.234"); + private @NotNull BigDecimal numberItem = new BigDecimal("1.234"); - private Integer integerItem = -2; + private @NotNull Integer integerItem = -2; - private Boolean boolItem = true; + private @NotNull Boolean boolItem = true; - @Valid - private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); + private @NotNull List> arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); public TypeHolderDefault() { super(); @@ -44,7 +43,7 @@ public TypeHolderDefault() { /** * Constructor with only required parameters */ - public TypeHolderDefault(String stringItem, BigDecimal numberItem, Integer integerItem, Boolean boolItem, List arrayItem) { + public TypeHolderDefault(String stringItem, BigDecimal numberItem, Integer integerItem, Boolean boolItem, List> arrayItem) { this.stringItem = stringItem; this.numberItem = numberItem; this.integerItem = integerItem; @@ -61,10 +60,9 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("string_item") - public String getStringItem() { + public @NotNull String getStringItem() { return stringItem; } @@ -81,10 +79,9 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @NotNull @Valid @ApiModelProperty(required = true, value = "") @JsonProperty("number_item") - public BigDecimal getNumberItem() { + public @NotNull BigDecimal getNumberItem() { return numberItem; } @@ -101,10 +98,9 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("integer_item") - public Integer getIntegerItem() { + public @NotNull Integer getIntegerItem() { return integerItem; } @@ -121,10 +117,9 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("bool_item") - public Boolean getBoolItem() { + public @NotNull Boolean getBoolItem() { return boolItem; } @@ -132,12 +127,12 @@ public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } - public TypeHolderDefault arrayItem(List arrayItem) { + public TypeHolderDefault arrayItem(List> arrayItem) { this.arrayItem = arrayItem; return this; } - public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { + public TypeHolderDefault addArrayItemItem(Optional arrayItemItem) { if (this.arrayItem == null) { this.arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); } @@ -149,14 +144,13 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("array_item") - public List getArrayItem() { + public @NotNull List> getArrayItem() { return arrayItem; } - public void setArrayItem(List arrayItem) { + public void setArrayItem(List> arrayItem) { this.arrayItem = arrayItem; } @@ -230,27 +224,22 @@ public TypeHolderDefault.Builder stringItem(String stringItem) { this.instance.stringItem(stringItem); return this; } - public TypeHolderDefault.Builder numberItem(BigDecimal numberItem) { this.instance.numberItem(numberItem); return this; } - public TypeHolderDefault.Builder integerItem(Integer integerItem) { this.instance.integerItem(integerItem); return this; } - public TypeHolderDefault.Builder boolItem(Boolean boolItem) { this.instance.boolItem(boolItem); return this; } - - public TypeHolderDefault.Builder arrayItem(List arrayItem) { + public TypeHolderDefault.Builder arrayItem(List> arrayItem) { this.instance.arrayItem(arrayItem); return this; } - /** * returns a built TypeHolderDefault instance. * @@ -287,4 +276,3 @@ public TypeHolderDefault.Builder toBuilder() { } } - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java index 485f756acf37..17c54ed00038 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -26,18 +26,17 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class TypeHolderExample { - private String stringItem; + private @NotNull String stringItem; - private BigDecimal numberItem; + private @NotNull BigDecimal numberItem; - private Float floatItem; + private @NotNull Float floatItem; - private Integer integerItem; + private @NotNull Integer integerItem; - private Boolean boolItem; + private @NotNull Boolean boolItem; - @Valid - private List arrayItem = new ArrayList<>(); + private @NotNull List> arrayItem = new ArrayList<>(); public TypeHolderExample() { super(); @@ -46,7 +45,7 @@ public TypeHolderExample() { /** * Constructor with only required parameters */ - public TypeHolderExample(String stringItem, BigDecimal numberItem, Float floatItem, Integer integerItem, Boolean boolItem, List arrayItem) { + public TypeHolderExample(String stringItem, BigDecimal numberItem, Float floatItem, Integer integerItem, Boolean boolItem, List> arrayItem) { this.stringItem = stringItem; this.numberItem = numberItem; this.floatItem = floatItem; @@ -64,10 +63,9 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @NotNull @ApiModelProperty(example = "what", required = true, value = "") @JsonProperty("string_item") - public String getStringItem() { + public @NotNull String getStringItem() { return stringItem; } @@ -84,10 +82,9 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @NotNull @Valid @ApiModelProperty(example = "1.234", required = true, value = "") @JsonProperty("number_item") - public BigDecimal getNumberItem() { + public @NotNull BigDecimal getNumberItem() { return numberItem; } @@ -104,10 +101,9 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ - @NotNull @ApiModelProperty(example = "1.234", required = true, value = "") @JsonProperty("float_item") - public Float getFloatItem() { + public @NotNull Float getFloatItem() { return floatItem; } @@ -124,10 +120,9 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @NotNull @ApiModelProperty(example = "-2", required = true, value = "") @JsonProperty("integer_item") - public Integer getIntegerItem() { + public @NotNull Integer getIntegerItem() { return integerItem; } @@ -144,10 +139,9 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @NotNull @ApiModelProperty(example = "true", required = true, value = "") @JsonProperty("bool_item") - public Boolean getBoolItem() { + public @NotNull Boolean getBoolItem() { return boolItem; } @@ -155,12 +149,12 @@ public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } - public TypeHolderExample arrayItem(List arrayItem) { + public TypeHolderExample arrayItem(List> arrayItem) { this.arrayItem = arrayItem; return this; } - public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { + public TypeHolderExample addArrayItemItem(Optional arrayItemItem) { if (this.arrayItem == null) { this.arrayItem = new ArrayList<>(); } @@ -172,14 +166,13 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @NotNull @ApiModelProperty(example = "[0,1,2,3]", required = true, value = "") @JsonProperty("array_item") - public List getArrayItem() { + public @NotNull List> getArrayItem() { return arrayItem; } - public void setArrayItem(List arrayItem) { + public void setArrayItem(List> arrayItem) { this.arrayItem = arrayItem; } @@ -256,32 +249,26 @@ public TypeHolderExample.Builder stringItem(String stringItem) { this.instance.stringItem(stringItem); return this; } - public TypeHolderExample.Builder numberItem(BigDecimal numberItem) { this.instance.numberItem(numberItem); return this; } - public TypeHolderExample.Builder floatItem(Float floatItem) { this.instance.floatItem(floatItem); return this; } - public TypeHolderExample.Builder integerItem(Integer integerItem) { this.instance.integerItem(integerItem); return this; } - public TypeHolderExample.Builder boolItem(Boolean boolItem) { this.instance.boolItem(boolItem); return this; } - - public TypeHolderExample.Builder arrayItem(List arrayItem) { + public TypeHolderExample.Builder arrayItem(List> arrayItem) { this.instance.arrayItem(arrayItem); return this; } - /** * returns a built TypeHolderExample instance. * @@ -318,4 +305,3 @@ public TypeHolderExample.Builder toBuilder() { } } - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/User.java index fb2431ff152e..efe02f5ba454 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/User.java @@ -38,8 +38,8 @@ public class User { private Optional userStatus = Optional.empty(); - public User id(Long id) { - this.id = Optional.of(id); + public User id(Optional id) { + this.id = id; return this; } @@ -47,7 +47,6 @@ public User id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Optional getId() { @@ -58,8 +57,8 @@ public void setId(Optional id) { this.id = id; } - public User username(String username) { - this.username = Optional.of(username); + public User username(Optional username) { + this.username = username; return this; } @@ -67,7 +66,6 @@ public User username(String username) { * Get username * @return username */ - @ApiModelProperty(value = "") @JsonProperty("username") public Optional getUsername() { @@ -78,8 +76,8 @@ public void setUsername(Optional username) { this.username = username; } - public User firstName(String firstName) { - this.firstName = Optional.of(firstName); + public User firstName(Optional firstName) { + this.firstName = firstName; return this; } @@ -87,7 +85,6 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @ApiModelProperty(value = "") @JsonProperty("firstName") public Optional getFirstName() { @@ -98,8 +95,8 @@ public void setFirstName(Optional firstName) { this.firstName = firstName; } - public User lastName(String lastName) { - this.lastName = Optional.of(lastName); + public User lastName(Optional lastName) { + this.lastName = lastName; return this; } @@ -107,7 +104,6 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @ApiModelProperty(value = "") @JsonProperty("lastName") public Optional getLastName() { @@ -118,8 +114,8 @@ public void setLastName(Optional lastName) { this.lastName = lastName; } - public User email(String email) { - this.email = Optional.of(email); + public User email(Optional email) { + this.email = email; return this; } @@ -127,7 +123,6 @@ public User email(String email) { * Get email * @return email */ - @ApiModelProperty(value = "") @JsonProperty("email") public Optional getEmail() { @@ -138,8 +133,8 @@ public void setEmail(Optional email) { this.email = email; } - public User password(String password) { - this.password = Optional.of(password); + public User password(Optional password) { + this.password = password; return this; } @@ -147,7 +142,6 @@ public User password(String password) { * Get password * @return password */ - @ApiModelProperty(value = "") @JsonProperty("password") public Optional getPassword() { @@ -158,8 +152,8 @@ public void setPassword(Optional password) { this.password = password; } - public User phone(String phone) { - this.phone = Optional.of(phone); + public User phone(Optional phone) { + this.phone = phone; return this; } @@ -167,7 +161,6 @@ public User phone(String phone) { * Get phone * @return phone */ - @ApiModelProperty(value = "") @JsonProperty("phone") public Optional getPhone() { @@ -178,8 +171,8 @@ public void setPhone(Optional phone) { this.phone = phone; } - public User userStatus(Integer userStatus) { - this.userStatus = Optional.of(userStatus); + public User userStatus(Optional userStatus) { + this.userStatus = userStatus; return this; } @@ -187,7 +180,6 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @ApiModelProperty(value = "User Status") @JsonProperty("userStatus") public Optional getUserStatus() { @@ -273,46 +265,38 @@ protected Builder copyOf(User value) { return this; } - public User.Builder id(Long id) { + public User.Builder id(Optional id) { this.instance.id(id); return this; } - - public User.Builder username(String username) { + public User.Builder username(Optional username) { this.instance.username(username); return this; } - - public User.Builder firstName(String firstName) { + public User.Builder firstName(Optional firstName) { this.instance.firstName(firstName); return this; } - - public User.Builder lastName(String lastName) { + public User.Builder lastName(Optional lastName) { this.instance.lastName(lastName); return this; } - - public User.Builder email(String email) { + public User.Builder email(Optional email) { this.instance.email(email); return this; } - - public User.Builder password(String password) { + public User.Builder password(Optional password) { this.instance.password(password); return this; } - - public User.Builder phone(String phone) { + public User.Builder phone(Optional phone) { this.instance.phone(phone); return this; } - - public User.Builder userStatus(Integer userStatus) { + public User.Builder userStatus(Optional userStatus) { this.instance.userStatus(userStatus); return this; } - /** * returns a built User instance. * @@ -349,4 +333,3 @@ public User.Builder toBuilder() { } } - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/XmlItem.java index f9f2e69503c7..50ed1b256216 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/XmlItem.java @@ -34,8 +34,7 @@ public class XmlItem { private Optional attributeBoolean = Optional.empty(); - @Valid - private List wrappedArray = new ArrayList<>(); + private List> wrappedArray = new ArrayList<>(); private Optional nameString = Optional.empty(); @@ -45,11 +44,9 @@ public class XmlItem { private Optional nameBoolean = Optional.empty(); - @Valid - private List nameArray = new ArrayList<>(); + private List> nameArray = new ArrayList<>(); - @Valid - private List nameWrappedArray = new ArrayList<>(); + private List> nameWrappedArray = new ArrayList<>(); private Optional prefixString = Optional.empty(); @@ -59,11 +56,9 @@ public class XmlItem { private Optional prefixBoolean = Optional.empty(); - @Valid - private List prefixArray = new ArrayList<>(); + private List> prefixArray = new ArrayList<>(); - @Valid - private List prefixWrappedArray = new ArrayList<>(); + private List> prefixWrappedArray = new ArrayList<>(); private Optional namespaceString = Optional.empty(); @@ -73,11 +68,9 @@ public class XmlItem { private Optional namespaceBoolean = Optional.empty(); - @Valid - private List namespaceArray = new ArrayList<>(); + private List> namespaceArray = new ArrayList<>(); - @Valid - private List namespaceWrappedArray = new ArrayList<>(); + private List> namespaceWrappedArray = new ArrayList<>(); private Optional prefixNsString = Optional.empty(); @@ -87,14 +80,12 @@ public class XmlItem { private Optional prefixNsBoolean = Optional.empty(); - @Valid - private List prefixNsArray = new ArrayList<>(); + private List> prefixNsArray = new ArrayList<>(); - @Valid - private List prefixNsWrappedArray = new ArrayList<>(); + private List> prefixNsWrappedArray = new ArrayList<>(); - public XmlItem attributeString(String attributeString) { - this.attributeString = Optional.of(attributeString); + public XmlItem attributeString(Optional attributeString) { + this.attributeString = attributeString; return this; } @@ -102,7 +93,6 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("attribute_string") public Optional getAttributeString() { @@ -113,8 +103,8 @@ public void setAttributeString(Optional attributeString) { this.attributeString = attributeString; } - public XmlItem attributeNumber(BigDecimal attributeNumber) { - this.attributeNumber = Optional.of(attributeNumber); + public XmlItem attributeNumber(Optional attributeNumber) { + this.attributeNumber = attributeNumber; return this; } @@ -122,7 +112,6 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("attribute_number") public Optional getAttributeNumber() { @@ -133,8 +122,8 @@ public void setAttributeNumber(Optional attributeNumber) { this.attributeNumber = attributeNumber; } - public XmlItem attributeInteger(Integer attributeInteger) { - this.attributeInteger = Optional.of(attributeInteger); + public XmlItem attributeInteger(Optional attributeInteger) { + this.attributeInteger = attributeInteger; return this; } @@ -142,7 +131,6 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("attribute_integer") public Optional getAttributeInteger() { @@ -153,8 +141,8 @@ public void setAttributeInteger(Optional attributeInteger) { this.attributeInteger = attributeInteger; } - public XmlItem attributeBoolean(Boolean attributeBoolean) { - this.attributeBoolean = Optional.of(attributeBoolean); + public XmlItem attributeBoolean(Optional attributeBoolean) { + this.attributeBoolean = attributeBoolean; return this; } @@ -162,7 +150,6 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("attribute_boolean") public Optional getAttributeBoolean() { @@ -173,12 +160,12 @@ public void setAttributeBoolean(Optional attributeBoolean) { this.attributeBoolean = attributeBoolean; } - public XmlItem wrappedArray(List wrappedArray) { + public XmlItem wrappedArray(List> wrappedArray) { this.wrappedArray = wrappedArray; return this; } - public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { + public XmlItem addWrappedArrayItem(Optional wrappedArrayItem) { if (this.wrappedArray == null) { this.wrappedArray = new ArrayList<>(); } @@ -190,19 +177,18 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("wrapped_array") - public List getWrappedArray() { + public List> getWrappedArray() { return wrappedArray; } - public void setWrappedArray(List wrappedArray) { + public void setWrappedArray(List> wrappedArray) { this.wrappedArray = wrappedArray; } - public XmlItem nameString(String nameString) { - this.nameString = Optional.of(nameString); + public XmlItem nameString(Optional nameString) { + this.nameString = nameString; return this; } @@ -210,7 +196,6 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("name_string") public Optional getNameString() { @@ -221,8 +206,8 @@ public void setNameString(Optional nameString) { this.nameString = nameString; } - public XmlItem nameNumber(BigDecimal nameNumber) { - this.nameNumber = Optional.of(nameNumber); + public XmlItem nameNumber(Optional nameNumber) { + this.nameNumber = nameNumber; return this; } @@ -230,7 +215,6 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("name_number") public Optional getNameNumber() { @@ -241,8 +225,8 @@ public void setNameNumber(Optional nameNumber) { this.nameNumber = nameNumber; } - public XmlItem nameInteger(Integer nameInteger) { - this.nameInteger = Optional.of(nameInteger); + public XmlItem nameInteger(Optional nameInteger) { + this.nameInteger = nameInteger; return this; } @@ -250,7 +234,6 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("name_integer") public Optional getNameInteger() { @@ -261,8 +244,8 @@ public void setNameInteger(Optional nameInteger) { this.nameInteger = nameInteger; } - public XmlItem nameBoolean(Boolean nameBoolean) { - this.nameBoolean = Optional.of(nameBoolean); + public XmlItem nameBoolean(Optional nameBoolean) { + this.nameBoolean = nameBoolean; return this; } @@ -270,7 +253,6 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("name_boolean") public Optional getNameBoolean() { @@ -281,12 +263,12 @@ public void setNameBoolean(Optional nameBoolean) { this.nameBoolean = nameBoolean; } - public XmlItem nameArray(List nameArray) { + public XmlItem nameArray(List> nameArray) { this.nameArray = nameArray; return this; } - public XmlItem addNameArrayItem(Integer nameArrayItem) { + public XmlItem addNameArrayItem(Optional nameArrayItem) { if (this.nameArray == null) { this.nameArray = new ArrayList<>(); } @@ -298,23 +280,22 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ - @ApiModelProperty(value = "") @JsonProperty("name_array") - public List getNameArray() { + public List> getNameArray() { return nameArray; } - public void setNameArray(List nameArray) { + public void setNameArray(List> nameArray) { this.nameArray = nameArray; } - public XmlItem nameWrappedArray(List nameWrappedArray) { + public XmlItem nameWrappedArray(List> nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; return this; } - public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { + public XmlItem addNameWrappedArrayItem(Optional nameWrappedArrayItem) { if (this.nameWrappedArray == null) { this.nameWrappedArray = new ArrayList<>(); } @@ -326,19 +307,18 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("name_wrapped_array") - public List getNameWrappedArray() { + public List> getNameWrappedArray() { return nameWrappedArray; } - public void setNameWrappedArray(List nameWrappedArray) { + public void setNameWrappedArray(List> nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; } - public XmlItem prefixString(String prefixString) { - this.prefixString = Optional.of(prefixString); + public XmlItem prefixString(Optional prefixString) { + this.prefixString = prefixString; return this; } @@ -346,7 +326,6 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("prefix_string") public Optional getPrefixString() { @@ -357,8 +336,8 @@ public void setPrefixString(Optional prefixString) { this.prefixString = prefixString; } - public XmlItem prefixNumber(BigDecimal prefixNumber) { - this.prefixNumber = Optional.of(prefixNumber); + public XmlItem prefixNumber(Optional prefixNumber) { + this.prefixNumber = prefixNumber; return this; } @@ -366,7 +345,6 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("prefix_number") public Optional getPrefixNumber() { @@ -377,8 +355,8 @@ public void setPrefixNumber(Optional prefixNumber) { this.prefixNumber = prefixNumber; } - public XmlItem prefixInteger(Integer prefixInteger) { - this.prefixInteger = Optional.of(prefixInteger); + public XmlItem prefixInteger(Optional prefixInteger) { + this.prefixInteger = prefixInteger; return this; } @@ -386,7 +364,6 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_integer") public Optional getPrefixInteger() { @@ -397,8 +374,8 @@ public void setPrefixInteger(Optional prefixInteger) { this.prefixInteger = prefixInteger; } - public XmlItem prefixBoolean(Boolean prefixBoolean) { - this.prefixBoolean = Optional.of(prefixBoolean); + public XmlItem prefixBoolean(Optional prefixBoolean) { + this.prefixBoolean = prefixBoolean; return this; } @@ -406,7 +383,6 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("prefix_boolean") public Optional getPrefixBoolean() { @@ -417,12 +393,12 @@ public void setPrefixBoolean(Optional prefixBoolean) { this.prefixBoolean = prefixBoolean; } - public XmlItem prefixArray(List prefixArray) { + public XmlItem prefixArray(List> prefixArray) { this.prefixArray = prefixArray; return this; } - public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { + public XmlItem addPrefixArrayItem(Optional prefixArrayItem) { if (this.prefixArray == null) { this.prefixArray = new ArrayList<>(); } @@ -434,23 +410,22 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_array") - public List getPrefixArray() { + public List> getPrefixArray() { return prefixArray; } - public void setPrefixArray(List prefixArray) { + public void setPrefixArray(List> prefixArray) { this.prefixArray = prefixArray; } - public XmlItem prefixWrappedArray(List prefixWrappedArray) { + public XmlItem prefixWrappedArray(List> prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; return this; } - public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { + public XmlItem addPrefixWrappedArrayItem(Optional prefixWrappedArrayItem) { if (this.prefixWrappedArray == null) { this.prefixWrappedArray = new ArrayList<>(); } @@ -462,19 +437,18 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_wrapped_array") - public List getPrefixWrappedArray() { + public List> getPrefixWrappedArray() { return prefixWrappedArray; } - public void setPrefixWrappedArray(List prefixWrappedArray) { + public void setPrefixWrappedArray(List> prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; } - public XmlItem namespaceString(String namespaceString) { - this.namespaceString = Optional.of(namespaceString); + public XmlItem namespaceString(Optional namespaceString) { + this.namespaceString = namespaceString; return this; } @@ -482,7 +456,6 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("namespace_string") public Optional getNamespaceString() { @@ -493,8 +466,8 @@ public void setNamespaceString(Optional namespaceString) { this.namespaceString = namespaceString; } - public XmlItem namespaceNumber(BigDecimal namespaceNumber) { - this.namespaceNumber = Optional.of(namespaceNumber); + public XmlItem namespaceNumber(Optional namespaceNumber) { + this.namespaceNumber = namespaceNumber; return this; } @@ -502,7 +475,6 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("namespace_number") public Optional getNamespaceNumber() { @@ -513,8 +485,8 @@ public void setNamespaceNumber(Optional namespaceNumber) { this.namespaceNumber = namespaceNumber; } - public XmlItem namespaceInteger(Integer namespaceInteger) { - this.namespaceInteger = Optional.of(namespaceInteger); + public XmlItem namespaceInteger(Optional namespaceInteger) { + this.namespaceInteger = namespaceInteger; return this; } @@ -522,7 +494,6 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("namespace_integer") public Optional getNamespaceInteger() { @@ -533,8 +504,8 @@ public void setNamespaceInteger(Optional namespaceInteger) { this.namespaceInteger = namespaceInteger; } - public XmlItem namespaceBoolean(Boolean namespaceBoolean) { - this.namespaceBoolean = Optional.of(namespaceBoolean); + public XmlItem namespaceBoolean(Optional namespaceBoolean) { + this.namespaceBoolean = namespaceBoolean; return this; } @@ -542,7 +513,6 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("namespace_boolean") public Optional getNamespaceBoolean() { @@ -553,12 +523,12 @@ public void setNamespaceBoolean(Optional namespaceBoolean) { this.namespaceBoolean = namespaceBoolean; } - public XmlItem namespaceArray(List namespaceArray) { + public XmlItem namespaceArray(List> namespaceArray) { this.namespaceArray = namespaceArray; return this; } - public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { + public XmlItem addNamespaceArrayItem(Optional namespaceArrayItem) { if (this.namespaceArray == null) { this.namespaceArray = new ArrayList<>(); } @@ -570,23 +540,22 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ - @ApiModelProperty(value = "") @JsonProperty("namespace_array") - public List getNamespaceArray() { + public List> getNamespaceArray() { return namespaceArray; } - public void setNamespaceArray(List namespaceArray) { + public void setNamespaceArray(List> namespaceArray) { this.namespaceArray = namespaceArray; } - public XmlItem namespaceWrappedArray(List namespaceWrappedArray) { + public XmlItem namespaceWrappedArray(List> namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; return this; } - public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { + public XmlItem addNamespaceWrappedArrayItem(Optional namespaceWrappedArrayItem) { if (this.namespaceWrappedArray == null) { this.namespaceWrappedArray = new ArrayList<>(); } @@ -598,19 +567,18 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("namespace_wrapped_array") - public List getNamespaceWrappedArray() { + public List> getNamespaceWrappedArray() { return namespaceWrappedArray; } - public void setNamespaceWrappedArray(List namespaceWrappedArray) { + public void setNamespaceWrappedArray(List> namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; } - public XmlItem prefixNsString(String prefixNsString) { - this.prefixNsString = Optional.of(prefixNsString); + public XmlItem prefixNsString(Optional prefixNsString) { + this.prefixNsString = prefixNsString; return this; } @@ -618,7 +586,6 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("prefix_ns_string") public Optional getPrefixNsString() { @@ -629,8 +596,8 @@ public void setPrefixNsString(Optional prefixNsString) { this.prefixNsString = prefixNsString; } - public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { - this.prefixNsNumber = Optional.of(prefixNsNumber); + public XmlItem prefixNsNumber(Optional prefixNsNumber) { + this.prefixNsNumber = prefixNsNumber; return this; } @@ -638,7 +605,6 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("prefix_ns_number") public Optional getPrefixNsNumber() { @@ -649,8 +615,8 @@ public void setPrefixNsNumber(Optional prefixNsNumber) { this.prefixNsNumber = prefixNsNumber; } - public XmlItem prefixNsInteger(Integer prefixNsInteger) { - this.prefixNsInteger = Optional.of(prefixNsInteger); + public XmlItem prefixNsInteger(Optional prefixNsInteger) { + this.prefixNsInteger = prefixNsInteger; return this; } @@ -658,7 +624,6 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_ns_integer") public Optional getPrefixNsInteger() { @@ -669,8 +634,8 @@ public void setPrefixNsInteger(Optional prefixNsInteger) { this.prefixNsInteger = prefixNsInteger; } - public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { - this.prefixNsBoolean = Optional.of(prefixNsBoolean); + public XmlItem prefixNsBoolean(Optional prefixNsBoolean) { + this.prefixNsBoolean = prefixNsBoolean; return this; } @@ -678,7 +643,6 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("prefix_ns_boolean") public Optional getPrefixNsBoolean() { @@ -689,12 +653,12 @@ public void setPrefixNsBoolean(Optional prefixNsBoolean) { this.prefixNsBoolean = prefixNsBoolean; } - public XmlItem prefixNsArray(List prefixNsArray) { + public XmlItem prefixNsArray(List> prefixNsArray) { this.prefixNsArray = prefixNsArray; return this; } - public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { + public XmlItem addPrefixNsArrayItem(Optional prefixNsArrayItem) { if (this.prefixNsArray == null) { this.prefixNsArray = new ArrayList<>(); } @@ -706,23 +670,22 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_ns_array") - public List getPrefixNsArray() { + public List> getPrefixNsArray() { return prefixNsArray; } - public void setPrefixNsArray(List prefixNsArray) { + public void setPrefixNsArray(List> prefixNsArray) { this.prefixNsArray = prefixNsArray; } - public XmlItem prefixNsWrappedArray(List prefixNsWrappedArray) { + public XmlItem prefixNsWrappedArray(List> prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; return this; } - public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { + public XmlItem addPrefixNsWrappedArrayItem(Optional prefixNsWrappedArrayItem) { if (this.prefixNsWrappedArray == null) { this.prefixNsWrappedArray = new ArrayList<>(); } @@ -734,14 +697,13 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_ns_wrapped_array") - public List getPrefixNsWrappedArray() { + public List> getPrefixNsWrappedArray() { return prefixNsWrappedArray; } - public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { + public void setPrefixNsWrappedArray(List> prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } @@ -883,151 +845,122 @@ protected Builder copyOf(XmlItem value) { return this; } - public XmlItem.Builder attributeString(String attributeString) { + public XmlItem.Builder attributeString(Optional attributeString) { this.instance.attributeString(attributeString); return this; } - - public XmlItem.Builder attributeNumber(BigDecimal attributeNumber) { + public XmlItem.Builder attributeNumber(Optional attributeNumber) { this.instance.attributeNumber(attributeNumber); return this; } - - public XmlItem.Builder attributeInteger(Integer attributeInteger) { + public XmlItem.Builder attributeInteger(Optional attributeInteger) { this.instance.attributeInteger(attributeInteger); return this; } - - public XmlItem.Builder attributeBoolean(Boolean attributeBoolean) { + public XmlItem.Builder attributeBoolean(Optional attributeBoolean) { this.instance.attributeBoolean(attributeBoolean); return this; } - - public XmlItem.Builder wrappedArray(List wrappedArray) { + public XmlItem.Builder wrappedArray(List> wrappedArray) { this.instance.wrappedArray(wrappedArray); return this; } - - public XmlItem.Builder nameString(String nameString) { + public XmlItem.Builder nameString(Optional nameString) { this.instance.nameString(nameString); return this; } - - public XmlItem.Builder nameNumber(BigDecimal nameNumber) { + public XmlItem.Builder nameNumber(Optional nameNumber) { this.instance.nameNumber(nameNumber); return this; } - - public XmlItem.Builder nameInteger(Integer nameInteger) { + public XmlItem.Builder nameInteger(Optional nameInteger) { this.instance.nameInteger(nameInteger); return this; } - - public XmlItem.Builder nameBoolean(Boolean nameBoolean) { + public XmlItem.Builder nameBoolean(Optional nameBoolean) { this.instance.nameBoolean(nameBoolean); return this; } - - public XmlItem.Builder nameArray(List nameArray) { + public XmlItem.Builder nameArray(List> nameArray) { this.instance.nameArray(nameArray); return this; } - - public XmlItem.Builder nameWrappedArray(List nameWrappedArray) { + public XmlItem.Builder nameWrappedArray(List> nameWrappedArray) { this.instance.nameWrappedArray(nameWrappedArray); return this; } - - public XmlItem.Builder prefixString(String prefixString) { + public XmlItem.Builder prefixString(Optional prefixString) { this.instance.prefixString(prefixString); return this; } - - public XmlItem.Builder prefixNumber(BigDecimal prefixNumber) { + public XmlItem.Builder prefixNumber(Optional prefixNumber) { this.instance.prefixNumber(prefixNumber); return this; } - - public XmlItem.Builder prefixInteger(Integer prefixInteger) { + public XmlItem.Builder prefixInteger(Optional prefixInteger) { this.instance.prefixInteger(prefixInteger); return this; } - - public XmlItem.Builder prefixBoolean(Boolean prefixBoolean) { + public XmlItem.Builder prefixBoolean(Optional prefixBoolean) { this.instance.prefixBoolean(prefixBoolean); return this; } - - public XmlItem.Builder prefixArray(List prefixArray) { + public XmlItem.Builder prefixArray(List> prefixArray) { this.instance.prefixArray(prefixArray); return this; } - - public XmlItem.Builder prefixWrappedArray(List prefixWrappedArray) { + public XmlItem.Builder prefixWrappedArray(List> prefixWrappedArray) { this.instance.prefixWrappedArray(prefixWrappedArray); return this; } - - public XmlItem.Builder namespaceString(String namespaceString) { + public XmlItem.Builder namespaceString(Optional namespaceString) { this.instance.namespaceString(namespaceString); return this; } - - public XmlItem.Builder namespaceNumber(BigDecimal namespaceNumber) { + public XmlItem.Builder namespaceNumber(Optional namespaceNumber) { this.instance.namespaceNumber(namespaceNumber); return this; } - - public XmlItem.Builder namespaceInteger(Integer namespaceInteger) { + public XmlItem.Builder namespaceInteger(Optional namespaceInteger) { this.instance.namespaceInteger(namespaceInteger); return this; } - - public XmlItem.Builder namespaceBoolean(Boolean namespaceBoolean) { + public XmlItem.Builder namespaceBoolean(Optional namespaceBoolean) { this.instance.namespaceBoolean(namespaceBoolean); return this; } - - public XmlItem.Builder namespaceArray(List namespaceArray) { + public XmlItem.Builder namespaceArray(List> namespaceArray) { this.instance.namespaceArray(namespaceArray); return this; } - - public XmlItem.Builder namespaceWrappedArray(List namespaceWrappedArray) { + public XmlItem.Builder namespaceWrappedArray(List> namespaceWrappedArray) { this.instance.namespaceWrappedArray(namespaceWrappedArray); return this; } - - public XmlItem.Builder prefixNsString(String prefixNsString) { + public XmlItem.Builder prefixNsString(Optional prefixNsString) { this.instance.prefixNsString(prefixNsString); return this; } - - public XmlItem.Builder prefixNsNumber(BigDecimal prefixNsNumber) { + public XmlItem.Builder prefixNsNumber(Optional prefixNsNumber) { this.instance.prefixNsNumber(prefixNsNumber); return this; } - - public XmlItem.Builder prefixNsInteger(Integer prefixNsInteger) { + public XmlItem.Builder prefixNsInteger(Optional prefixNsInteger) { this.instance.prefixNsInteger(prefixNsInteger); return this; } - - public XmlItem.Builder prefixNsBoolean(Boolean prefixNsBoolean) { + public XmlItem.Builder prefixNsBoolean(Optional prefixNsBoolean) { this.instance.prefixNsBoolean(prefixNsBoolean); return this; } - - public XmlItem.Builder prefixNsArray(List prefixNsArray) { + public XmlItem.Builder prefixNsArray(List> prefixNsArray) { this.instance.prefixNsArray(prefixNsArray); return this; } - - public XmlItem.Builder prefixNsWrappedArray(List prefixNsWrappedArray) { + public XmlItem.Builder prefixNsWrappedArray(List> prefixNsWrappedArray) { this.instance.prefixNsWrappedArray(prefixNsWrappedArray); return this; } - /** * returns a built XmlItem instance. * @@ -1064,4 +997,3 @@ public XmlItem.Builder toBuilder() { } } - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApi.java index d5a3e74c6e1a..f664fcb169ec 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApi.java @@ -71,7 +71,7 @@ default Optional getRequest() { ) default ResponseEntity call123testSpecialTags( - @Parameter(name = "Client", description = "client model", required = true) @Valid @RequestBody Client client + @Parameter(name = "Client", description = "client model", required = true) @RequestBody @NotNull @Valid Client client ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java index 547f34e8d065..2034796e2778 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java @@ -80,7 +80,7 @@ default Optional getRequest() { ) default ResponseEntity createXmlItem( - @Parameter(name = "XmlItem", description = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem + @Parameter(name = "XmlItem", description = "XmlItem Body", required = true) @RequestBody @NotNull @Valid XmlItem xmlItem ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -113,7 +113,7 @@ default ResponseEntity createXmlItem( ) default ResponseEntity fakeOuterBooleanSerialize( - @Parameter(name = "body", description = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body + @Parameter(name = "body", description = "Input boolean as post body") @RequestBody(required = false) Boolean body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -146,7 +146,7 @@ default ResponseEntity fakeOuterBooleanSerialize( ) default ResponseEntity fakeOuterCompositeSerialize( - @Parameter(name = "OuterComposite", description = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite outerComposite + @Parameter(name = "OuterComposite", description = "Input composite as post body") @RequestBody(required = false) @Valid OuterComposite outerComposite ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -188,7 +188,7 @@ default ResponseEntity fakeOuterCompositeSerialize( ) default ResponseEntity fakeOuterNumberSerialize( - @Parameter(name = "body", description = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body + @Parameter(name = "body", description = "Input number as post body") @RequestBody(required = false) BigDecimal body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -221,7 +221,7 @@ default ResponseEntity fakeOuterNumberSerialize( ) default ResponseEntity fakeOuterStringSerialize( - @Parameter(name = "body", description = "Input string as post body") @Valid @RequestBody(required = false) String body + @Parameter(name = "body", description = "Input string as post body") @RequestBody(required = false) String body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -251,7 +251,7 @@ default ResponseEntity fakeOuterStringSerialize( ) default ResponseEntity responseObjectDifferentNames( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId + @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -290,7 +290,7 @@ default ResponseEntity responseObjectDiff ) default ResponseEntity testBodyWithFileSchema( - @Parameter(name = "FileSchemaTestClass", description = "", required = true) @Valid @RequestBody FileSchemaTestClass fileSchemaTestClass + @Parameter(name = "FileSchemaTestClass", description = "", required = true) @RequestBody @NotNull @Valid FileSchemaTestClass fileSchemaTestClass ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -319,8 +319,8 @@ default ResponseEntity testBodyWithFileSchema( ) default ResponseEntity testBodyWithQueryParams( - @NotNull @Parameter(name = "query", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "query", required = true) String query, - @Parameter(name = "User", description = "", required = true) @Valid @RequestBody User user + @Parameter(name = "query", description = "", required = true, in = ParameterIn.QUERY) @RequestParam(value = "query") @NotNull String query, + @Parameter(name = "User", description = "", required = true) @RequestBody @NotNull @Valid User user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -354,7 +354,7 @@ default ResponseEntity testBodyWithQueryParams( ) default ResponseEntity testClientModel( - @Parameter(name = "Client", description = "client model", required = true) @Valid @RequestBody Client client + @Parameter(name = "Client", description = "client model", required = true) @RequestBody @NotNull @Valid Client client ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -412,20 +412,20 @@ default ResponseEntity testClientModel( ) default ResponseEntity testEndpointParameters( - @Parameter(name = "number", description = "None", required = true) @Valid @RequestParam(value = "number", required = true) BigDecimal number, - @Parameter(name = "double", description = "None", required = true) @Valid @RequestParam(value = "double", required = true) Double _double, - @Parameter(name = "pattern_without_delimiter", description = "None", required = true) @Valid @RequestParam(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, - @Parameter(name = "byte", description = "None", required = true) @Valid @RequestParam(value = "byte", required = true) byte[] _byte, - @Parameter(name = "integer", description = "None") @Valid @RequestParam(value = "integer", required = false) Integer integer, - @Parameter(name = "int32", description = "None") @Valid @RequestParam(value = "int32", required = false) Integer int32, - @Parameter(name = "int64", description = "None") @Valid @RequestParam(value = "int64", required = false) Long int64, - @Parameter(name = "float", description = "None") @Valid @RequestParam(value = "float", required = false) Float _float, - @Parameter(name = "string", description = "None") @Valid @RequestParam(value = "string", required = false) String string, + @Parameter(name = "number", description = "None", required = true) @RequestParam(value = "number") @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal number, + @Parameter(name = "double", description = "None", required = true) @RequestParam(value = "double") @NotNull @DecimalMin("67.8") @DecimalMax("123.4") Double _double, + @Parameter(name = "pattern_without_delimiter", description = "None", required = true) @RequestParam(value = "pattern_without_delimiter") @NotNull @Pattern(regexp = "^[A-Z].*") String patternWithoutDelimiter, + @Parameter(name = "byte", description = "None", required = true) @RequestParam(value = "byte") @NotNull byte[] _byte, + @Parameter(name = "integer", description = "None") @RequestParam(value = "integer", required = false) @Min(10) @Max(100) Integer integer, + @Parameter(name = "int32", description = "None") @RequestParam(value = "int32", required = false) @Min(20) @Max(200) Integer int32, + @Parameter(name = "int64", description = "None") @RequestParam(value = "int64", required = false) Long int64, + @Parameter(name = "float", description = "None") @RequestParam(value = "float", required = false) @DecimalMax("987.6") Float _float, + @Parameter(name = "string", description = "None") @RequestParam(value = "string", required = false) @Pattern(regexp = "/[a-z]/i") String string, @Parameter(name = "binary", description = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @Parameter(name = "date", description = "None") @Valid @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, - @Parameter(name = "dateTime", description = "None") @Valid @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, - @Parameter(name = "password", description = "None") @Valid @RequestParam(value = "password", required = false) String password, - @Parameter(name = "callback", description = "None") @Valid @RequestParam(value = "callback", required = false) String paramCallback + @Parameter(name = "date", description = "None") @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @Parameter(name = "dateTime", description = "None") @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @Parameter(name = "password", description = "None") @RequestParam(value = "password", required = false) @Size(min = 10, max = 64) String password, + @Parameter(name = "callback", description = "None") @RequestParam(value = "callback", required = false) String paramCallback ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -465,14 +465,14 @@ default ResponseEntity testEndpointParameters( ) default ResponseEntity testEnumParameters( - @Parameter(name = "enum_header_string_array", description = "Header parameter enum test (string array)", in = ParameterIn.HEADER) @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @Parameter(name = "enum_header_string_array", description = "Header parameter enum test (string array)", in = ParameterIn.HEADER) @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, @Parameter(name = "enum_header_string", description = "Header parameter enum test (string)", in = ParameterIn.HEADER) @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, - @Parameter(name = "enum_query_string_array", description = "Query parameter enum test (string array)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, - @Parameter(name = "enum_query_string", description = "Query parameter enum test (string)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, - @Parameter(name = "enum_query_double", description = "Query parameter enum test (double)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, - @Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, - @Parameter(name = "enum_form_string", description = "Form parameter enum test (string)") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString + @Parameter(name = "enum_query_string_array", description = "Query parameter enum test (string array)", in = ParameterIn.QUERY) @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @Parameter(name = "enum_query_string", description = "Query parameter enum test (string)", in = ParameterIn.QUERY) @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, + @Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)", in = ParameterIn.QUERY) @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @Parameter(name = "enum_query_double", description = "Query parameter enum test (double)", in = ParameterIn.QUERY) @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)") @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @Parameter(name = "enum_form_string", description = "Form parameter enum test (string)") @RequestParam(value = "enum_form_string", required = false) String enumFormString ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -507,12 +507,12 @@ default ResponseEntity testEnumParameters( ) default ResponseEntity testGroupParameters( - @NotNull @Parameter(name = "required_string_group", description = "Required String in group parameters", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @Parameter(name = "required_string_group", description = "Required String in group parameters", required = true, in = ParameterIn.QUERY) @RequestParam(value = "required_string_group") @NotNull Integer requiredStringGroup, @NotNull @Parameter(name = "required_boolean_group", description = "Required Boolean in group parameters", required = true, in = ParameterIn.HEADER) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, - @NotNull @Parameter(name = "required_int64_group", description = "Required Integer in group parameters", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, - @Parameter(name = "string_group", description = "String in group parameters", in = ParameterIn.QUERY) @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup, + @Parameter(name = "required_int64_group", description = "Required Integer in group parameters", required = true, in = ParameterIn.QUERY) @RequestParam(value = "required_int64_group") @NotNull Long requiredInt64Group, + @Parameter(name = "string_group", description = "String in group parameters", in = ParameterIn.QUERY) @RequestParam(value = "string_group", required = false) Integer stringGroup, @Parameter(name = "boolean_group", description = "Boolean in group parameters", in = ParameterIn.HEADER) @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup, - @Parameter(name = "int64_group", description = "Integer in group parameters", in = ParameterIn.QUERY) @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + @Parameter(name = "int64_group", description = "Integer in group parameters", in = ParameterIn.QUERY) @RequestParam(value = "int64_group", required = false) Long int64Group ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -543,7 +543,7 @@ default ResponseEntity testGroupParameters( ) default ResponseEntity testInlineAdditionalProperties( - @Parameter(name = "request_body", description = "request body", required = true) @Valid @RequestBody Map requestBody + @Parameter(name = "request_body", description = "request body", required = true) @RequestBody @NotNull Map requestBody ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -575,8 +575,8 @@ default ResponseEntity testInlineAdditionalProperties( ) default ResponseEntity testJsonFormData( - @Parameter(name = "param", description = "field1", required = true) @Valid @RequestParam(value = "param", required = true) String param, - @Parameter(name = "param2", description = "field2", required = true) @Valid @RequestParam(value = "param2", required = true) String param2 + @Parameter(name = "param", description = "field1", required = true) @RequestParam(value = "param") @NotNull String param, + @Parameter(name = "param2", description = "field2", required = true) @RequestParam(value = "param2") @NotNull String param2 ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -607,7 +607,7 @@ default ResponseEntity testJsonFormData( ) default ResponseEntity testNullable( - @Parameter(name = "ChildWithNullable", description = "request body", required = true) @Valid @RequestBody ChildWithNullable childWithNullable + @Parameter(name = "ChildWithNullable", description = "request body", required = true) @RequestBody @NotNull @Valid ChildWithNullable childWithNullable ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -639,10 +639,10 @@ default ResponseEntity testNullable( ) default ResponseEntity testQueryParameterCollectionFormat( - @NotNull @Parameter(name = "pipe", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "pipe", required = true) List pipe, - @NotNull @Parameter(name = "http", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "http", required = true) List http, - @NotNull @Parameter(name = "url", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "url", required = true) List url, - @NotNull @Parameter(name = "context", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "context", required = true) List context + @Parameter(name = "pipe", description = "", required = true, in = ParameterIn.QUERY) @RequestParam(value = "pipe") @NotNull List pipe, + @Parameter(name = "http", description = "", required = true, in = ParameterIn.QUERY) @RequestParam(value = "http") @NotNull List http, + @Parameter(name = "url", description = "", required = true, in = ParameterIn.QUERY) @RequestParam(value = "url") @NotNull List url, + @Parameter(name = "context", description = "", required = true, in = ParameterIn.QUERY) @RequestParam(value = "context") @NotNull List context ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -721,9 +721,9 @@ default ResponseEntity testWithResultExample( ) default ResponseEntity uploadFileWithRequiredFile( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, - @Parameter(name = "requiredFile", description = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, - @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata + @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, + @Parameter(name = "requiredFile", description = "file to upload", required = true) @RequestPart(value = "requiredFile") MultipartFile requiredFile, + @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApi.java index beba20aa8367..ffe9ddbe305f 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApi.java @@ -74,7 +74,7 @@ default Optional getRequest() { ) default ResponseEntity testClassname( - @Parameter(name = "Client", description = "client model", required = true) @Valid @RequestBody Client client + @Parameter(name = "Client", description = "client model", required = true) @RequestBody @NotNull @Valid Client client ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java index 980fbe1da7e2..858ebf4b5355 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java @@ -75,7 +75,7 @@ default Optional getRequest() { ) default ResponseEntity addPet( - @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet pet ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -111,7 +111,7 @@ default ResponseEntity addPet( ) default ResponseEntity deletePet( - @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, @Parameter(name = "api_key", description = "", in = ParameterIn.HEADER) @RequestHeader(value = "api_key", required = false) String apiKey ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -151,7 +151,7 @@ default ResponseEntity deletePet( ) default ResponseEntity> findPetsByStatus( - @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) List status + @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @RequestParam(value = "status") @NotNull List status ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -207,7 +207,7 @@ default ResponseEntity> findPetsByStatus( ) default ResponseEntity> findPetsByTags( - @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) Set tags + @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @RequestParam(value = "tags") @NotNull Set tags ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -262,7 +262,7 @@ default ResponseEntity> findPetsByTags( ) default ResponseEntity getPetById( - @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId + @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -316,7 +316,7 @@ default ResponseEntity getPetById( ) default ResponseEntity updatePet( - @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid Pet pet ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -352,9 +352,9 @@ default ResponseEntity updatePet( ) default ResponseEntity updatePetWithForm( - @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, - @Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, - @Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status + @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, + @Parameter(name = "name", description = "Updated name of the pet") @RequestParam(value = "name", required = false) String name, + @Parameter(name = "status", description = "Updated status of the pet") @RequestParam(value = "status", required = false) String status ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -393,8 +393,8 @@ default ResponseEntity updatePetWithForm( ) default ResponseEntity uploadFile( - @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, - @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, + @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") @NotNull Long petId, + @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) { getRequest().ifPresent(request -> { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java index 7ea6bd5f65ee..238064224e81 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java @@ -70,7 +70,7 @@ default Optional getRequest() { ) default ResponseEntity deleteOrder( - @Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("order_id") String orderId + @Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("order_id") @NotNull String orderId ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -143,7 +143,7 @@ default ResponseEntity> getInventory( ) default ResponseEntity getOrderById( - @Min(1L) @Max(5L) @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("order_id") Long orderId + @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("order_id") @NotNull @Min(1L) @Max(5L) Long orderId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -194,7 +194,7 @@ default ResponseEntity getOrderById( ) default ResponseEntity placeOrder( - @Parameter(name = "Order", description = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order + @Parameter(name = "Order", description = "order placed for purchasing the pet", required = true) @RequestBody @NotNull @Valid Order order ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java index 161ff15ace2b..826eeeb2738f 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java @@ -69,7 +69,7 @@ default Optional getRequest() { ) default ResponseEntity createUser( - @Parameter(name = "User", description = "Created user object", required = true) @Valid @RequestBody User user + @Parameter(name = "User", description = "Created user object", required = true) @RequestBody @NotNull @Valid User user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -100,7 +100,7 @@ default ResponseEntity createUser( ) default ResponseEntity createUsersWithArrayInput( - @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + @Parameter(name = "User", description = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -131,7 +131,7 @@ default ResponseEntity createUsersWithArrayInput( ) default ResponseEntity createUsersWithListInput( - @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + @Parameter(name = "User", description = "List of user object", required = true) @RequestBody @NotNull List<@Valid User> user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -163,7 +163,7 @@ default ResponseEntity createUsersWithListInput( ) default ResponseEntity deleteUser( - @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") @NotNull String username ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -201,7 +201,7 @@ default ResponseEntity deleteUser( ) default ResponseEntity getUserByName( - @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") @NotNull String username ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -252,8 +252,8 @@ default ResponseEntity getUserByName( ) default ResponseEntity loginUser( - @NotNull @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username, - @NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) String password + @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @RequestParam(value = "username") @NotNull String username, + @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @RequestParam(value = "password") @NotNull String password ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -316,8 +316,8 @@ default ResponseEntity logoutUser( ) default ResponseEntity updateUser( - @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, - @Parameter(name = "User", description = "Updated user object", required = true) @Valid @RequestBody User user + @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") @NotNull String username, + @Parameter(name = "User", description = "Updated user object", required = true) @RequestBody @NotNull @Valid User user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesAnyType.java index b85eca500b5d..aa5353ddef52 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesAnyType.java @@ -36,7 +36,6 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -124,4 +123,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesArray.java index cadab9e4a7e8..fef379ac41e1 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesArray.java @@ -37,7 +37,6 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesBoolean.java index 15acfadaf75c..7626b4d171d6 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesBoolean.java @@ -36,7 +36,6 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -124,4 +123,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesClass.java index 653eb0405564..c2b7aaa44917 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesClass.java @@ -28,33 +28,25 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class AdditionalPropertiesClass { - @Valid private Map mapString = new HashMap<>(); - @Valid private Map mapNumber = new HashMap<>(); - @Valid private Map mapInteger = new HashMap<>(); - @Valid private Map mapBoolean = new HashMap<>(); - @Valid private Map> mapArrayInteger = new HashMap<>(); - @Valid private Map> mapArrayAnytype = new HashMap<>(); - @Valid private Map> mapMapString = new HashMap<>(); - @Valid private Map> mapMapAnytype = new HashMap<>(); private Object anytype1; - private JsonNullable anytype2 = JsonNullable.undefined(); + private JsonNullable anytype2 = JsonNullable.of(null); private Object anytype3; @@ -75,7 +67,6 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ - @Schema(name = "map_string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("map_string") public Map getMapString() { @@ -103,7 +94,6 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ - @Valid @Schema(name = "map_number", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("map_number") public Map getMapNumber() { @@ -131,7 +121,6 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ - @Schema(name = "map_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("map_integer") public Map getMapInteger() { @@ -159,7 +148,6 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ - @Schema(name = "map_boolean", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("map_boolean") public Map getMapBoolean() { @@ -187,7 +175,6 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { @@ -215,7 +202,6 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ - @Valid @Schema(name = "map_array_anytype", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("map_array_anytype") public Map> getMapArrayAnytype() { @@ -243,7 +229,6 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { @@ -271,7 +256,6 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { @@ -291,7 +275,6 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ - @Schema(name = "anytype_1", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("anytype_1") public Object getAnytype1() { @@ -302,8 +285,8 @@ public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; } - public AdditionalPropertiesClass anytype2(Object anytype2) { - this.anytype2 = JsonNullable.of(anytype2); + public AdditionalPropertiesClass anytype2(JsonNullable anytype2) { + this.anytype2 = anytype2; return this; } @@ -311,7 +294,6 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ - @Schema(name = "anytype_2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("anytype_2") public JsonNullable getAnytype2() { @@ -331,7 +313,6 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ - @Schema(name = "anytype_3", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("anytype_3") public Object getAnytype3() { @@ -410,4 +391,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesInteger.java index e85ef005f1b6..79eec294f490 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesInteger.java @@ -36,7 +36,6 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -124,4 +123,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesNumber.java index 4f9d91970cfb..1b52eac4fc9b 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesNumber.java @@ -37,7 +37,6 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesObject.java index 9c02692841d3..58ed234315df 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesObject.java @@ -37,7 +37,6 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -125,4 +124,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesString.java index 2cb689044190..e390d76f2e49 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesString.java @@ -36,7 +36,6 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -124,4 +123,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Animal.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Animal.java index 72d297dd7d9d..e2606543c690 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Animal.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Animal.java @@ -35,7 +35,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class Animal { - private String className; + private @NotNull String className; private String color = "red"; @@ -59,10 +59,9 @@ public Animal className(String className) { * Get className * @return className */ - @NotNull @Schema(name = "className", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("className") - public String getClassName() { + public @NotNull String getClassName() { return className; } @@ -79,7 +78,6 @@ public Animal color(String color) { * Get color * @return color */ - @Schema(name = "color", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("color") public String getColor() { @@ -129,4 +127,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfArrayOfNumberOnly.java index c4615fd40217..345e097993ac 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfArrayOfNumberOnly.java @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnly { - @Valid private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { @@ -45,7 +44,6 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ - @Valid @Schema(name = "ArrayArrayNumber", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("ArrayArrayNumber") public List> getArrayArrayNumber() { @@ -93,4 +91,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfNumberOnly.java index 0d55e80940dd..39afd7eb7268 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfNumberOnly.java @@ -25,7 +25,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayOfNumberOnly { - @Valid private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnly arrayNumber(List arrayNumber) { @@ -45,7 +44,6 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ - @Valid @Schema(name = "ArrayNumber", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("ArrayNumber") public List getArrayNumber() { @@ -93,4 +91,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayTest.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayTest.java index 14bc7e347d4e..5685689065ca 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayTest.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayTest.java @@ -25,13 +25,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayTest { - @Valid private List arrayOfString = new ArrayList<>(); - @Valid private List> arrayArrayOfInteger = new ArrayList<>(); - @Valid private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTest arrayOfString(List arrayOfString) { @@ -51,7 +48,6 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ - @Schema(name = "array_of_string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("array_of_string") public List getArrayOfString() { @@ -79,7 +75,6 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ - @Valid @Schema(name = "array_array_of_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("array_array_of_integer") public List> getArrayArrayOfInteger() { @@ -90,12 +85,12 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } - public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) { + public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { if (this.arrayArrayOfModel == null) { this.arrayArrayOfModel = new ArrayList<>(); } @@ -107,14 +102,13 @@ public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayO * Get arrayArrayOfModel * @return arrayArrayOfModel */ - @Valid @Schema(name = "array_array_of_model", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("array_array_of_model") public List> getArrayArrayOfModel() { return arrayArrayOfModel; } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { + public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } @@ -159,4 +153,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCat.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCat.java index 8354d4750949..cf4dfa6e472a 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCat.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCat.java @@ -66,7 +66,7 @@ public static KindEnum fromValue(String value) { } } - private KindEnum kind; + private String kind; public BigCat() { super(); @@ -88,10 +88,9 @@ public BigCat kind(KindEnum kind) { * Get kind * @return kind */ - @Schema(name = "kind", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("kind") - public KindEnum getKind() { + public String getKind() { return kind; } @@ -153,4 +152,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Capitalization.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Capitalization.java index c1c0b1b4344e..c2b9c024a095 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Capitalization.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Capitalization.java @@ -42,7 +42,6 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ - @Schema(name = "smallCamel", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("smallCamel") public String getSmallCamel() { @@ -62,7 +61,6 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ - @Schema(name = "CapitalCamel", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("CapitalCamel") public String getCapitalCamel() { @@ -82,7 +80,6 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ - @Schema(name = "small_Snake", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("small_Snake") public String getSmallSnake() { @@ -102,7 +99,6 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ - @Schema(name = "Capital_Snake", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("Capital_Snake") public String getCapitalSnake() { @@ -122,7 +118,6 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ - @Schema(name = "SCA_ETH_Flow_Points", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("SCA_ETH_Flow_Points") public String getScAETHFlowPoints() { @@ -142,7 +137,6 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ - @Schema(name = "ATT_NAME", description = "Name of the pet ", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("ATT_NAME") public String getATTNAME() { @@ -200,4 +194,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Cat.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Cat.java index ef699cd6cce4..1ce1ab6f1a3d 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Cat.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Cat.java @@ -56,7 +56,6 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ - @Schema(name = "declawed", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("declawed") public Boolean getDeclawed() { @@ -116,4 +115,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Category.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Category.java index e667f846c0df..0c87d22cd61e 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Category.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Category.java @@ -23,7 +23,7 @@ public class Category { private Long id; - private String name = "default-name"; + private @NotNull String name = "default-name"; public Category() { super(); @@ -45,7 +45,6 @@ public Category id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -65,10 +64,9 @@ public Category name(String name) { * Get name * @return name */ - @NotNull @Schema(name = "name", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -115,4 +113,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ChildWithNullable.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ChildWithNullable.java index 7d3ce6ab0665..1abf0b0bb8b3 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ChildWithNullable.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ChildWithNullable.java @@ -40,7 +40,6 @@ public ChildWithNullable otherProperty(String otherProperty) { * Get otherProperty * @return otherProperty */ - @Schema(name = "otherProperty", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("otherProperty") public String getOtherProperty() { @@ -57,7 +56,7 @@ public ChildWithNullable type(TypeEnum type) { return this; } - public ChildWithNullable nullableProperty(String nullableProperty) { + public ChildWithNullable nullableProperty(JsonNullable nullableProperty) { super.nullableProperty(nullableProperty); return this; } @@ -111,4 +110,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ClassModel.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ClassModel.java index 84b4c8c1f2f3..f040799919d9 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ClassModel.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ClassModel.java @@ -33,7 +33,6 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @Schema(name = "_class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("_class") public String getPropertyClass() { @@ -81,4 +80,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Client.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Client.java index 17ab78301163..ba3bba0ad4d8 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Client.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Client.java @@ -32,7 +32,6 @@ public Client client(String client) { * Get client * @return client */ - @Schema(name = "client", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("client") public String getClient() { @@ -80,4 +79,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ContainerDefaultValue.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ContainerDefaultValue.java index db6f1d7e1c3e..35ee005a4fad 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ContainerDefaultValue.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ContainerDefaultValue.java @@ -26,17 +26,13 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ContainerDefaultValue { - @Valid - private JsonNullable> nullableArray = JsonNullable.>undefined(); + private JsonNullable> nullableArray = JsonNullable.undefined(); - @Valid - private JsonNullable> nullableRequiredArray = JsonNullable.>undefined(); + private JsonNullable> nullableRequiredArray = JsonNullable.undefined(); - @Valid - private List requiredArray = new ArrayList<>(); + private @NotNull List requiredArray = new ArrayList<>(); - @Valid - private JsonNullable> nullableArrayWithDefault = JsonNullable.>undefined(); + private JsonNullable> nullableArrayWithDefault = JsonNullable.of(new ArrayList<>(Arrays.asList("foo", "bar"))); public ContainerDefaultValue() { super(); @@ -45,13 +41,13 @@ public ContainerDefaultValue() { /** * Constructor with only required parameters */ - public ContainerDefaultValue(List nullableRequiredArray, List requiredArray) { - this.nullableRequiredArray = JsonNullable.of(nullableRequiredArray); + public ContainerDefaultValue(JsonNullable> nullableRequiredArray, List requiredArray) { + this.nullableRequiredArray = nullableRequiredArray; this.requiredArray = requiredArray; } - public ContainerDefaultValue nullableArray(List nullableArray) { - this.nullableArray = JsonNullable.of(nullableArray); + public ContainerDefaultValue nullableArray(JsonNullable> nullableArray) { + this.nullableArray = nullableArray; return this; } @@ -67,7 +63,6 @@ public ContainerDefaultValue addNullableArrayItem(String nullableArrayItem) { * Get nullableArray * @return nullableArray */ - @Schema(name = "nullable_array", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("nullable_array") public JsonNullable> getNullableArray() { @@ -78,8 +73,8 @@ public void setNullableArray(JsonNullable> nullableArray) { this.nullableArray = nullableArray; } - public ContainerDefaultValue nullableRequiredArray(List nullableRequiredArray) { - this.nullableRequiredArray = JsonNullable.of(nullableRequiredArray); + public ContainerDefaultValue nullableRequiredArray(JsonNullable> nullableRequiredArray) { + this.nullableRequiredArray = nullableRequiredArray; return this; } @@ -95,7 +90,6 @@ public ContainerDefaultValue addNullableRequiredArrayItem(String nullableRequire * Get nullableRequiredArray * @return nullableRequiredArray */ - @NotNull @Schema(name = "nullable_required_array", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("nullable_required_array") public JsonNullable> getNullableRequiredArray() { @@ -123,10 +117,9 @@ public ContainerDefaultValue addRequiredArrayItem(String requiredArrayItem) { * Get requiredArray * @return requiredArray */ - @NotNull @Schema(name = "required_array", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("required_array") - public List getRequiredArray() { + public @NotNull List getRequiredArray() { return requiredArray; } @@ -134,8 +127,8 @@ public void setRequiredArray(List requiredArray) { this.requiredArray = requiredArray; } - public ContainerDefaultValue nullableArrayWithDefault(List nullableArrayWithDefault) { - this.nullableArrayWithDefault = JsonNullable.of(nullableArrayWithDefault); + public ContainerDefaultValue nullableArrayWithDefault(JsonNullable> nullableArrayWithDefault) { + this.nullableArrayWithDefault = nullableArrayWithDefault; return this; } @@ -151,7 +144,6 @@ public ContainerDefaultValue addNullableArrayWithDefaultItem(String nullableArra * Get nullableArrayWithDefault * @return nullableArrayWithDefault */ - @Schema(name = "nullable_array_with_default", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("nullable_array_with_default") public JsonNullable> getNullableArrayWithDefault() { @@ -216,4 +208,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Dog.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Dog.java index 6cd0b7f763c8..e297bd293cbc 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Dog.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Dog.java @@ -48,7 +48,6 @@ public Dog breed(String breed) { * Get breed * @return breed */ - @Schema(name = "breed", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("breed") public String getBreed() { @@ -108,4 +107,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumArrays.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumArrays.java index cc731460d2ea..86340909d5b6 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumArrays.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumArrays.java @@ -60,7 +60,7 @@ public static JustSymbolEnum fromValue(String value) { } } - private JustSymbolEnum justSymbol; + private String justSymbol; /** * Gets or Sets arrayEnum @@ -97,8 +97,7 @@ public static ArrayEnumEnum fromValue(String value) { } } - @Valid - private List arrayEnum = new ArrayList<>(); + private List arrayEnum = new ArrayList<>(); public EnumArrays justSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; @@ -109,10 +108,9 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ - @Schema(name = "just_symbol", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("just_symbol") - public JustSymbolEnum getJustSymbol() { + public String getJustSymbol() { return justSymbol; } @@ -137,10 +135,9 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ - @Schema(name = "array_enum", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("array_enum") - public List getArrayEnum() { + public List getArrayEnum() { return arrayEnum; } @@ -187,4 +184,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumTest.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumTest.java index 166d11794b1d..26e961140d64 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumTest.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumTest.java @@ -62,7 +62,7 @@ public static EnumStringEnum fromValue(String value) { } } - private EnumStringEnum enumString; + private String enumString; /** * Gets or Sets enumStringRequired @@ -101,7 +101,7 @@ public static EnumStringRequiredEnum fromValue(String value) { } } - private EnumStringRequiredEnum enumStringRequired; + private @NotNull String enumStringRequired; /** * Gets or Sets enumInteger @@ -138,7 +138,7 @@ public static EnumIntegerEnum fromValue(Integer value) { } } - private EnumIntegerEnum enumInteger; + private Integer enumInteger; /** * Gets or Sets enumNumber @@ -175,7 +175,7 @@ public static EnumNumberEnum fromValue(Double value) { } } - private EnumNumberEnum enumNumber; + private Double enumNumber; private OuterEnum outerEnum; @@ -199,10 +199,9 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ - @Schema(name = "enum_string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("enum_string") - public EnumStringEnum getEnumString() { + public String getEnumString() { return enumString; } @@ -219,10 +218,9 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ - @NotNull @Schema(name = "enum_string_required", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("enum_string_required") - public EnumStringRequiredEnum getEnumStringRequired() { + public @NotNull String getEnumStringRequired() { return enumStringRequired; } @@ -239,10 +237,9 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ - @Schema(name = "enum_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("enum_integer") - public EnumIntegerEnum getEnumInteger() { + public Integer getEnumInteger() { return enumInteger; } @@ -259,10 +256,9 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ - @Schema(name = "enum_number", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("enum_number") - public EnumNumberEnum getEnumNumber() { + public Double getEnumNumber() { return enumNumber; } @@ -279,7 +275,6 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ - @Valid @Schema(name = "outerEnum", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("outerEnum") public OuterEnum getOuterEnum() { @@ -335,4 +330,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/File.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/File.java index a3ffa592a99e..7156a1b6e0e1 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/File.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/File.java @@ -33,7 +33,6 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ - @Schema(name = "sourceURI", description = "Test capitalization", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("sourceURI") public String getSourceURI() { @@ -81,4 +80,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FileSchemaTestClass.java index 5b1e881ba593..95763d70a71a 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FileSchemaTestClass.java @@ -25,9 +25,8 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class FileSchemaTestClass { - private File file; + private @Valid File file; - @Valid private List<@Valid File> files = new ArrayList<>(); public FileSchemaTestClass file(File file) { @@ -39,10 +38,9 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ - @Valid @Schema(name = "file", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("file") - public File getFile() { + public @Valid File getFile() { return file; } @@ -50,7 +48,7 @@ public void setFile(File file) { this.file = file; } - public FileSchemaTestClass files(List<@Valid File> files) { + public FileSchemaTestClass files(List files) { this.files = files; return this; } @@ -67,14 +65,13 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ - @Valid @Schema(name = "files", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("files") public List<@Valid File> getFiles() { return files; } - public void setFiles(List<@Valid File> files) { + public void setFiles(List files) { this.files = files; } @@ -117,4 +114,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FormatTest.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FormatTest.java index 7ec3662ef278..ed5e47523be2 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FormatTest.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FormatTest.java @@ -29,33 +29,33 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class FormatTest { - private Integer integer; + private @Min(10) @Max(100) Integer integer; - private Integer int32; + private @Min(20) @Max(200) Integer int32; private Long int64; - private BigDecimal number; + private @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal number; - private Float _float; + private @DecimalMin("54.3") @DecimalMax("987.6") Float _float; - private Double _double; + private @DecimalMin("67.8") @DecimalMax("123.4") Double _double; - private String string; + private @Pattern(regexp = "/[a-z]/i") String string; - private byte[] _byte; + private @NotNull byte[] _byte; private org.springframework.core.io.Resource binary; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) - private LocalDate date; + private @NotNull LocalDate date; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; private UUID uuid; - private String password; + private @NotNull @Size(min = 10, max = 64) String password; private BigDecimal bigDecimal; @@ -84,10 +84,9 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ - @Min(10) @Max(100) @Schema(name = "integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("integer") - public Integer getInteger() { + public @Min(10) @Max(100) Integer getInteger() { return integer; } @@ -106,10 +105,9 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ - @Min(20) @Max(200) @Schema(name = "int32", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("int32") - public Integer getInt32() { + public @Min(20) @Max(200) Integer getInt32() { return int32; } @@ -126,7 +124,6 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ - @Schema(name = "int64", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("int64") public Long getInt64() { @@ -148,10 +145,9 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ - @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @Schema(name = "number", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("number") - public BigDecimal getNumber() { + public @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal getNumber() { return number; } @@ -170,10 +166,9 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ - @DecimalMin("54.3") @DecimalMax("987.6") @Schema(name = "float", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("float") - public Float getFloat() { + public @DecimalMin("54.3") @DecimalMax("987.6") Float getFloat() { return _float; } @@ -192,10 +187,9 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ - @DecimalMin("67.8") @DecimalMax("123.4") @Schema(name = "double", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("double") - public Double getDouble() { + public @DecimalMin("67.8") @DecimalMax("123.4") Double getDouble() { return _double; } @@ -212,10 +206,9 @@ public FormatTest string(String string) { * Get string * @return string */ - @Pattern(regexp = "/[a-z]/i") @Schema(name = "string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("string") - public String getString() { + public @Pattern(regexp = "/[a-z]/i") String getString() { return string; } @@ -232,10 +225,9 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ - @NotNull @Schema(name = "byte", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("byte") - public byte[] getByte() { + public @NotNull byte[] getByte() { return _byte; } @@ -252,7 +244,6 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ - @Valid @Schema(name = "binary", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("binary") public org.springframework.core.io.Resource getBinary() { @@ -272,10 +263,9 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ - @NotNull @Valid @Schema(name = "date", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("date") - public LocalDate getDate() { + public @NotNull LocalDate getDate() { return date; } @@ -292,7 +282,6 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ - @Valid @Schema(name = "dateTime", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dateTime") public OffsetDateTime getDateTime() { @@ -312,7 +301,6 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ - @Valid @Schema(name = "uuid", example = "72f98069-206d-4f12-9f12-3d1e525a8e84", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("uuid") public UUID getUuid() { @@ -332,10 +320,9 @@ public FormatTest password(String password) { * Get password * @return password */ - @NotNull @Size(min = 10, max = 64) @Schema(name = "password", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("password") - public String getPassword() { + public @NotNull @Size(min = 10, max = 64) String getPassword() { return password; } @@ -352,7 +339,6 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ - @Valid @Schema(name = "BigDecimal", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("BigDecimal") public BigDecimal getBigDecimal() { @@ -426,4 +412,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/HasOnlyReadOnly.java index aefacc4737e2..143216205d18 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/HasOnlyReadOnly.java @@ -36,7 +36,6 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ - @Schema(name = "bar", accessMode = Schema.AccessMode.READ_ONLY, requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("bar") public String getBar() { @@ -56,7 +55,6 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ - @Schema(name = "foo", accessMode = Schema.AccessMode.READ_ONLY, requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("foo") public String getFoo() { @@ -106,4 +104,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MapTest.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MapTest.java index f90fcecb02fc..dfa839f80f29 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MapTest.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MapTest.java @@ -24,7 +24,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class MapTest { - @Valid private Map> mapMapOfString = new HashMap<>(); /** @@ -62,13 +61,10 @@ public static InnerEnum fromValue(String value) { } } - @Valid - private Map mapOfEnumString = new HashMap<>(); + private Map mapOfEnumString = new HashMap<>(); - @Valid private Map directMap = new HashMap<>(); - @Valid private Map indirectMap = new HashMap<>(); public MapTest mapMapOfString(Map> mapMapOfString) { @@ -88,7 +84,6 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ - @Valid @Schema(name = "map_map_of_string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("map_map_of_string") public Map> getMapMapOfString() { @@ -116,10 +111,9 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ - @Schema(name = "map_of_enum_string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("map_of_enum_string") - public Map getMapOfEnumString() { + public Map getMapOfEnumString() { return mapOfEnumString; } @@ -144,7 +138,6 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ - @Schema(name = "direct_map", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("direct_map") public Map getDirectMap() { @@ -172,7 +165,6 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ - @Schema(name = "indirect_map", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("indirect_map") public Map getIndirectMap() { @@ -226,4 +218,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MixedPropertiesAndAdditionalPropertiesClass.java index b96dbee013e4..032c5e5f2c62 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -32,8 +32,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; - @Valid - private Map map = new HashMap<>(); + private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { this.uuid = uuid; @@ -44,7 +43,6 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ - @Valid @Schema(name = "uuid", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("uuid") public UUID getUuid() { @@ -64,7 +62,6 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ - @Valid @Schema(name = "dateTime", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dateTime") public OffsetDateTime getDateTime() { @@ -92,10 +89,9 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ - @Valid @Schema(name = "map", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("map") - public Map getMap() { + public Map getMap() { return map; } @@ -144,4 +140,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Model200Response.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Model200Response.java index 7626d2f17f06..617b9867ea15 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Model200Response.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Model200Response.java @@ -37,7 +37,6 @@ public Model200Response name(Integer name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public Integer getName() { @@ -57,7 +56,6 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @Schema(name = "class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("class") public String getPropertyClass() { @@ -107,4 +105,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelApiResponse.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelApiResponse.java index 7252981eb598..996736fdc1b0 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelApiResponse.java @@ -38,7 +38,6 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @Schema(name = "code", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("code") public Integer getCode() { @@ -58,7 +57,6 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @Schema(name = "type", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("type") public String getType() { @@ -78,7 +76,6 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @Schema(name = "message", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("message") public String getMessage() { @@ -130,4 +127,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelList.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelList.java index e0f01c85d4aa..612410f4ac7f 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelList.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelList.java @@ -34,7 +34,6 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ - @Schema(name = "123-list", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("123-list") public String get123list() { @@ -82,4 +81,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelReturn.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelReturn.java index 3c01eb4795a0..b2117fdb2513 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelReturn.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelReturn.java @@ -35,7 +35,6 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ - @Schema(name = "return", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("return") public Integer getReturn() { @@ -83,4 +82,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Name.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Name.java index 02d5f561a6ca..8a57cd98de24 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Name.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Name.java @@ -22,7 +22,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class Name { - private Integer name; + private @NotNull Integer name; private Integer snakeCase; @@ -50,10 +50,9 @@ public Name name(Integer name) { * Get name * @return name */ - @NotNull @Schema(name = "name", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("name") - public Integer getName() { + public @NotNull Integer getName() { return name; } @@ -70,7 +69,6 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ - @Schema(name = "snake_case", accessMode = Schema.AccessMode.READ_ONLY, requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("snake_case") public Integer getSnakeCase() { @@ -90,7 +88,6 @@ public Name property(String property) { * Get property * @return property */ - @Schema(name = "property", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("property") public String getProperty() { @@ -110,7 +107,6 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ - @Schema(name = "123Number", accessMode = Schema.AccessMode.READ_ONLY, requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("123Number") public Integer get123number() { @@ -164,4 +160,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/NullableMapProperty.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/NullableMapProperty.java index 562ad7709c04..032efaaf0950 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/NullableMapProperty.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/NullableMapProperty.java @@ -26,11 +26,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class NullableMapProperty { - @Valid - private JsonNullable> languageValues = JsonNullable.>undefined(); + private JsonNullable> languageValues = JsonNullable.undefined(); - public NullableMapProperty languageValues(Map languageValues) { - this.languageValues = JsonNullable.of(languageValues); + public NullableMapProperty languageValues(JsonNullable> languageValues) { + this.languageValues = languageValues; return this; } @@ -46,7 +45,6 @@ public NullableMapProperty putLanguageValuesItem(String key, String languageValu * Get languageValues * @return languageValues */ - @Schema(name = "languageValues", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("languageValues") public JsonNullable> getLanguageValues() { @@ -105,4 +103,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/NumberOnly.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/NumberOnly.java index 4490cbff64e5..8ef52e0bcbdb 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/NumberOnly.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/NumberOnly.java @@ -33,7 +33,6 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ - @Valid @Schema(name = "JustNumber", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("JustNumber") public BigDecimal getJustNumber() { @@ -81,4 +80,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Order.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Order.java index 0d937cf2a645..59e98c7a9e3c 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Order.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Order.java @@ -70,7 +70,7 @@ public static StatusEnum fromValue(String value) { } } - private StatusEnum status; + private String status; private Boolean complete = false; @@ -83,7 +83,6 @@ public Order id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -103,7 +102,6 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @Schema(name = "petId", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("petId") public Long getPetId() { @@ -123,7 +121,6 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @Schema(name = "quantity", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("quantity") public Integer getQuantity() { @@ -143,7 +140,6 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Valid @Schema(name = "shipDate", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("shipDate") public OffsetDateTime getShipDate() { @@ -163,10 +159,9 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @Schema(name = "status", description = "Order Status", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("status") - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -183,7 +178,6 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @Schema(name = "complete", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("complete") public Boolean getComplete() { @@ -241,4 +235,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/OuterComposite.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/OuterComposite.java index d44a7ce30bc4..e5030f8e3527 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/OuterComposite.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/OuterComposite.java @@ -37,7 +37,6 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ - @Valid @Schema(name = "my_number", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("my_number") public BigDecimal getMyNumber() { @@ -57,7 +56,6 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ - @Schema(name = "my_string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("my_string") public String getMyString() { @@ -77,7 +75,6 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ - @Schema(name = "my_boolean", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("my_boolean") public Boolean getMyBoolean() { @@ -129,4 +126,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ParentWithNullable.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ParentWithNullable.java index b9bc20f709a5..4520240466c4 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ParentWithNullable.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ParentWithNullable.java @@ -70,9 +70,9 @@ public static TypeEnum fromValue(String value) { } } - private TypeEnum type; + private String type; - private JsonNullable nullableProperty = JsonNullable.undefined(); + private JsonNullable nullableProperty = JsonNullable.undefined(); public ParentWithNullable type(TypeEnum type) { this.type = type; @@ -83,10 +83,9 @@ public ParentWithNullable type(TypeEnum type) { * Get type * @return type */ - @Schema(name = "type", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("type") - public TypeEnum getType() { + public String getType() { return type; } @@ -94,8 +93,8 @@ public void setType(TypeEnum type) { this.type = type; } - public ParentWithNullable nullableProperty(String nullableProperty) { - this.nullableProperty = JsonNullable.of(nullableProperty); + public ParentWithNullable nullableProperty(JsonNullable nullableProperty) { + this.nullableProperty = nullableProperty; return this; } @@ -103,7 +102,6 @@ public ParentWithNullable nullableProperty(String nullableProperty) { * Get nullableProperty * @return nullableProperty */ - @Schema(name = "nullableProperty", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("nullableProperty") public JsonNullable getNullableProperty() { @@ -164,4 +162,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java index 7de63ff83f6f..7c8ffcfe1768 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java @@ -32,14 +32,12 @@ public class Pet { private Long id; - private Category category; + private @Valid Category category; - private String name; + private @NotNull String name; - @Valid - private Set photoUrls = new LinkedHashSet<>(); + private @NotNull Set photoUrls = new LinkedHashSet<>(); - @Valid private List<@Valid Tag> tags = new ArrayList<>(); /** @@ -80,7 +78,7 @@ public static StatusEnum fromValue(String value) { } @Deprecated - private StatusEnum status; + private String status; public Pet() { super(); @@ -103,7 +101,6 @@ public Pet id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -123,10 +120,9 @@ public Pet category(Category category) { * Get category * @return category */ - @Valid @Schema(name = "category", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("category") - public Category getCategory() { + public @Valid Category getCategory() { return category; } @@ -143,10 +139,9 @@ public Pet name(String name) { * Get name * @return name */ - @NotNull @Schema(name = "name", example = "doggie", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -171,10 +166,9 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @NotNull @Schema(name = "photoUrls", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("photoUrls") - public Set getPhotoUrls() { + public @NotNull Set getPhotoUrls() { return photoUrls; } @@ -183,7 +177,7 @@ public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List<@Valid Tag> tags) { + public Pet tags(List tags) { this.tags = tags; return this; } @@ -200,14 +194,13 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Valid @Schema(name = "tags", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("tags") public List<@Valid Tag> getTags() { return tags; } - public void setTags(List<@Valid Tag> tags) { + public void setTags(List tags) { this.tags = tags; } @@ -221,11 +214,10 @@ public Pet status(StatusEnum status) { * @return status * @deprecated */ - @Schema(name = "status", description = "pet status in the store", deprecated = true, requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("status") @Deprecated - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -284,4 +276,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ReadOnlyFirst.java index 5248161b9503..0ca1190018c1 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ReadOnlyFirst.java @@ -34,7 +34,6 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ - @Schema(name = "bar", accessMode = Schema.AccessMode.READ_ONLY, requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("bar") public String getBar() { @@ -54,7 +53,6 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ - @Schema(name = "baz", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("baz") public String getBaz() { @@ -104,4 +102,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ResponseObjectWithDifferentFieldNames.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ResponseObjectWithDifferentFieldNames.java index e3cdecd021b7..9edf9c3e7ecc 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ResponseObjectWithDifferentFieldNames.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ResponseObjectWithDifferentFieldNames.java @@ -38,7 +38,6 @@ public ResponseObjectWithDifferentFieldNames normalPropertyName(String normalPro * Get normalPropertyName * @return normalPropertyName */ - @Schema(name = "normalPropertyName", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("normalPropertyName") public String getNormalPropertyName() { @@ -58,7 +57,6 @@ public ResponseObjectWithDifferentFieldNames UPPER_CASE_PROPERTY_SNAKE(String UP * Get UPPER_CASE_PROPERTY_SNAKE * @return UPPER_CASE_PROPERTY_SNAKE */ - @Schema(name = "UPPER_CASE_PROPERTY_SNAKE", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("UPPER_CASE_PROPERTY_SNAKE") public String getUPPERCASEPROPERTYSNAKE() { @@ -78,7 +76,6 @@ public ResponseObjectWithDifferentFieldNames lowerCasePropertyDashes(String lowe * Get lowerCasePropertyDashes * @return lowerCasePropertyDashes */ - @Schema(name = "lower-case-property-dashes", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("lower-case-property-dashes") public String getLowerCasePropertyDashes() { @@ -98,7 +95,6 @@ public ResponseObjectWithDifferentFieldNames propertyNameWithSpaces(String prope * Get propertyNameWithSpaces * @return propertyNameWithSpaces */ - @Schema(name = "property name with spaces", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("property name with spaces") public String getPropertyNameWithSpaces() { @@ -152,4 +148,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/SpecialModelName.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/SpecialModelName.java index 418a2bab073c..3c02ef4e08c9 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/SpecialModelName.java @@ -34,7 +34,6 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ - @Schema(name = "$special[property.name]", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("$special[property.name]") public Long get$SpecialPropertyName() { @@ -82,4 +81,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Tag.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Tag.java index b00c2cc33b56..a724cfd4c761 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Tag.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Tag.java @@ -34,7 +34,6 @@ public Tag id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -54,7 +53,6 @@ public Tag name(String name) { * Get name * @return name */ - @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public String getName() { @@ -104,4 +102,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderDefault.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderDefault.java index 0a39b865a709..51f35d87bcfb 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderDefault.java @@ -25,16 +25,15 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class TypeHolderDefault { - private String stringItem = "what"; + private @NotNull String stringItem = "what"; - private BigDecimal numberItem = new BigDecimal("1.234"); + private @NotNull BigDecimal numberItem = new BigDecimal("1.234"); - private Integer integerItem = -2; + private @NotNull Integer integerItem = -2; - private Boolean boolItem = true; + private @NotNull Boolean boolItem = true; - @Valid - private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); + private @NotNull List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); public TypeHolderDefault() { super(); @@ -60,10 +59,9 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @NotNull @Schema(name = "string_item", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("string_item") - public String getStringItem() { + public @NotNull String getStringItem() { return stringItem; } @@ -80,10 +78,9 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @NotNull @Valid @Schema(name = "number_item", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("number_item") - public BigDecimal getNumberItem() { + public @NotNull BigDecimal getNumberItem() { return numberItem; } @@ -100,10 +97,9 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @NotNull @Schema(name = "integer_item", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("integer_item") - public Integer getIntegerItem() { + public @NotNull Integer getIntegerItem() { return integerItem; } @@ -120,10 +116,9 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @NotNull @Schema(name = "bool_item", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("bool_item") - public Boolean getBoolItem() { + public @NotNull Boolean getBoolItem() { return boolItem; } @@ -148,10 +143,9 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @NotNull @Schema(name = "array_item", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("array_item") - public List getArrayItem() { + public @NotNull List getArrayItem() { return arrayItem; } @@ -204,4 +198,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderExample.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderExample.java index 824057bf65ed..77ae2eebc2c2 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderExample.java @@ -25,18 +25,17 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class TypeHolderExample { - private String stringItem; + private @NotNull String stringItem; - private BigDecimal numberItem; + private @NotNull BigDecimal numberItem; - private Float floatItem; + private @NotNull Float floatItem; - private Integer integerItem; + private @NotNull Integer integerItem; - private Boolean boolItem; + private @NotNull Boolean boolItem; - @Valid - private List arrayItem = new ArrayList<>(); + private @NotNull List arrayItem = new ArrayList<>(); public TypeHolderExample() { super(); @@ -63,10 +62,9 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @NotNull @Schema(name = "string_item", example = "what", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("string_item") - public String getStringItem() { + public @NotNull String getStringItem() { return stringItem; } @@ -83,10 +81,9 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @NotNull @Valid @Schema(name = "number_item", example = "1.234", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("number_item") - public BigDecimal getNumberItem() { + public @NotNull BigDecimal getNumberItem() { return numberItem; } @@ -103,10 +100,9 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ - @NotNull @Schema(name = "float_item", example = "1.234", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("float_item") - public Float getFloatItem() { + public @NotNull Float getFloatItem() { return floatItem; } @@ -123,10 +119,9 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @NotNull @Schema(name = "integer_item", example = "-2", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("integer_item") - public Integer getIntegerItem() { + public @NotNull Integer getIntegerItem() { return integerItem; } @@ -143,10 +138,9 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @NotNull @Schema(name = "bool_item", example = "true", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("bool_item") - public Boolean getBoolItem() { + public @NotNull Boolean getBoolItem() { return boolItem; } @@ -171,10 +165,9 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @NotNull @Schema(name = "array_item", example = "[0,1,2,3]", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("array_item") - public List getArrayItem() { + public @NotNull List getArrayItem() { return arrayItem; } @@ -229,4 +222,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/User.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/User.java index 24c081780d9f..d1a5c098bf18 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/User.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/User.java @@ -46,7 +46,6 @@ public User id(Long id) { * Get id * @return id */ - @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public Long getId() { @@ -66,7 +65,6 @@ public User username(String username) { * Get username * @return username */ - @Schema(name = "username", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("username") public String getUsername() { @@ -86,7 +84,6 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @Schema(name = "firstName", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("firstName") public String getFirstName() { @@ -106,7 +103,6 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @Schema(name = "lastName", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("lastName") public String getLastName() { @@ -126,7 +122,6 @@ public User email(String email) { * Get email * @return email */ - @Schema(name = "email", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("email") public String getEmail() { @@ -146,7 +141,6 @@ public User password(String password) { * Get password * @return password */ - @Schema(name = "password", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("password") public String getPassword() { @@ -166,7 +160,6 @@ public User phone(String phone) { * Get phone * @return phone */ - @Schema(name = "phone", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("phone") public String getPhone() { @@ -186,7 +179,6 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @Schema(name = "userStatus", description = "User Status", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("userStatus") public Integer getUserStatus() { @@ -248,4 +240,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/XmlItem.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/XmlItem.java index 0c68bae79833..6e41882fc876 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/XmlItem.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/XmlItem.java @@ -33,7 +33,6 @@ public class XmlItem { private Boolean attributeBoolean; - @Valid private List wrappedArray = new ArrayList<>(); private String nameString; @@ -44,10 +43,8 @@ public class XmlItem { private Boolean nameBoolean; - @Valid private List nameArray = new ArrayList<>(); - @Valid private List nameWrappedArray = new ArrayList<>(); private String prefixString; @@ -58,10 +55,8 @@ public class XmlItem { private Boolean prefixBoolean; - @Valid private List prefixArray = new ArrayList<>(); - @Valid private List prefixWrappedArray = new ArrayList<>(); private String namespaceString; @@ -72,10 +67,8 @@ public class XmlItem { private Boolean namespaceBoolean; - @Valid private List namespaceArray = new ArrayList<>(); - @Valid private List namespaceWrappedArray = new ArrayList<>(); private String prefixNsString; @@ -86,10 +79,8 @@ public class XmlItem { private Boolean prefixNsBoolean; - @Valid private List prefixNsArray = new ArrayList<>(); - @Valid private List prefixNsWrappedArray = new ArrayList<>(); public XmlItem attributeString(String attributeString) { @@ -101,7 +92,6 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ - @Schema(name = "attribute_string", example = "string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("attribute_string") public String getAttributeString() { @@ -121,7 +111,6 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ - @Valid @Schema(name = "attribute_number", example = "1.234", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("attribute_number") public BigDecimal getAttributeNumber() { @@ -141,7 +130,6 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ - @Schema(name = "attribute_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("attribute_integer") public Integer getAttributeInteger() { @@ -161,7 +149,6 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ - @Schema(name = "attribute_boolean", example = "true", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("attribute_boolean") public Boolean getAttributeBoolean() { @@ -189,7 +176,6 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ - @Schema(name = "wrapped_array", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("wrapped_array") public List getWrappedArray() { @@ -209,7 +195,6 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ - @Schema(name = "name_string", example = "string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name_string") public String getNameString() { @@ -229,7 +214,6 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ - @Valid @Schema(name = "name_number", example = "1.234", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name_number") public BigDecimal getNameNumber() { @@ -249,7 +233,6 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ - @Schema(name = "name_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name_integer") public Integer getNameInteger() { @@ -269,7 +252,6 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ - @Schema(name = "name_boolean", example = "true", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name_boolean") public Boolean getNameBoolean() { @@ -297,7 +279,6 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ - @Schema(name = "name_array", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name_array") public List getNameArray() { @@ -325,7 +306,6 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ - @Schema(name = "name_wrapped_array", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name_wrapped_array") public List getNameWrappedArray() { @@ -345,7 +325,6 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ - @Schema(name = "prefix_string", example = "string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_string") public String getPrefixString() { @@ -365,7 +344,6 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ - @Valid @Schema(name = "prefix_number", example = "1.234", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_number") public BigDecimal getPrefixNumber() { @@ -385,7 +363,6 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ - @Schema(name = "prefix_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_integer") public Integer getPrefixInteger() { @@ -405,7 +382,6 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ - @Schema(name = "prefix_boolean", example = "true", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_boolean") public Boolean getPrefixBoolean() { @@ -433,7 +409,6 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ - @Schema(name = "prefix_array", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_array") public List getPrefixArray() { @@ -461,7 +436,6 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ - @Schema(name = "prefix_wrapped_array", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_wrapped_array") public List getPrefixWrappedArray() { @@ -481,7 +455,6 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ - @Schema(name = "namespace_string", example = "string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespace_string") public String getNamespaceString() { @@ -501,7 +474,6 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ - @Valid @Schema(name = "namespace_number", example = "1.234", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespace_number") public BigDecimal getNamespaceNumber() { @@ -521,7 +493,6 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ - @Schema(name = "namespace_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { @@ -541,7 +512,6 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ - @Schema(name = "namespace_boolean", example = "true", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespace_boolean") public Boolean getNamespaceBoolean() { @@ -569,7 +539,6 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ - @Schema(name = "namespace_array", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespace_array") public List getNamespaceArray() { @@ -597,7 +566,6 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ - @Schema(name = "namespace_wrapped_array", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespace_wrapped_array") public List getNamespaceWrappedArray() { @@ -617,7 +585,6 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ - @Schema(name = "prefix_ns_string", example = "string", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_ns_string") public String getPrefixNsString() { @@ -637,7 +604,6 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ - @Valid @Schema(name = "prefix_ns_number", example = "1.234", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_ns_number") public BigDecimal getPrefixNsNumber() { @@ -657,7 +623,6 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ - @Schema(name = "prefix_ns_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { @@ -677,7 +642,6 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ - @Schema(name = "prefix_ns_boolean", example = "true", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_ns_boolean") public Boolean getPrefixNsBoolean() { @@ -705,7 +669,6 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ - @Schema(name = "prefix_ns_array", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_ns_array") public List getPrefixNsArray() { @@ -733,7 +696,6 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ - @Schema(name = "prefix_ns_wrapped_array", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_ns_wrapped_array") public List getPrefixNsWrappedArray() { @@ -837,4 +799,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java index 5964cbe886ee..375c02a63267 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -56,7 +56,7 @@ default Optional getRequest() { ) default ResponseEntity call123testSpecialTags( - @ApiParam(value = "client model", required = true) @Valid @RequestBody ClientDto clientDto + @ApiParam(value = "client model", required = true) @RequestBody @NotNull @Valid ClientDto clientDto ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java index 8eaced674480..57f7a9ad967b 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java @@ -66,7 +66,7 @@ default Optional getRequest() { ) default ResponseEntity createXmlItem( - @ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItemDto xmlItemDto + @ApiParam(value = "XmlItem Body", required = true) @RequestBody @NotNull @Valid XmlItemDto xmlItemDto ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -98,7 +98,7 @@ default ResponseEntity createXmlItem( ) default ResponseEntity fakeOuterBooleanSerialize( - @ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body + @ApiParam(value = "Input boolean as post body") @RequestBody(required = false) Boolean body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -130,7 +130,7 @@ default ResponseEntity fakeOuterBooleanSerialize( ) default ResponseEntity fakeOuterCompositeSerialize( - @ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterCompositeDto outerCompositeDto + @ApiParam(value = "Input composite as post body") @RequestBody(required = false) @Valid OuterCompositeDto outerCompositeDto ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -171,7 +171,7 @@ default ResponseEntity fakeOuterCompositeSerialize( ) default ResponseEntity fakeOuterNumberSerialize( - @ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body + @ApiParam(value = "Input number as post body") @RequestBody(required = false) BigDecimal body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -203,7 +203,7 @@ default ResponseEntity fakeOuterNumberSerialize( ) default ResponseEntity fakeOuterStringSerialize( - @ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body + @ApiParam(value = "Input string as post body") @RequestBody(required = false) String body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -233,7 +233,7 @@ default ResponseEntity fakeOuterStringSerialize( ) default ResponseEntity responseObjectDifferentNames( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") @NotNull Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -272,7 +272,7 @@ default ResponseEntity responseObjectD ) default ResponseEntity testBodyWithFileSchema( - @ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClassDto fileSchemaTestClassDto + @ApiParam(value = "", required = true) @RequestBody @NotNull @Valid FileSchemaTestClassDto fileSchemaTestClassDto ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -302,8 +302,8 @@ default ResponseEntity testBodyWithFileSchema( ) default ResponseEntity testBodyWithQueryParams( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, - @ApiParam(value = "", required = true) @Valid @RequestBody UserDto userDto + @ApiParam(value = "", required = true) @RequestParam(value = "query") @NotNull String query, + @ApiParam(value = "", required = true) @RequestBody @NotNull @Valid UserDto userDto ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -335,7 +335,7 @@ default ResponseEntity testBodyWithQueryParams( ) default ResponseEntity testClientModel( - @ApiParam(value = "client model", required = true) @Valid @RequestBody ClientDto clientDto + @ApiParam(value = "client model", required = true) @RequestBody @NotNull @Valid ClientDto clientDto ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -392,20 +392,20 @@ default ResponseEntity testClientModel( ) default ResponseEntity testEndpointParameters( - @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "number", required = true) BigDecimal number, - @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "double", required = true) Double _double, - @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, - @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "byte", required = true) byte[] _byte, - @ApiParam(value = "None") @Valid @RequestParam(value = "integer", required = false) Integer integer, - @ApiParam(value = "None") @Valid @RequestParam(value = "int32", required = false) Integer int32, - @ApiParam(value = "None") @Valid @RequestParam(value = "int64", required = false) Long int64, - @ApiParam(value = "None") @Valid @RequestParam(value = "float", required = false) Float _float, - @ApiParam(value = "None") @Valid @RequestParam(value = "string", required = false) String string, + @ApiParam(value = "None", required = true) @RequestParam(value = "number") @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal number, + @ApiParam(value = "None", required = true) @RequestParam(value = "double") @NotNull @DecimalMin("67.8") @DecimalMax("123.4") Double _double, + @ApiParam(value = "None", required = true) @RequestParam(value = "pattern_without_delimiter") @NotNull @Pattern(regexp = "^[A-Z].*") String patternWithoutDelimiter, + @ApiParam(value = "None", required = true) @RequestParam(value = "byte") @NotNull byte[] _byte, + @ApiParam(value = "None") @RequestParam(value = "integer", required = false) @Min(10) @Max(100) Integer integer, + @ApiParam(value = "None") @RequestParam(value = "int32", required = false) @Min(20) @Max(200) Integer int32, + @ApiParam(value = "None") @RequestParam(value = "int64", required = false) Long int64, + @ApiParam(value = "None") @RequestParam(value = "float", required = false) @DecimalMax("987.6") Float _float, + @ApiParam(value = "None") @RequestParam(value = "string", required = false) @Pattern(regexp = "/[a-z]/i") String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @ApiParam(value = "None") @Valid @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, - @ApiParam(value = "None") @Valid @RequestParam(value = "password", required = false) String password, - @ApiParam(value = "None") @Valid @RequestParam(value = "callback", required = false) String paramCallback + @ApiParam(value = "None") @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @RequestParam(value = "password", required = false) @Size(min = 10, max = 64) String password, + @ApiParam(value = "None") @RequestParam(value = "callback", required = false) String paramCallback ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -444,14 +444,14 @@ default ResponseEntity testEndpointParameters( ) default ResponseEntity testEnumParameters( - @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, - @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, - @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, - @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, - @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString + @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestParam(value = "enum_form_string", required = false) String enumFormString ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -485,12 +485,12 @@ default ResponseEntity testEnumParameters( ) default ResponseEntity testGroupParameters( - @NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @ApiParam(value = "Required String in group parameters", required = true) @RequestParam(value = "required_string_group") @NotNull Integer requiredStringGroup, @NotNull @ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, - @NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, - @ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup, + @ApiParam(value = "Required Integer in group parameters", required = true) @RequestParam(value = "required_int64_group") @NotNull Long requiredInt64Group, + @ApiParam(value = "String in group parameters") @RequestParam(value = "string_group", required = false) Integer stringGroup, @ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup, - @ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + @ApiParam(value = "Integer in group parameters") @RequestParam(value = "int64_group", required = false) Long int64Group ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -520,7 +520,7 @@ default ResponseEntity testGroupParameters( ) default ResponseEntity testInlineAdditionalProperties( - @ApiParam(value = "request body", required = true) @Valid @RequestBody Map requestBody + @ApiParam(value = "request body", required = true) @RequestBody @NotNull Map requestBody ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -551,8 +551,8 @@ default ResponseEntity testInlineAdditionalProperties( ) default ResponseEntity testJsonFormData( - @ApiParam(value = "field1", required = true) @Valid @RequestParam(value = "param", required = true) String param, - @ApiParam(value = "field2", required = true) @Valid @RequestParam(value = "param2", required = true) String param2 + @ApiParam(value = "field1", required = true) @RequestParam(value = "param") @NotNull String param, + @ApiParam(value = "field2", required = true) @RequestParam(value = "param2") @NotNull String param2 ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -582,7 +582,7 @@ default ResponseEntity testJsonFormData( ) default ResponseEntity testNullable( - @ApiParam(value = "request body", required = true) @Valid @RequestBody ChildWithNullableDto childWithNullableDto + @ApiParam(value = "request body", required = true) @RequestBody @NotNull @Valid ChildWithNullableDto childWithNullableDto ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -614,10 +614,10 @@ default ResponseEntity testNullable( ) default ResponseEntity testQueryParameterCollectionFormat( - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url, - @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + @ApiParam(value = "", required = true) @RequestParam(value = "pipe") @NotNull List pipe, + @ApiParam(value = "", required = true) @RequestParam(value = "http") @NotNull List http, + @ApiParam(value = "", required = true) @RequestParam(value = "url") @NotNull List url, + @ApiParam(value = "", required = true) @RequestParam(value = "context") @NotNull List context ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -696,9 +696,9 @@ default ResponseEntity testWithResultExample( ) default ResponseEntity uploadFileWithRequiredFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, - @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, - @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") @NotNull Long petId, + @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile") MultipartFile requiredFile, + @ApiParam(value = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index e8a3bdf09427..3f9faa911eb3 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -59,7 +59,7 @@ default Optional getRequest() { ) default ResponseEntity testClassname( - @ApiParam(value = "client model", required = true) @Valid @RequestBody ClientDto clientDto + @ApiParam(value = "client model", required = true) @RequestBody @NotNull @Valid ClientDto clientDto ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java index f1695674ed3c..8943bb3d484f 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java @@ -64,7 +64,7 @@ default Optional getRequest() { ) default ResponseEntity addPet( - @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody PetDto petDto + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid PetDto petDto ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -102,7 +102,7 @@ default ResponseEntity addPet( ) default ResponseEntity deletePet( - @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") @NotNull Long petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -124,7 +124,7 @@ default ResponseEntity deletePet( nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = PetDto.class, - responseContainer = "List", + responseContainer = "array", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @@ -133,7 +133,7 @@ default ResponseEntity deletePet( } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = PetDto.class, responseContainer = "List"), + @ApiResponse(code = 200, message = "successful operation", response = PetDto.class, responseContainer = "array"), @ApiResponse(code = 400, message = "Invalid status value") }) @RequestMapping( @@ -143,7 +143,7 @@ default ResponseEntity deletePet( ) default ResponseEntity> findPetsByStatus( - @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status + @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @RequestParam(value = "status") @NotNull List status ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -180,7 +180,7 @@ default ResponseEntity> findPetsByStatus( nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = PetDto.class, - responseContainer = "Set", + responseContainer = "set", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @@ -189,7 +189,7 @@ default ResponseEntity> findPetsByStatus( } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = PetDto.class, responseContainer = "Set"), + @ApiResponse(code = 200, message = "successful operation", response = PetDto.class, responseContainer = "set"), @ApiResponse(code = 400, message = "Invalid tag value") }) @RequestMapping( @@ -199,7 +199,7 @@ default ResponseEntity> findPetsByStatus( ) default ResponseEntity> findPetsByTags( - @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags + @ApiParam(value = "Tags to filter by", required = true) @RequestParam(value = "tags") @NotNull Set tags ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -251,7 +251,7 @@ default ResponseEntity> findPetsByTags( ) default ResponseEntity getPetById( - @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") @NotNull Long petId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -307,7 +307,7 @@ default ResponseEntity getPetById( ) default ResponseEntity updatePet( - @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody PetDto petDto + @ApiParam(value = "Pet object that needs to be added to the store", required = true) @RequestBody @NotNull @Valid PetDto petDto ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -345,9 +345,9 @@ default ResponseEntity updatePet( ) default ResponseEntity updatePetWithForm( - @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, - @ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, - @ApiParam(value = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status + @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") @NotNull Long petId, + @ApiParam(value = "Updated name of the pet") @RequestParam(value = "name", required = false) String name, + @ApiParam(value = "Updated status of the pet") @RequestParam(value = "status", required = false) String status ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -387,8 +387,8 @@ default ResponseEntity updatePetWithForm( ) default ResponseEntity uploadFile( - @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, - @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, + @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") @NotNull Long petId, + @ApiParam(value = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file ) { getRequest().ifPresent(request -> { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java index 0533deb73cc6..69b8c6628e68 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java @@ -56,7 +56,7 @@ default Optional getRequest() { ) default ResponseEntity deleteOrder( - @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") @NotNull String orderId ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -75,13 +75,13 @@ default ResponseEntity deleteOrder( nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, - responseContainer = "Map", + responseContainer = "map", authorizations = { @Authorization(value = "api_key") } ) @ApiResponses({ - @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "map") }) @RequestMapping( method = RequestMethod.GET, @@ -125,7 +125,7 @@ default ResponseEntity> getInventory( ) default ResponseEntity getOrderById( - @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") @NotNull @Min(1L) @Max(5L) Long orderId ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -173,7 +173,7 @@ default ResponseEntity getOrderById( ) default ResponseEntity placeOrder( - @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody OrderDto orderDto + @ApiParam(value = "order placed for purchasing the pet", required = true) @RequestBody @NotNull @Valid OrderDto orderDto ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java index 0910e7414760..b60ac52f8de2 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java @@ -55,7 +55,7 @@ default Optional getRequest() { ) default ResponseEntity createUser( - @ApiParam(value = "Created user object", required = true) @Valid @RequestBody UserDto userDto + @ApiParam(value = "Created user object", required = true) @RequestBody @NotNull @Valid UserDto userDto ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -85,7 +85,7 @@ default ResponseEntity createUser( ) default ResponseEntity createUsersWithArrayInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@Valid UserDto> userDto + @ApiParam(value = "List of user object", required = true) @RequestBody @NotNull List<@Valid UserDto> userDto ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -115,7 +115,7 @@ default ResponseEntity createUsersWithArrayInput( ) default ResponseEntity createUsersWithListInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@Valid UserDto> userDto + @ApiParam(value = "List of user object", required = true) @RequestBody @NotNull List<@Valid UserDto> userDto ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -146,7 +146,7 @@ default ResponseEntity createUsersWithListInput( ) default ResponseEntity deleteUser( - @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") @NotNull String username ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -181,7 +181,7 @@ default ResponseEntity deleteUser( ) default ResponseEntity getUserByName( - @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") @NotNull String username ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -229,8 +229,8 @@ default ResponseEntity getUserByName( ) default ResponseEntity loginUser( - @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, - @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + @ApiParam(value = "The user name for login", required = true) @RequestParam(value = "username") @NotNull String username, + @ApiParam(value = "The password for login in clear text", required = true) @RequestParam(value = "password") @NotNull String password ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -291,8 +291,8 @@ default ResponseEntity logoutUser( ) default ResponseEntity updateUser( - @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, - @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody UserDto userDto + @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") @NotNull String username, + @ApiParam(value = "Updated user object", required = true) @RequestBody @NotNull @Valid UserDto userDto ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesAnyTypeDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesAnyTypeDto.java index c36b3cf3f033..e8baa9462eb1 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesAnyTypeDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesAnyTypeDto.java @@ -39,7 +39,6 @@ public AdditionalPropertiesAnyTypeDto name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -127,4 +126,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesArrayDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesArrayDto.java index a1b4b24bc8d2..b81fbe1ed946 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesArrayDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesArrayDto.java @@ -40,7 +40,6 @@ public AdditionalPropertiesArrayDto name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -128,4 +127,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesBooleanDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesBooleanDto.java index 9ad19536c545..62f2d9edf344 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesBooleanDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesBooleanDto.java @@ -39,7 +39,6 @@ public AdditionalPropertiesBooleanDto name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -127,4 +126,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java index 75762bda68af..1f08c4814625 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java @@ -31,33 +31,25 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class AdditionalPropertiesClassDto { - @Valid private Map mapString = new HashMap<>(); - @Valid private Map mapNumber = new HashMap<>(); - @Valid private Map mapInteger = new HashMap<>(); - @Valid private Map mapBoolean = new HashMap<>(); - @Valid private Map> mapArrayInteger = new HashMap<>(); - @Valid private Map> mapArrayAnytype = new HashMap<>(); - @Valid private Map> mapMapString = new HashMap<>(); - @Valid private Map> mapMapAnytype = new HashMap<>(); private Object anytype1; - private JsonNullable anytype2 = JsonNullable.undefined(); + private JsonNullable anytype2 = JsonNullable.of(null); private Object anytype3; @@ -78,7 +70,6 @@ public AdditionalPropertiesClassDto putMapStringItem(String key, String mapStrin * Get mapString * @return mapString */ - @ApiModelProperty(value = "") @JsonProperty("map_string") public Map getMapString() { @@ -106,7 +97,6 @@ public AdditionalPropertiesClassDto putMapNumberItem(String key, BigDecimal mapN * Get mapNumber * @return mapNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("map_number") public Map getMapNumber() { @@ -134,7 +124,6 @@ public AdditionalPropertiesClassDto putMapIntegerItem(String key, Integer mapInt * Get mapInteger * @return mapInteger */ - @ApiModelProperty(value = "") @JsonProperty("map_integer") public Map getMapInteger() { @@ -162,7 +151,6 @@ public AdditionalPropertiesClassDto putMapBooleanItem(String key, Boolean mapBoo * Get mapBoolean * @return mapBoolean */ - @ApiModelProperty(value = "") @JsonProperty("map_boolean") public Map getMapBoolean() { @@ -190,7 +178,6 @@ public AdditionalPropertiesClassDto putMapArrayIntegerItem(String key, List> getMapArrayInteger() { @@ -218,7 +205,6 @@ public AdditionalPropertiesClassDto putMapArrayAnytypeItem(String key, List> getMapArrayAnytype() { @@ -246,7 +232,6 @@ public AdditionalPropertiesClassDto putMapMapStringItem(String key, Map> getMapMapString() { @@ -274,7 +259,6 @@ public AdditionalPropertiesClassDto putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { @@ -294,7 +278,6 @@ public AdditionalPropertiesClassDto anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ - @ApiModelProperty(value = "") @JsonProperty("anytype_1") public Object getAnytype1() { @@ -305,8 +288,8 @@ public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; } - public AdditionalPropertiesClassDto anytype2(Object anytype2) { - this.anytype2 = JsonNullable.of(anytype2); + public AdditionalPropertiesClassDto anytype2(JsonNullable anytype2) { + this.anytype2 = anytype2; return this; } @@ -314,7 +297,6 @@ public AdditionalPropertiesClassDto anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ - @ApiModelProperty(value = "") @JsonProperty("anytype_2") public JsonNullable getAnytype2() { @@ -334,7 +316,6 @@ public AdditionalPropertiesClassDto anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ - @ApiModelProperty(value = "") @JsonProperty("anytype_3") public Object getAnytype3() { @@ -413,4 +394,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesIntegerDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesIntegerDto.java index dc77f543a0dd..8e326ff34c11 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesIntegerDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesIntegerDto.java @@ -39,7 +39,6 @@ public AdditionalPropertiesIntegerDto name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -127,4 +126,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesNumberDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesNumberDto.java index b5f4b3cf8d7c..858c1b5aada4 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesNumberDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesNumberDto.java @@ -40,7 +40,6 @@ public AdditionalPropertiesNumberDto name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -128,4 +127,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesObjectDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesObjectDto.java index e95569be4d95..41c4c3282cae 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesObjectDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesObjectDto.java @@ -40,7 +40,6 @@ public AdditionalPropertiesObjectDto name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -128,4 +127,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesStringDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesStringDto.java index 910e6ed492b2..1b7db8b7575e 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesStringDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesStringDto.java @@ -39,7 +39,6 @@ public AdditionalPropertiesStringDto name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -127,4 +126,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AnimalDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AnimalDto.java index 7c2b7dee68ee..d56d4f1723bd 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AnimalDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AnimalDto.java @@ -37,7 +37,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class AnimalDto { - private String className; + private @NotNull String className; private String color = "red"; @@ -61,10 +61,9 @@ public AnimalDto className(String className) { * Get className * @return className */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("className") - public String getClassName() { + public @NotNull String getClassName() { return className; } @@ -81,7 +80,6 @@ public AnimalDto color(String color) { * Get color * @return color */ - @ApiModelProperty(value = "") @JsonProperty("color") public String getColor() { @@ -131,4 +129,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ApiResponseDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ApiResponseDto.java index 26c36701f083..d623c3984d90 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ApiResponseDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ApiResponseDto.java @@ -39,7 +39,6 @@ public ApiResponseDto code(Integer code) { * Get code * @return code */ - @ApiModelProperty(value = "") @JsonProperty("code") public Integer getCode() { @@ -59,7 +58,6 @@ public ApiResponseDto type(String type) { * Get type * @return type */ - @ApiModelProperty(value = "") @JsonProperty("type") public String getType() { @@ -79,7 +77,6 @@ public ApiResponseDto message(String message) { * Get message * @return message */ - @ApiModelProperty(value = "") @JsonProperty("message") public String getMessage() { @@ -131,4 +128,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java index c60064ed2025..c622116cde15 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java @@ -28,7 +28,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnlyDto { - @Valid private List> arrayArrayNumber = new ArrayList<>(); public ArrayOfArrayOfNumberOnlyDto arrayArrayNumber(List> arrayArrayNumber) { @@ -48,7 +47,6 @@ public ArrayOfArrayOfNumberOnlyDto addArrayArrayNumberItem(List arra * Get arrayArrayNumber * @return arrayArrayNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("ArrayArrayNumber") public List> getArrayArrayNumber() { @@ -96,4 +94,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java index eb77bde61967..2558baefef52 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java @@ -28,7 +28,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayOfNumberOnlyDto { - @Valid private List arrayNumber = new ArrayList<>(); public ArrayOfNumberOnlyDto arrayNumber(List arrayNumber) { @@ -48,7 +47,6 @@ public ArrayOfNumberOnlyDto addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("ArrayNumber") public List getArrayNumber() { @@ -96,4 +94,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayTestDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayTestDto.java index 688f3f13d801..87078534bc62 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayTestDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayTestDto.java @@ -28,13 +28,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ArrayTestDto { - @Valid private List arrayOfString = new ArrayList<>(); - @Valid private List> arrayArrayOfInteger = new ArrayList<>(); - @Valid private List> arrayArrayOfModel = new ArrayList<>(); public ArrayTestDto arrayOfString(List arrayOfString) { @@ -54,7 +51,6 @@ public ArrayTestDto addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ - @ApiModelProperty(value = "") @JsonProperty("array_of_string") public List getArrayOfString() { @@ -82,7 +78,6 @@ public ArrayTestDto addArrayArrayOfIntegerItem(List arrayArrayOfIntegerIte * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ - @Valid @ApiModelProperty(value = "") @JsonProperty("array_array_of_integer") public List> getArrayArrayOfInteger() { @@ -93,12 +88,12 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTestDto arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTestDto arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } - public ArrayTestDto addArrayArrayOfModelItem(List<@Valid ReadOnlyFirstDto> arrayArrayOfModelItem) { + public ArrayTestDto addArrayArrayOfModelItem(List arrayArrayOfModelItem) { if (this.arrayArrayOfModel == null) { this.arrayArrayOfModel = new ArrayList<>(); } @@ -110,14 +105,13 @@ public ArrayTestDto addArrayArrayOfModelItem(List<@Valid ReadOnlyFirstDto> array * Get arrayArrayOfModel * @return arrayArrayOfModel */ - @Valid @ApiModelProperty(value = "") @JsonProperty("array_array_of_model") public List> getArrayArrayOfModel() { return arrayArrayOfModel; } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { + public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } @@ -162,4 +156,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCatDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCatDto.java index 56caef306af2..77663f335c46 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCatDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCatDto.java @@ -69,7 +69,7 @@ public static KindEnum fromValue(String value) { } } - private KindEnum kind; + private String kind; public BigCatDto() { super(); @@ -91,10 +91,9 @@ public BigCatDto kind(KindEnum kind) { * Get kind * @return kind */ - @ApiModelProperty(value = "") @JsonProperty("kind") - public KindEnum getKind() { + public String getKind() { return kind; } @@ -156,4 +155,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/CapitalizationDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/CapitalizationDto.java index 1a1e8b106b1f..beaee6c63aa4 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/CapitalizationDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/CapitalizationDto.java @@ -45,7 +45,6 @@ public CapitalizationDto smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ - @ApiModelProperty(value = "") @JsonProperty("smallCamel") public String getSmallCamel() { @@ -65,7 +64,6 @@ public CapitalizationDto capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ - @ApiModelProperty(value = "") @JsonProperty("CapitalCamel") public String getCapitalCamel() { @@ -85,7 +83,6 @@ public CapitalizationDto smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ - @ApiModelProperty(value = "") @JsonProperty("small_Snake") public String getSmallSnake() { @@ -105,7 +102,6 @@ public CapitalizationDto capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ - @ApiModelProperty(value = "") @JsonProperty("Capital_Snake") public String getCapitalSnake() { @@ -125,7 +121,6 @@ public CapitalizationDto scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ - @ApiModelProperty(value = "") @JsonProperty("SCA_ETH_Flow_Points") public String getScAETHFlowPoints() { @@ -145,7 +140,6 @@ public CapitalizationDto ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ - @ApiModelProperty(value = "Name of the pet ") @JsonProperty("ATT_NAME") public String getATTNAME() { @@ -203,4 +197,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/CatDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/CatDto.java index 3c2b2c956912..6b7be14af126 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/CatDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/CatDto.java @@ -58,7 +58,6 @@ public CatDto declawed(Boolean declawed) { * Get declawed * @return declawed */ - @ApiModelProperty(value = "") @JsonProperty("declawed") public Boolean getDeclawed() { @@ -118,4 +117,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/CategoryDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/CategoryDto.java index edbf3f30c854..86617d4546ba 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/CategoryDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/CategoryDto.java @@ -26,7 +26,7 @@ public class CategoryDto { private Long id; - private String name = "default-name"; + private @NotNull String name = "default-name"; public CategoryDto() { super(); @@ -48,7 +48,6 @@ public CategoryDto id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -68,10 +67,9 @@ public CategoryDto name(String name) { * Get name * @return name */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -118,4 +116,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ChildWithNullableDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ChildWithNullableDto.java index 1f6c090a6756..77c49e4dc60d 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ChildWithNullableDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ChildWithNullableDto.java @@ -43,7 +43,6 @@ public ChildWithNullableDto otherProperty(String otherProperty) { * Get otherProperty * @return otherProperty */ - @ApiModelProperty(value = "") @JsonProperty("otherProperty") public String getOtherProperty() { @@ -60,7 +59,7 @@ public ChildWithNullableDto type(TypeEnum type) { return this; } - public ChildWithNullableDto nullableProperty(String nullableProperty) { + public ChildWithNullableDto nullableProperty(JsonNullable nullableProperty) { super.nullableProperty(nullableProperty); return this; } @@ -114,4 +113,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ClassModelDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ClassModelDto.java index 46249adacbec..dd69f8cd36cd 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ClassModelDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ClassModelDto.java @@ -36,7 +36,6 @@ public ClassModelDto propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @ApiModelProperty(value = "") @JsonProperty("_class") public String getPropertyClass() { @@ -84,4 +83,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ClientDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ClientDto.java index 95af8d83fbbc..3a03dc7a1c4a 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ClientDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ClientDto.java @@ -35,7 +35,6 @@ public ClientDto client(String client) { * Get client * @return client */ - @ApiModelProperty(value = "") @JsonProperty("client") public String getClient() { @@ -83,4 +82,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java index 88cb70b08ae2..de6d9a4ef66d 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java @@ -29,17 +29,13 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class ContainerDefaultValueDto { - @Valid - private JsonNullable> nullableArray = JsonNullable.>undefined(); + private JsonNullable> nullableArray = JsonNullable.undefined(); - @Valid - private JsonNullable> nullableRequiredArray = JsonNullable.>undefined(); + private JsonNullable> nullableRequiredArray = JsonNullable.undefined(); - @Valid - private List requiredArray = new ArrayList<>(); + private @NotNull List requiredArray = new ArrayList<>(); - @Valid - private JsonNullable> nullableArrayWithDefault = JsonNullable.>undefined(); + private JsonNullable> nullableArrayWithDefault = JsonNullable.of(new ArrayList<>(Arrays.asList("foo", "bar"))); public ContainerDefaultValueDto() { super(); @@ -48,13 +44,13 @@ public ContainerDefaultValueDto() { /** * Constructor with only required parameters */ - public ContainerDefaultValueDto(List nullableRequiredArray, List requiredArray) { - this.nullableRequiredArray = JsonNullable.of(nullableRequiredArray); + public ContainerDefaultValueDto(JsonNullable> nullableRequiredArray, List requiredArray) { + this.nullableRequiredArray = nullableRequiredArray; this.requiredArray = requiredArray; } - public ContainerDefaultValueDto nullableArray(List nullableArray) { - this.nullableArray = JsonNullable.of(nullableArray); + public ContainerDefaultValueDto nullableArray(JsonNullable> nullableArray) { + this.nullableArray = nullableArray; return this; } @@ -70,7 +66,6 @@ public ContainerDefaultValueDto addNullableArrayItem(String nullableArrayItem) { * Get nullableArray * @return nullableArray */ - @ApiModelProperty(value = "") @JsonProperty("nullable_array") public JsonNullable> getNullableArray() { @@ -81,8 +76,8 @@ public void setNullableArray(JsonNullable> nullableArray) { this.nullableArray = nullableArray; } - public ContainerDefaultValueDto nullableRequiredArray(List nullableRequiredArray) { - this.nullableRequiredArray = JsonNullable.of(nullableRequiredArray); + public ContainerDefaultValueDto nullableRequiredArray(JsonNullable> nullableRequiredArray) { + this.nullableRequiredArray = nullableRequiredArray; return this; } @@ -98,7 +93,6 @@ public ContainerDefaultValueDto addNullableRequiredArrayItem(String nullableRequ * Get nullableRequiredArray * @return nullableRequiredArray */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("nullable_required_array") public JsonNullable> getNullableRequiredArray() { @@ -126,10 +120,9 @@ public ContainerDefaultValueDto addRequiredArrayItem(String requiredArrayItem) { * Get requiredArray * @return requiredArray */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("required_array") - public List getRequiredArray() { + public @NotNull List getRequiredArray() { return requiredArray; } @@ -137,8 +130,8 @@ public void setRequiredArray(List requiredArray) { this.requiredArray = requiredArray; } - public ContainerDefaultValueDto nullableArrayWithDefault(List nullableArrayWithDefault) { - this.nullableArrayWithDefault = JsonNullable.of(nullableArrayWithDefault); + public ContainerDefaultValueDto nullableArrayWithDefault(JsonNullable> nullableArrayWithDefault) { + this.nullableArrayWithDefault = nullableArrayWithDefault; return this; } @@ -154,7 +147,6 @@ public ContainerDefaultValueDto addNullableArrayWithDefaultItem(String nullableA * Get nullableArrayWithDefault * @return nullableArrayWithDefault */ - @ApiModelProperty(value = "") @JsonProperty("nullable_array_with_default") public JsonNullable> getNullableArrayWithDefault() { @@ -219,4 +211,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/DogDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/DogDto.java index 441e219314e1..6e0a57164e65 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/DogDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/DogDto.java @@ -51,7 +51,6 @@ public DogDto breed(String breed) { * Get breed * @return breed */ - @ApiModelProperty(value = "") @JsonProperty("breed") public String getBreed() { @@ -111,4 +110,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumArraysDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumArraysDto.java index abfcc16b84df..4ad22df4a55b 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumArraysDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumArraysDto.java @@ -63,7 +63,7 @@ public static JustSymbolEnum fromValue(String value) { } } - private JustSymbolEnum justSymbol; + private String justSymbol; /** * Gets or Sets arrayEnum @@ -100,8 +100,7 @@ public static ArrayEnumEnum fromValue(String value) { } } - @Valid - private List arrayEnum = new ArrayList<>(); + private List arrayEnum = new ArrayList<>(); public EnumArraysDto justSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; @@ -112,10 +111,9 @@ public EnumArraysDto justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ - @ApiModelProperty(value = "") @JsonProperty("just_symbol") - public JustSymbolEnum getJustSymbol() { + public String getJustSymbol() { return justSymbol; } @@ -140,10 +138,9 @@ public EnumArraysDto addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ - @ApiModelProperty(value = "") @JsonProperty("array_enum") - public List getArrayEnum() { + public List getArrayEnum() { return arrayEnum; } @@ -190,4 +187,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumTestDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumTestDto.java index 0e704e8cb0dc..3fa644ecccc2 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumTestDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumTestDto.java @@ -63,7 +63,7 @@ public static EnumStringEnum fromValue(String value) { } } - private EnumStringEnum enumString; + private String enumString; /** * Gets or Sets enumStringRequired @@ -102,7 +102,7 @@ public static EnumStringRequiredEnum fromValue(String value) { } } - private EnumStringRequiredEnum enumStringRequired; + private @NotNull String enumStringRequired; /** * Gets or Sets enumInteger @@ -139,7 +139,7 @@ public static EnumIntegerEnum fromValue(Integer value) { } } - private EnumIntegerEnum enumInteger; + private Integer enumInteger; /** * Gets or Sets enumNumber @@ -176,7 +176,7 @@ public static EnumNumberEnum fromValue(Double value) { } } - private EnumNumberEnum enumNumber; + private Double enumNumber; private OuterEnumDto outerEnum; @@ -200,10 +200,9 @@ public EnumTestDto enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ - @ApiModelProperty(value = "") @JsonProperty("enum_string") - public EnumStringEnum getEnumString() { + public String getEnumString() { return enumString; } @@ -220,10 +219,9 @@ public EnumTestDto enumStringRequired(EnumStringRequiredEnum enumStringRequired) * Get enumStringRequired * @return enumStringRequired */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("enum_string_required") - public EnumStringRequiredEnum getEnumStringRequired() { + public @NotNull String getEnumStringRequired() { return enumStringRequired; } @@ -240,10 +238,9 @@ public EnumTestDto enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ - @ApiModelProperty(value = "") @JsonProperty("enum_integer") - public EnumIntegerEnum getEnumInteger() { + public Integer getEnumInteger() { return enumInteger; } @@ -260,10 +257,9 @@ public EnumTestDto enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ - @ApiModelProperty(value = "") @JsonProperty("enum_number") - public EnumNumberEnum getEnumNumber() { + public Double getEnumNumber() { return enumNumber; } @@ -280,7 +276,6 @@ public EnumTestDto outerEnum(OuterEnumDto outerEnum) { * Get outerEnum * @return outerEnum */ - @Valid @ApiModelProperty(value = "") @JsonProperty("outerEnum") public OuterEnumDto getOuterEnum() { @@ -336,4 +331,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FileDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FileDto.java index daf9d353a7e7..83d0d34258fa 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FileDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FileDto.java @@ -36,7 +36,6 @@ public FileDto sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ - @ApiModelProperty(value = "Test capitalization") @JsonProperty("sourceURI") public String getSourceURI() { @@ -84,4 +83,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java index 1d793740a83f..623b052807ce 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java @@ -28,9 +28,8 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class FileSchemaTestClassDto { - private FileDto file; + private @Valid FileDto file; - @Valid private List<@Valid FileDto> files = new ArrayList<>(); public FileSchemaTestClassDto file(FileDto file) { @@ -42,10 +41,9 @@ public FileSchemaTestClassDto file(FileDto file) { * Get file * @return file */ - @Valid @ApiModelProperty(value = "") @JsonProperty("file") - public FileDto getFile() { + public @Valid FileDto getFile() { return file; } @@ -53,7 +51,7 @@ public void setFile(FileDto file) { this.file = file; } - public FileSchemaTestClassDto files(List<@Valid FileDto> files) { + public FileSchemaTestClassDto files(List files) { this.files = files; return this; } @@ -70,14 +68,13 @@ public FileSchemaTestClassDto addFilesItem(FileDto filesItem) { * Get files * @return files */ - @Valid @ApiModelProperty(value = "") @JsonProperty("files") public List<@Valid FileDto> getFiles() { return files; } - public void setFiles(List<@Valid FileDto> files) { + public void setFiles(List files) { this.files = files; } @@ -120,4 +117,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FormatTestDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FormatTestDto.java index f33ef0471437..6a6e878a3340 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FormatTestDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FormatTestDto.java @@ -30,33 +30,33 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class FormatTestDto { - private Integer integer; + private @Min(10) @Max(100) Integer integer; - private Integer int32; + private @Min(20) @Max(200) Integer int32; private Long int64; - private BigDecimal number; + private @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal number; - private Float _float; + private @DecimalMin("54.3") @DecimalMax("987.6") Float _float; - private Double _double; + private @DecimalMin("67.8") @DecimalMax("123.4") Double _double; - private String string; + private @Pattern(regexp = "/[a-z]/i") String string; - private byte[] _byte; + private @NotNull byte[] _byte; private org.springframework.core.io.Resource binary; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) - private LocalDate date; + private @NotNull LocalDate date; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; private UUID uuid; - private String password; + private @NotNull @Size(min = 10, max = 64) String password; private BigDecimal bigDecimal; @@ -85,10 +85,9 @@ public FormatTestDto integer(Integer integer) { * maximum: 100 * @return integer */ - @Min(10) @Max(100) @ApiModelProperty(value = "") @JsonProperty("integer") - public Integer getInteger() { + public @Min(10) @Max(100) Integer getInteger() { return integer; } @@ -107,10 +106,9 @@ public FormatTestDto int32(Integer int32) { * maximum: 200 * @return int32 */ - @Min(20) @Max(200) @ApiModelProperty(value = "") @JsonProperty("int32") - public Integer getInt32() { + public @Min(20) @Max(200) Integer getInt32() { return int32; } @@ -127,7 +125,6 @@ public FormatTestDto int64(Long int64) { * Get int64 * @return int64 */ - @ApiModelProperty(value = "") @JsonProperty("int64") public Long getInt64() { @@ -149,10 +146,9 @@ public FormatTestDto number(BigDecimal number) { * maximum: 543.2 * @return number */ - @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(required = true, value = "") @JsonProperty("number") - public BigDecimal getNumber() { + public @NotNull @DecimalMin("32.1") @DecimalMax("543.2") BigDecimal getNumber() { return number; } @@ -171,10 +167,9 @@ public FormatTestDto _float(Float _float) { * maximum: 987.6 * @return _float */ - @DecimalMin("54.3") @DecimalMax("987.6") @ApiModelProperty(value = "") @JsonProperty("float") - public Float getFloat() { + public @DecimalMin("54.3") @DecimalMax("987.6") Float getFloat() { return _float; } @@ -193,10 +188,9 @@ public FormatTestDto _double(Double _double) { * maximum: 123.4 * @return _double */ - @DecimalMin("67.8") @DecimalMax("123.4") @ApiModelProperty(value = "") @JsonProperty("double") - public Double getDouble() { + public @DecimalMin("67.8") @DecimalMax("123.4") Double getDouble() { return _double; } @@ -213,10 +207,9 @@ public FormatTestDto string(String string) { * Get string * @return string */ - @Pattern(regexp = "/[a-z]/i") @ApiModelProperty(value = "") @JsonProperty("string") - public String getString() { + public @Pattern(regexp = "/[a-z]/i") String getString() { return string; } @@ -233,10 +226,9 @@ public FormatTestDto _byte(byte[] _byte) { * Get _byte * @return _byte */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("byte") - public byte[] getByte() { + public @NotNull byte[] getByte() { return _byte; } @@ -253,7 +245,6 @@ public FormatTestDto binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ - @Valid @ApiModelProperty(value = "") @JsonProperty("binary") public org.springframework.core.io.Resource getBinary() { @@ -273,10 +264,9 @@ public FormatTestDto date(LocalDate date) { * Get date * @return date */ - @NotNull @Valid @ApiModelProperty(required = true, value = "") @JsonProperty("date") - public LocalDate getDate() { + public @NotNull LocalDate getDate() { return date; } @@ -293,7 +283,6 @@ public FormatTestDto dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ - @Valid @ApiModelProperty(value = "") @JsonProperty("dateTime") public OffsetDateTime getDateTime() { @@ -313,7 +302,6 @@ public FormatTestDto uuid(UUID uuid) { * Get uuid * @return uuid */ - @Valid @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") @JsonProperty("uuid") public UUID getUuid() { @@ -333,10 +321,9 @@ public FormatTestDto password(String password) { * Get password * @return password */ - @NotNull @Size(min = 10, max = 64) @ApiModelProperty(required = true, value = "") @JsonProperty("password") - public String getPassword() { + public @NotNull @Size(min = 10, max = 64) String getPassword() { return password; } @@ -353,7 +340,6 @@ public FormatTestDto bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ - @Valid @ApiModelProperty(value = "") @JsonProperty("BigDecimal") public BigDecimal getBigDecimal() { @@ -427,4 +413,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/HasOnlyReadOnlyDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/HasOnlyReadOnlyDto.java index db8fc8dddbe8..7b22da057491 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/HasOnlyReadOnlyDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/HasOnlyReadOnlyDto.java @@ -37,7 +37,6 @@ public HasOnlyReadOnlyDto bar(String bar) { * Get bar * @return bar */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("bar") public String getBar() { @@ -57,7 +56,6 @@ public HasOnlyReadOnlyDto foo(String foo) { * Get foo * @return foo */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("foo") public String getFoo() { @@ -107,4 +105,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ListDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ListDto.java index 4095b77f745b..a428a4257e09 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ListDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ListDto.java @@ -35,7 +35,6 @@ public ListDto _123List(String _123List) { * Get _123List * @return _123List */ - @ApiModelProperty(value = "") @JsonProperty("123-list") public String get123List() { @@ -83,4 +82,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MapTestDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MapTestDto.java index d096c18a3aae..abfa759e4293 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MapTestDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MapTestDto.java @@ -27,7 +27,6 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class MapTestDto { - @Valid private Map> mapMapOfString = new HashMap<>(); /** @@ -65,13 +64,10 @@ public static InnerEnum fromValue(String value) { } } - @Valid - private Map mapOfEnumString = new HashMap<>(); + private Map mapOfEnumString = new HashMap<>(); - @Valid private Map directMap = new HashMap<>(); - @Valid private Map indirectMap = new HashMap<>(); public MapTestDto mapMapOfString(Map> mapMapOfString) { @@ -91,7 +87,6 @@ public MapTestDto putMapMapOfStringItem(String key, Map mapMapOf * Get mapMapOfString * @return mapMapOfString */ - @Valid @ApiModelProperty(value = "") @JsonProperty("map_map_of_string") public Map> getMapMapOfString() { @@ -119,10 +114,9 @@ public MapTestDto putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringIt * Get mapOfEnumString * @return mapOfEnumString */ - @ApiModelProperty(value = "") @JsonProperty("map_of_enum_string") - public Map getMapOfEnumString() { + public Map getMapOfEnumString() { return mapOfEnumString; } @@ -147,7 +141,6 @@ public MapTestDto putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ - @ApiModelProperty(value = "") @JsonProperty("direct_map") public Map getDirectMap() { @@ -175,7 +168,6 @@ public MapTestDto putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ - @ApiModelProperty(value = "") @JsonProperty("indirect_map") public Map getIndirectMap() { @@ -229,4 +221,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java index d376e404f29d..b279fd91faf0 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java @@ -35,8 +35,7 @@ public class MixedPropertiesAndAdditionalPropertiesClassDto { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; - @Valid - private Map map = new HashMap<>(); + private Map map = new HashMap<>(); public MixedPropertiesAndAdditionalPropertiesClassDto uuid(UUID uuid) { this.uuid = uuid; @@ -47,7 +46,6 @@ public MixedPropertiesAndAdditionalPropertiesClassDto uuid(UUID uuid) { * Get uuid * @return uuid */ - @Valid @ApiModelProperty(value = "") @JsonProperty("uuid") public UUID getUuid() { @@ -67,7 +65,6 @@ public MixedPropertiesAndAdditionalPropertiesClassDto dateTime(OffsetDateTime da * Get dateTime * @return dateTime */ - @Valid @ApiModelProperty(value = "") @JsonProperty("dateTime") public OffsetDateTime getDateTime() { @@ -95,10 +92,9 @@ public MixedPropertiesAndAdditionalPropertiesClassDto putMapItem(String key, Ani * Get map * @return map */ - @Valid @ApiModelProperty(value = "") @JsonProperty("map") - public Map getMap() { + public Map getMap() { return map; } @@ -147,4 +143,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Model200ResponseDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Model200ResponseDto.java index 5a482f6151a1..aba76abe3841 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Model200ResponseDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Model200ResponseDto.java @@ -38,7 +38,6 @@ public Model200ResponseDto name(Integer name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public Integer getName() { @@ -58,7 +57,6 @@ public Model200ResponseDto propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @ApiModelProperty(value = "") @JsonProperty("class") public String getPropertyClass() { @@ -108,4 +106,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/NameDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/NameDto.java index 3d6dad0594cf..e67b0b8d9267 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/NameDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/NameDto.java @@ -25,7 +25,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class NameDto { - private Integer name; + private @NotNull Integer name; private Integer snakeCase; @@ -53,10 +53,9 @@ public NameDto name(Integer name) { * Get name * @return name */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("name") - public Integer getName() { + public @NotNull Integer getName() { return name; } @@ -73,7 +72,6 @@ public NameDto snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("snake_case") public Integer getSnakeCase() { @@ -93,7 +91,6 @@ public NameDto property(String property) { * Get property * @return property */ - @ApiModelProperty(value = "") @JsonProperty("property") public String getProperty() { @@ -113,7 +110,6 @@ public NameDto _123Number(Integer _123Number) { * Get _123Number * @return _123Number */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("123Number") public Integer get123Number() { @@ -167,4 +163,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/NullableMapPropertyDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/NullableMapPropertyDto.java index b5f75e6ab1ed..354914c2b3e9 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/NullableMapPropertyDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/NullableMapPropertyDto.java @@ -29,11 +29,10 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class NullableMapPropertyDto { - @Valid - private JsonNullable> languageValues = JsonNullable.>undefined(); + private JsonNullable> languageValues = JsonNullable.undefined(); - public NullableMapPropertyDto languageValues(Map languageValues) { - this.languageValues = JsonNullable.of(languageValues); + public NullableMapPropertyDto languageValues(JsonNullable> languageValues) { + this.languageValues = languageValues; return this; } @@ -49,7 +48,6 @@ public NullableMapPropertyDto putLanguageValuesItem(String key, String languageV * Get languageValues * @return languageValues */ - @ApiModelProperty(value = "") @JsonProperty("languageValues") public JsonNullable> getLanguageValues() { @@ -108,4 +106,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/NumberOnlyDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/NumberOnlyDto.java index badbed02ae24..42634d73cd0a 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/NumberOnlyDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/NumberOnlyDto.java @@ -36,7 +36,6 @@ public NumberOnlyDto justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("JustNumber") public BigDecimal getJustNumber() { @@ -84,4 +83,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OrderDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OrderDto.java index 4618540f761e..a4f5112bdc9f 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OrderDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OrderDto.java @@ -73,7 +73,7 @@ public static StatusEnum fromValue(String value) { } } - private StatusEnum status; + private String status; private Boolean complete = false; @@ -86,7 +86,6 @@ public OrderDto id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -106,7 +105,6 @@ public OrderDto petId(Long petId) { * Get petId * @return petId */ - @ApiModelProperty(value = "") @JsonProperty("petId") public Long getPetId() { @@ -126,7 +124,6 @@ public OrderDto quantity(Integer quantity) { * Get quantity * @return quantity */ - @ApiModelProperty(value = "") @JsonProperty("quantity") public Integer getQuantity() { @@ -146,7 +143,6 @@ public OrderDto shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Valid @ApiModelProperty(value = "") @JsonProperty("shipDate") public OffsetDateTime getShipDate() { @@ -166,10 +162,9 @@ public OrderDto status(StatusEnum status) { * Order Status * @return status */ - @ApiModelProperty(value = "Order Status") @JsonProperty("status") - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -186,7 +181,6 @@ public OrderDto complete(Boolean complete) { * Get complete * @return complete */ - @ApiModelProperty(value = "") @JsonProperty("complete") public Boolean getComplete() { @@ -244,4 +238,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterCompositeDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterCompositeDto.java index 3859cecdfc1e..8dfb9a25b74d 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterCompositeDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterCompositeDto.java @@ -40,7 +40,6 @@ public OuterCompositeDto myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ - @Valid @ApiModelProperty(value = "") @JsonProperty("my_number") public BigDecimal getMyNumber() { @@ -60,7 +59,6 @@ public OuterCompositeDto myString(String myString) { * Get myString * @return myString */ - @ApiModelProperty(value = "") @JsonProperty("my_string") public String getMyString() { @@ -80,7 +78,6 @@ public OuterCompositeDto myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ - @ApiModelProperty(value = "") @JsonProperty("my_boolean") public Boolean getMyBoolean() { @@ -132,4 +129,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ParentWithNullableDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ParentWithNullableDto.java index 46fb7779621c..f1fedd6b1fdf 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ParentWithNullableDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ParentWithNullableDto.java @@ -72,9 +72,9 @@ public static TypeEnum fromValue(String value) { } } - private TypeEnum type; + private String type; - private JsonNullable nullableProperty = JsonNullable.undefined(); + private JsonNullable nullableProperty = JsonNullable.undefined(); public ParentWithNullableDto type(TypeEnum type) { this.type = type; @@ -85,10 +85,9 @@ public ParentWithNullableDto type(TypeEnum type) { * Get type * @return type */ - @ApiModelProperty(value = "") @JsonProperty("type") - public TypeEnum getType() { + public String getType() { return type; } @@ -96,8 +95,8 @@ public void setType(TypeEnum type) { this.type = type; } - public ParentWithNullableDto nullableProperty(String nullableProperty) { - this.nullableProperty = JsonNullable.of(nullableProperty); + public ParentWithNullableDto nullableProperty(JsonNullable nullableProperty) { + this.nullableProperty = nullableProperty; return this; } @@ -105,7 +104,6 @@ public ParentWithNullableDto nullableProperty(String nullableProperty) { * Get nullableProperty * @return nullableProperty */ - @ApiModelProperty(value = "") @JsonProperty("nullableProperty") public JsonNullable getNullableProperty() { @@ -166,4 +164,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/PetDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/PetDto.java index 9b24a4f6e9bb..c42c30afcc46 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/PetDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/PetDto.java @@ -35,14 +35,12 @@ public class PetDto { private Long id; - private CategoryDto category; + private @Valid CategoryDto category; - private String name; + private @NotNull String name; - @Valid - private Set photoUrls = new LinkedHashSet<>(); + private @NotNull Set photoUrls = new LinkedHashSet<>(); - @Valid private List<@Valid TagDto> tags = new ArrayList<>(); /** @@ -83,7 +81,7 @@ public static StatusEnum fromValue(String value) { } @Deprecated - private StatusEnum status; + private String status; public PetDto() { super(); @@ -106,7 +104,6 @@ public PetDto id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -126,10 +123,9 @@ public PetDto category(CategoryDto category) { * Get category * @return category */ - @Valid @ApiModelProperty(value = "") @JsonProperty("category") - public CategoryDto getCategory() { + public @Valid CategoryDto getCategory() { return category; } @@ -146,10 +142,9 @@ public PetDto name(String name) { * Get name * @return name */ - @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") @JsonProperty("name") - public String getName() { + public @NotNull String getName() { return name; } @@ -174,10 +169,9 @@ public PetDto addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("photoUrls") - public Set getPhotoUrls() { + public @NotNull Set getPhotoUrls() { return photoUrls; } @@ -186,7 +180,7 @@ public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } - public PetDto tags(List<@Valid TagDto> tags) { + public PetDto tags(List tags) { this.tags = tags; return this; } @@ -203,14 +197,13 @@ public PetDto addTagsItem(TagDto tagsItem) { * Get tags * @return tags */ - @Valid @ApiModelProperty(value = "") @JsonProperty("tags") public List<@Valid TagDto> getTags() { return tags; } - public void setTags(List<@Valid TagDto> tags) { + public void setTags(List tags) { this.tags = tags; } @@ -224,11 +217,10 @@ public PetDto status(StatusEnum status) { * @return status * @deprecated */ - @ApiModelProperty(value = "pet status in the store") @JsonProperty("status") @Deprecated - public StatusEnum getStatus() { + public String getStatus() { return status; } @@ -287,4 +279,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ReadOnlyFirstDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ReadOnlyFirstDto.java index dc2a14176ac8..368c093a51f4 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ReadOnlyFirstDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ReadOnlyFirstDto.java @@ -37,7 +37,6 @@ public ReadOnlyFirstDto bar(String bar) { * Get bar * @return bar */ - @ApiModelProperty(readOnly = true, value = "") @JsonProperty("bar") public String getBar() { @@ -57,7 +56,6 @@ public ReadOnlyFirstDto baz(String baz) { * Get baz * @return baz */ - @ApiModelProperty(value = "") @JsonProperty("baz") public String getBaz() { @@ -107,4 +105,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNamesDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNamesDto.java index b6e5347c29af..1fae26326c3f 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNamesDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNamesDto.java @@ -41,7 +41,6 @@ public ResponseObjectWithDifferentFieldNamesDto normalPropertyName(String normal * Get normalPropertyName * @return normalPropertyName */ - @ApiModelProperty(value = "") @JsonProperty("normalPropertyName") public String getNormalPropertyName() { @@ -61,7 +60,6 @@ public ResponseObjectWithDifferentFieldNamesDto UPPER_CASE_PROPERTY_SNAKE(String * Get UPPER_CASE_PROPERTY_SNAKE * @return UPPER_CASE_PROPERTY_SNAKE */ - @ApiModelProperty(value = "") @JsonProperty("UPPER_CASE_PROPERTY_SNAKE") public String getUPPERCASEPROPERTYSNAKE() { @@ -81,7 +79,6 @@ public ResponseObjectWithDifferentFieldNamesDto lowerCasePropertyDashes(String l * Get lowerCasePropertyDashes * @return lowerCasePropertyDashes */ - @ApiModelProperty(value = "") @JsonProperty("lower-case-property-dashes") public String getLowerCasePropertyDashes() { @@ -101,7 +98,6 @@ public ResponseObjectWithDifferentFieldNamesDto propertyNameWithSpaces(String pr * Get propertyNameWithSpaces * @return propertyNameWithSpaces */ - @ApiModelProperty(value = "") @JsonProperty("property name with spaces") public String getPropertyNameWithSpaces() { @@ -155,4 +151,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ReturnDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ReturnDto.java index 98dd6a1e0ea4..430052516fff 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ReturnDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ReturnDto.java @@ -36,7 +36,6 @@ public ReturnDto _return(Integer _return) { * Get _return * @return _return */ - @ApiModelProperty(value = "") @JsonProperty("return") public Integer getReturn() { @@ -84,4 +83,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/SpecialModelNameDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/SpecialModelNameDto.java index 97e081a1d0dc..4887649b992d 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/SpecialModelNameDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/SpecialModelNameDto.java @@ -35,7 +35,6 @@ public class SpecialModelNameDto { * Get $SpecialPropertyName * @return $SpecialPropertyName */ - @ApiModelProperty(value = "") @JsonProperty("$special[property.name]") public Long get$SpecialPropertyName() { @@ -83,4 +82,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TagDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TagDto.java index 88580cc43881..c5f23ef17d5d 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TagDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TagDto.java @@ -37,7 +37,6 @@ public TagDto id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -57,7 +56,6 @@ public TagDto name(String name) { * Get name * @return name */ - @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { @@ -107,4 +105,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java index 49a6e0799da9..eca346050954 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java @@ -28,16 +28,15 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class TypeHolderDefaultDto { - private String stringItem = "what"; + private @NotNull String stringItem = "what"; - private BigDecimal numberItem = new BigDecimal("1.234"); + private @NotNull BigDecimal numberItem = new BigDecimal("1.234"); - private Integer integerItem = -2; + private @NotNull Integer integerItem = -2; - private Boolean boolItem = true; + private @NotNull Boolean boolItem = true; - @Valid - private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); + private @NotNull List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); public TypeHolderDefaultDto() { super(); @@ -63,10 +62,9 @@ public TypeHolderDefaultDto stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("string_item") - public String getStringItem() { + public @NotNull String getStringItem() { return stringItem; } @@ -83,10 +81,9 @@ public TypeHolderDefaultDto numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @NotNull @Valid @ApiModelProperty(required = true, value = "") @JsonProperty("number_item") - public BigDecimal getNumberItem() { + public @NotNull BigDecimal getNumberItem() { return numberItem; } @@ -103,10 +100,9 @@ public TypeHolderDefaultDto integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("integer_item") - public Integer getIntegerItem() { + public @NotNull Integer getIntegerItem() { return integerItem; } @@ -123,10 +119,9 @@ public TypeHolderDefaultDto boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("bool_item") - public Boolean getBoolItem() { + public @NotNull Boolean getBoolItem() { return boolItem; } @@ -151,10 +146,9 @@ public TypeHolderDefaultDto addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @NotNull @ApiModelProperty(required = true, value = "") @JsonProperty("array_item") - public List getArrayItem() { + public @NotNull List getArrayItem() { return arrayItem; } @@ -207,4 +201,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderExampleDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderExampleDto.java index 3a2de289519c..68069248b967 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderExampleDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderExampleDto.java @@ -28,18 +28,17 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.9.0-SNAPSHOT") public class TypeHolderExampleDto { - private String stringItem; + private @NotNull String stringItem; - private BigDecimal numberItem; + private @NotNull BigDecimal numberItem; - private Float floatItem; + private @NotNull Float floatItem; - private Integer integerItem; + private @NotNull Integer integerItem; - private Boolean boolItem; + private @NotNull Boolean boolItem; - @Valid - private List arrayItem = new ArrayList<>(); + private @NotNull List arrayItem = new ArrayList<>(); public TypeHolderExampleDto() { super(); @@ -66,10 +65,9 @@ public TypeHolderExampleDto stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @NotNull @ApiModelProperty(example = "what", required = true, value = "") @JsonProperty("string_item") - public String getStringItem() { + public @NotNull String getStringItem() { return stringItem; } @@ -86,10 +84,9 @@ public TypeHolderExampleDto numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @NotNull @Valid @ApiModelProperty(example = "1.234", required = true, value = "") @JsonProperty("number_item") - public BigDecimal getNumberItem() { + public @NotNull BigDecimal getNumberItem() { return numberItem; } @@ -106,10 +103,9 @@ public TypeHolderExampleDto floatItem(Float floatItem) { * Get floatItem * @return floatItem */ - @NotNull @ApiModelProperty(example = "1.234", required = true, value = "") @JsonProperty("float_item") - public Float getFloatItem() { + public @NotNull Float getFloatItem() { return floatItem; } @@ -126,10 +122,9 @@ public TypeHolderExampleDto integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @NotNull @ApiModelProperty(example = "-2", required = true, value = "") @JsonProperty("integer_item") - public Integer getIntegerItem() { + public @NotNull Integer getIntegerItem() { return integerItem; } @@ -146,10 +141,9 @@ public TypeHolderExampleDto boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @NotNull @ApiModelProperty(example = "true", required = true, value = "") @JsonProperty("bool_item") - public Boolean getBoolItem() { + public @NotNull Boolean getBoolItem() { return boolItem; } @@ -174,10 +168,9 @@ public TypeHolderExampleDto addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @NotNull @ApiModelProperty(example = "[0,1,2,3]", required = true, value = "") @JsonProperty("array_item") - public List getArrayItem() { + public @NotNull List getArrayItem() { return arrayItem; } @@ -232,4 +225,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/UserDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/UserDto.java index e05d915a280b..5ea8019b2e05 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/UserDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/UserDto.java @@ -49,7 +49,6 @@ public UserDto id(Long id) { * Get id * @return id */ - @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { @@ -69,7 +68,6 @@ public UserDto username(String username) { * Get username * @return username */ - @ApiModelProperty(value = "") @JsonProperty("username") public String getUsername() { @@ -89,7 +87,6 @@ public UserDto firstName(String firstName) { * Get firstName * @return firstName */ - @ApiModelProperty(value = "") @JsonProperty("firstName") public String getFirstName() { @@ -109,7 +106,6 @@ public UserDto lastName(String lastName) { * Get lastName * @return lastName */ - @ApiModelProperty(value = "") @JsonProperty("lastName") public String getLastName() { @@ -129,7 +125,6 @@ public UserDto email(String email) { * Get email * @return email */ - @ApiModelProperty(value = "") @JsonProperty("email") public String getEmail() { @@ -149,7 +144,6 @@ public UserDto password(String password) { * Get password * @return password */ - @ApiModelProperty(value = "") @JsonProperty("password") public String getPassword() { @@ -169,7 +163,6 @@ public UserDto phone(String phone) { * Get phone * @return phone */ - @ApiModelProperty(value = "") @JsonProperty("phone") public String getPhone() { @@ -189,7 +182,6 @@ public UserDto userStatus(Integer userStatus) { * User Status * @return userStatus */ - @ApiModelProperty(value = "User Status") @JsonProperty("userStatus") public Integer getUserStatus() { @@ -251,4 +243,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/XmlItemDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/XmlItemDto.java index 16cf5e0c6013..eaa35a198913 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/XmlItemDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/XmlItemDto.java @@ -36,7 +36,6 @@ public class XmlItemDto { private Boolean attributeBoolean; - @Valid private List wrappedArray = new ArrayList<>(); private String nameString; @@ -47,10 +46,8 @@ public class XmlItemDto { private Boolean nameBoolean; - @Valid private List nameArray = new ArrayList<>(); - @Valid private List nameWrappedArray = new ArrayList<>(); private String prefixString; @@ -61,10 +58,8 @@ public class XmlItemDto { private Boolean prefixBoolean; - @Valid private List prefixArray = new ArrayList<>(); - @Valid private List prefixWrappedArray = new ArrayList<>(); private String namespaceString; @@ -75,10 +70,8 @@ public class XmlItemDto { private Boolean namespaceBoolean; - @Valid private List namespaceArray = new ArrayList<>(); - @Valid private List namespaceWrappedArray = new ArrayList<>(); private String prefixNsString; @@ -89,10 +82,8 @@ public class XmlItemDto { private Boolean prefixNsBoolean; - @Valid private List prefixNsArray = new ArrayList<>(); - @Valid private List prefixNsWrappedArray = new ArrayList<>(); public XmlItemDto attributeString(String attributeString) { @@ -104,7 +95,6 @@ public XmlItemDto attributeString(String attributeString) { * Get attributeString * @return attributeString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("attribute_string") public String getAttributeString() { @@ -124,7 +114,6 @@ public XmlItemDto attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("attribute_number") public BigDecimal getAttributeNumber() { @@ -144,7 +133,6 @@ public XmlItemDto attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("attribute_integer") public Integer getAttributeInteger() { @@ -164,7 +152,6 @@ public XmlItemDto attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("attribute_boolean") public Boolean getAttributeBoolean() { @@ -192,7 +179,6 @@ public XmlItemDto addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("wrapped_array") public List getWrappedArray() { @@ -212,7 +198,6 @@ public XmlItemDto nameString(String nameString) { * Get nameString * @return nameString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("name_string") public String getNameString() { @@ -232,7 +217,6 @@ public XmlItemDto nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("name_number") public BigDecimal getNameNumber() { @@ -252,7 +236,6 @@ public XmlItemDto nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("name_integer") public Integer getNameInteger() { @@ -272,7 +255,6 @@ public XmlItemDto nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("name_boolean") public Boolean getNameBoolean() { @@ -300,7 +282,6 @@ public XmlItemDto addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ - @ApiModelProperty(value = "") @JsonProperty("name_array") public List getNameArray() { @@ -328,7 +309,6 @@ public XmlItemDto addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("name_wrapped_array") public List getNameWrappedArray() { @@ -348,7 +328,6 @@ public XmlItemDto prefixString(String prefixString) { * Get prefixString * @return prefixString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("prefix_string") public String getPrefixString() { @@ -368,7 +347,6 @@ public XmlItemDto prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("prefix_number") public BigDecimal getPrefixNumber() { @@ -388,7 +366,6 @@ public XmlItemDto prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_integer") public Integer getPrefixInteger() { @@ -408,7 +385,6 @@ public XmlItemDto prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("prefix_boolean") public Boolean getPrefixBoolean() { @@ -436,7 +412,6 @@ public XmlItemDto addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_array") public List getPrefixArray() { @@ -464,7 +439,6 @@ public XmlItemDto addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_wrapped_array") public List getPrefixWrappedArray() { @@ -484,7 +458,6 @@ public XmlItemDto namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("namespace_string") public String getNamespaceString() { @@ -504,7 +477,6 @@ public XmlItemDto namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("namespace_number") public BigDecimal getNamespaceNumber() { @@ -524,7 +496,6 @@ public XmlItemDto namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { @@ -544,7 +515,6 @@ public XmlItemDto namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("namespace_boolean") public Boolean getNamespaceBoolean() { @@ -572,7 +542,6 @@ public XmlItemDto addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ - @ApiModelProperty(value = "") @JsonProperty("namespace_array") public List getNamespaceArray() { @@ -600,7 +569,6 @@ public XmlItemDto addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem * Get namespaceWrappedArray * @return namespaceWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("namespace_wrapped_array") public List getNamespaceWrappedArray() { @@ -620,7 +588,6 @@ public XmlItemDto prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ - @ApiModelProperty(example = "string", value = "") @JsonProperty("prefix_ns_string") public String getPrefixNsString() { @@ -640,7 +607,6 @@ public XmlItemDto prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ - @Valid @ApiModelProperty(example = "1.234", value = "") @JsonProperty("prefix_ns_number") public BigDecimal getPrefixNsNumber() { @@ -660,7 +626,6 @@ public XmlItemDto prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ - @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { @@ -680,7 +645,6 @@ public XmlItemDto prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ - @ApiModelProperty(example = "true", value = "") @JsonProperty("prefix_ns_boolean") public Boolean getPrefixNsBoolean() { @@ -708,7 +672,6 @@ public XmlItemDto addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_ns_array") public List getPrefixNsArray() { @@ -736,7 +699,6 @@ public XmlItemDto addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ - @ApiModelProperty(value = "") @JsonProperty("prefix_ns_wrapped_array") public List getPrefixNsWrappedArray() { @@ -840,4 +802,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } -