From 809b3331a95b3c3b7bcf025d16ae09dc0682cd69 Mon Sep 17 00:00:00 2001 From: Aliaksei Date: Mon, 11 Dec 2023 13:55:38 +0100 Subject: [PATCH] [4947][java]: adds support for validation of primitives in arrays (#17165) * [4947][java]: adds support for validation of primitives in arrays * [4947][java]: prevents generation '@Valid' for Object * [4947][java]: test against different codegens and stick to primitive * [4947][java]: code review * [4947][java]: enhance getBeanValidation * [4947][java]: adds email * [4947][java]: removes unnecessary override * [4947][java]: adds postProcessResponseWithProperty * [4947][java]: adds missing import {{javaxPackage}}.validation.Valid * [4947][java]: adds missing useBeanValidation * [4947][java]: fix use rootJavaEEPackage for helidon --- .../openapitools/codegen/CodegenConfig.java | 2 + .../openapitools/codegen/DefaultCodegen.java | 7 + .../languages/AbstractJavaCodegen.java | 144 +++++- .../codegen/languages/SpringCodegen.java | 125 ------ .../Java/libraries/okhttp-gson/api.mustache | 1 + .../Java/libraries/rest-assured/api.mustache | 5 + .../libraries/retrofit2/play26/api.mustache | 5 + .../resources/JavaJaxRS/apiService.mustache | 1 + .../JavaJaxRS/apiServiceImpl.mustache | 1 + .../resources/JavaJaxRS/cxf-cdi/api.mustache | 1 + .../JavaJaxRS/cxf-cdi/model.mustache | 1 + .../libraries/jersey1/apiService.mustache | 1 + .../libraries/jersey1/apiServiceImpl.mustache | 1 + .../resteasy/apiServiceImpl.mustache | 4 + .../resteasy/eap/apiServiceImpl.mustache | 4 + .../JavaJaxRS/resteasy/eap/model.mustache | 1 + .../JavaJaxRS/resteasy/model.mustache | 1 + .../JavaPlayFramework/newApi.mustache | 1 + .../newApiController.mustache | 1 + .../newApiInterface.mustache | 1 + .../resources/JavaPlayFramework/pojo.mustache | 1 + .../server/libraries/se/model.mustache | 4 + .../JavaValidationArrayPrimitivesTest.java | 410 ++++++++++++++++++ .../java/spring/SpringCodegenTest.java | 2 +- .../src/test/resources/bugs/issue_4947.yaml | 176 ++++++++ .../docs/apis/UserApi.md | 4 +- .../docs/models/ArrayTest.md | 2 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../org/openapitools/model/ArrayTest.java | 10 +- .../model/FileSchemaTestClass.java | 8 +- .../main/java/org/openapitools/model/Pet.java | 8 +- .../rest-assured-jackson/docs/ArrayTest.md | 2 +- .../java/rest-assured-jackson/docs/UserApi.md | 4 +- .../client/api/AnotherFakeApi.java | 3 + .../org/openapitools/client/api/FakeApi.java | 3 + .../client/api/FakeClassnameTags123Api.java | 3 + .../org/openapitools/client/api/PetApi.java | 3 + .../org/openapitools/client/api/StoreApi.java | 3 + .../org/openapitools/client/api/UserApi.java | 11 +- .../openapitools/client/model/ArrayTest.java | 10 +- .../client/model/FileSchemaTestClass.java | 8 +- .../org/openapitools/client/model/Pet.java | 8 +- .../java/rest-assured/docs/ArrayTest.md | 2 +- .../java/rest-assured/docs/UserApi.md | 4 +- .../client/api/AnotherFakeApi.java | 3 + .../org/openapitools/client/api/FakeApi.java | 3 + .../client/api/FakeClassnameTags123Api.java | 3 + .../org/openapitools/client/api/PetApi.java | 3 + .../org/openapitools/client/api/StoreApi.java | 3 + .../org/openapitools/client/api/UserApi.java | 11 +- .../openapitools/client/model/ArrayTest.java | 10 +- .../client/model/FileSchemaTestClass.java | 8 +- .../org/openapitools/client/model/Pet.java | 8 +- .../java/retrofit2-play26/docs/ArrayTest.md | 2 +- .../java/retrofit2-play26/docs/UserApi.md | 8 +- .../client/api/AnotherFakeApi.java | 3 + .../org/openapitools/client/api/FakeApi.java | 3 + .../client/api/FakeClassnameTags123Api.java | 3 + .../org/openapitools/client/api/PetApi.java | 3 + .../org/openapitools/client/api/StoreApi.java | 3 + .../org/openapitools/client/api/UserApi.java | 7 +- .../openapitools/client/model/ArrayTest.java | 10 +- .../client/model/FileSchemaTestClass.java | 8 +- .../org/openapitools/client/model/Pet.java | 8 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../org/openapitools/api/UserController.java | 4 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../org/openapitools/model/ArrayTest.java | 8 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../org/openapitools/api/UserApiDelegate.java | 4 +- .../org/openapitools/model/ArrayTest.java | 8 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../org/openapitools/model/ArrayTest.java | 8 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../openapitools/server/api/FakeService.java | 2 +- .../server/api/FakeServiceImpl.java | 2 +- .../openapitools/server/api/UserService.java | 4 +- .../server/api/UserServiceImpl.java | 4 +- .../openapitools/server/model/ArrayTest.java | 10 +- .../server/model/FileSchemaTestClass.java | 8 +- .../model/ObjectWithDeprecatedFields.java | 8 +- .../org/openapitools/server/model/Pet.java | 8 +- .../model/AdditionalPropertiesClass.java | 2 + .../server/model/AllOfWithSingleRef.java | 2 + .../org/openapitools/server/model/Animal.java | 2 + .../model/ArrayOfArrayOfNumberOnly.java | 2 + .../server/model/ArrayOfNumberOnly.java | 2 + .../openapitools/server/model/ArrayTest.java | 10 +- .../server/model/Capitalization.java | 2 + .../org/openapitools/server/model/Cat.java | 2 + .../openapitools/server/model/Category.java | 2 + .../server/model/ChildWithNullable.java | 2 + .../openapitools/server/model/ClassModel.java | 2 + .../org/openapitools/server/model/Client.java | 2 + .../server/model/DeprecatedObject.java | 2 + .../org/openapitools/server/model/Dog.java | 2 + .../openapitools/server/model/EnumArrays.java | 2 + .../openapitools/server/model/EnumClass.java | 2 + .../openapitools/server/model/EnumTest.java | 2 + .../model/FakeBigDecimalMap200Response.java | 2 + .../server/model/FileSchemaTestClass.java | 10 +- .../org/openapitools/server/model/Foo.java | 2 + .../server/model/FooGetDefaultResponse.java | 2 + .../openapitools/server/model/FormatTest.java | 2 + .../server/model/HasOnlyReadOnly.java | 2 + .../server/model/HealthCheckResult.java | 2 + .../openapitools/server/model/MapTest.java | 2 + ...ropertiesAndAdditionalPropertiesClass.java | 2 + .../server/model/Model200Response.java | 2 + .../server/model/ModelApiResponse.java | 2 + .../openapitools/server/model/ModelFile.java | 2 + .../openapitools/server/model/ModelList.java | 2 + .../server/model/ModelReturn.java | 2 + .../org/openapitools/server/model/Name.java | 2 + .../server/model/NullableClass.java | 2 + .../openapitools/server/model/NumberOnly.java | 2 + .../model/ObjectWithDeprecatedFields.java | 10 +- .../org/openapitools/server/model/Order.java | 2 + .../server/model/OuterComposite.java | 2 + .../openapitools/server/model/OuterEnum.java | 2 + .../server/model/OuterEnumDefaultValue.java | 2 + .../server/model/OuterEnumInteger.java | 2 + .../model/OuterEnumIntegerDefaultValue.java | 2 + .../model/OuterObjectWithEnumProperty.java | 2 + .../server/model/ParentWithNullable.java | 2 + .../org/openapitools/server/model/Pet.java | 10 +- .../server/model/ReadOnlyFirst.java | 2 + .../server/model/SingleRefType.java | 2 + .../server/model/SpecialModelName.java | 2 + .../org/openapitools/server/model/Tag.java | 2 + ...neFreeformAdditionalPropertiesRequest.java | 2 + .../org/openapitools/server/model/User.java | 2 + .../docs/controllers/UserController.md | 4 +- .../controller/UserController.java | 4 +- .../main/java/org/openapitools/model/Pet.java | 8 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../org/openapitools/api/UserApiService.java | 4 +- .../org/openapitools/model/ArrayTest.java | 10 +- .../model/FileSchemaTestClass.java | 8 +- .../gen/java/org/openapitools/model/Pet.java | 8 +- .../api/impl/UserApiServiceImpl.java | 4 +- .../app/apimodels/Category.java | 1 + .../app/apimodels/ModelApiResponse.java | 1 + .../app/apimodels/Order.java | 1 + .../app/apimodels/Pet.java | 9 +- .../app/apimodels/Tag.java | 1 + .../app/apimodels/User.java | 1 + .../puppies/store/apis/PetApiController.java | 1 + .../store/apis/PetApiControllerImp.java | 1 + .../apis/PetApiControllerImpInterface.java | 1 + .../store/apis/StoreApiController.java | 1 + .../store/apis/StoreApiControllerImp.java | 1 + .../apis/StoreApiControllerImpInterface.java | 1 + .../puppies/store/apis/UserApiController.java | 9 +- .../store/apis/UserApiControllerImp.java | 5 +- .../apis/UserApiControllerImpInterface.java | 9 +- .../app/apimodels/Category.java | 1 + .../app/apimodels/ModelApiResponse.java | 1 + .../app/apimodels/Order.java | 1 + .../app/apimodels/Pet.java | 9 +- .../app/apimodels/Tag.java | 1 + .../app/apimodels/User.java | 1 + .../app/controllers/PetApiController.java | 1 + .../app/controllers/PetApiControllerImp.java | 1 + .../PetApiControllerImpInterface.java | 1 + .../app/controllers/StoreApiController.java | 1 + .../controllers/StoreApiControllerImp.java | 1 + .../StoreApiControllerImpInterface.java | 1 + .../app/controllers/UserApiController.java | 9 +- .../app/controllers/UserApiControllerImp.java | 5 +- .../UserApiControllerImpInterface.java | 9 +- .../app/apimodels/Category.java | 1 + .../app/apimodels/ModelApiResponse.java | 1 + .../app/apimodels/Order.java | 1 + .../app/apimodels/Pet.java | 9 +- .../app/apimodels/Tag.java | 1 + .../app/apimodels/User.java | 1 + .../app/controllers/PetApiController.java | 1 + .../app/controllers/StoreApiController.java | 1 + .../app/controllers/UserApiController.java | 9 +- .../app/apimodels/Category.java | 1 + .../app/apimodels/ModelApiResponse.java | 1 + .../app/apimodels/Order.java | 1 + .../app/apimodels/Pet.java | 9 +- .../app/apimodels/Tag.java | 1 + .../app/apimodels/User.java | 1 + .../app/controllers/PetApiController.java | 1 + .../app/controllers/PetApiControllerImp.java | 1 + .../PetApiControllerImpInterface.java | 1 + .../AdditionalPropertiesAnyType.java | 1 + .../apimodels/AdditionalPropertiesArray.java | 1 + .../AdditionalPropertiesBoolean.java | 1 + .../apimodels/AdditionalPropertiesClass.java | 1 + .../AdditionalPropertiesInteger.java | 1 + .../apimodels/AdditionalPropertiesNumber.java | 1 + .../apimodels/AdditionalPropertiesObject.java | 1 + .../apimodels/AdditionalPropertiesString.java | 1 + .../app/apimodels/Animal.java | 1 + .../apimodels/ArrayOfArrayOfNumberOnly.java | 1 + .../app/apimodels/ArrayOfNumberOnly.java | 1 + .../app/apimodels/ArrayTest.java | 11 +- .../app/apimodels/BigCat.java | 1 + .../app/apimodels/Capitalization.java | 1 + .../app/apimodels/Cat.java | 1 + .../app/apimodels/Category.java | 1 + .../app/apimodels/ClassModel.java | 1 + .../app/apimodels/Client.java | 1 + .../app/apimodels/Dog.java | 1 + .../app/apimodels/EnumArrays.java | 1 + .../app/apimodels/EnumTest.java | 1 + .../app/apimodels/FileSchemaTestClass.java | 9 +- .../app/apimodels/FormatTest.java | 1 + .../app/apimodels/HasOnlyReadOnly.java | 1 + .../app/apimodels/MapTest.java | 1 + ...ropertiesAndAdditionalPropertiesClass.java | 1 + .../app/apimodels/Model200Response.java | 1 + .../app/apimodels/ModelApiResponse.java | 1 + .../app/apimodels/ModelFile.java | 1 + .../app/apimodels/ModelList.java | 1 + .../app/apimodels/ModelReturn.java | 1 + .../app/apimodels/Name.java | 1 + .../app/apimodels/NumberOnly.java | 1 + .../app/apimodels/Order.java | 1 + .../app/apimodels/OuterComposite.java | 1 + .../app/apimodels/Pet.java | 9 +- .../app/apimodels/ReadOnlyFirst.java | 1 + .../app/apimodels/SpecialModelName.java | 1 + .../app/apimodels/Tag.java | 1 + .../app/apimodels/TypeHolderDefault.java | 1 + .../app/apimodels/TypeHolderExample.java | 1 + .../app/apimodels/User.java | 1 + .../app/apimodels/XmlItem.java | 1 + .../controllers/AnotherFakeApiController.java | 1 + .../AnotherFakeApiControllerImp.java | 1 + .../AnotherFakeApiControllerImpInterface.java | 1 + .../app/controllers/FakeApiController.java | 1 + .../app/controllers/FakeApiControllerImp.java | 1 + .../FakeApiControllerImpInterface.java | 1 + .../FakeClassnameTags123ApiController.java | 1 + .../FakeClassnameTags123ApiControllerImp.java | 1 + ...snameTags123ApiControllerImpInterface.java | 1 + .../app/controllers/PetApiController.java | 1 + .../app/controllers/PetApiControllerImp.java | 1 + .../PetApiControllerImpInterface.java | 1 + .../app/controllers/StoreApiController.java | 1 + .../controllers/StoreApiControllerImp.java | 1 + .../StoreApiControllerImpInterface.java | 1 + .../app/controllers/UserApiController.java | 9 +- .../app/controllers/UserApiControllerImp.java | 5 +- .../UserApiControllerImpInterface.java | 9 +- .../app/apimodels/Category.java | 1 + .../app/apimodels/ModelApiResponse.java | 1 + .../app/apimodels/Order.java | 1 + .../app/apimodels/Pet.java | 9 +- .../app/apimodels/Tag.java | 1 + .../app/apimodels/User.java | 1 + .../app/controllers/PetApiController.java | 1 + .../app/controllers/PetApiControllerImp.java | 1 + .../PetApiControllerImpInterface.java | 1 + .../app/controllers/StoreApiController.java | 1 + .../controllers/StoreApiControllerImp.java | 1 + .../StoreApiControllerImpInterface.java | 1 + .../app/controllers/UserApiController.java | 9 +- .../app/controllers/UserApiControllerImp.java | 5 +- .../UserApiControllerImpInterface.java | 9 +- .../app/apimodels/Category.java | 1 + .../app/apimodels/ModelApiResponse.java | 1 + .../app/apimodels/Order.java | 1 + .../app/apimodels/Pet.java | 9 +- .../app/apimodels/Tag.java | 1 + .../app/apimodels/User.java | 1 + .../app/controllers/PetApiController.java | 1 + .../app/controllers/PetApiControllerImp.java | 1 + .../app/controllers/StoreApiController.java | 1 + .../controllers/StoreApiControllerImp.java | 1 + .../app/controllers/UserApiController.java | 9 +- .../app/controllers/UserApiControllerImp.java | 5 +- .../app/apimodels/Category.java | 1 + .../app/apimodels/ModelApiResponse.java | 1 + .../app/apimodels/Order.java | 1 + .../app/apimodels/Pet.java | 9 +- .../app/apimodels/Tag.java | 1 + .../app/apimodels/User.java | 1 + .../app/controllers/PetApiController.java | 1 + .../app/controllers/PetApiControllerImp.java | 1 + .../PetApiControllerImpInterface.java | 1 + .../app/controllers/StoreApiController.java | 1 + .../controllers/StoreApiControllerImp.java | 1 + .../StoreApiControllerImpInterface.java | 1 + .../app/controllers/UserApiController.java | 9 +- .../app/controllers/UserApiControllerImp.java | 5 +- .../UserApiControllerImpInterface.java | 9 +- .../app/apimodels/Category.java | 1 + .../app/apimodels/ModelApiResponse.java | 1 + .../app/apimodels/Order.java | 1 + .../app/apimodels/Pet.java | 9 +- .../app/apimodels/Tag.java | 1 + .../app/apimodels/User.java | 1 + .../app/controllers/PetApiController.java | 1 + .../app/controllers/PetApiControllerImp.java | 1 + .../PetApiControllerImpInterface.java | 1 + .../app/controllers/StoreApiController.java | 1 + .../controllers/StoreApiControllerImp.java | 1 + .../StoreApiControllerImpInterface.java | 1 + .../app/controllers/UserApiController.java | 9 +- .../app/controllers/UserApiControllerImp.java | 5 +- .../UserApiControllerImpInterface.java | 9 +- .../app/apimodels/Category.java | 1 + .../app/apimodels/ModelApiResponse.java | 1 + .../app/apimodels/Order.java | 1 + .../app/apimodels/Pet.java | 9 +- .../app/apimodels/Tag.java | 1 + .../app/apimodels/User.java | 1 + .../app/controllers/PetApiController.java | 1 + .../app/controllers/PetApiControllerImp.java | 1 + .../PetApiControllerImpInterface.java | 1 + .../app/controllers/StoreApiController.java | 1 + .../controllers/StoreApiControllerImp.java | 1 + .../StoreApiControllerImpInterface.java | 1 + .../app/controllers/UserApiController.java | 9 +- .../app/controllers/UserApiControllerImp.java | 5 +- .../UserApiControllerImpInterface.java | 9 +- .../app/apimodels/Category.java | 1 + .../app/apimodels/ModelApiResponse.java | 1 + .../app/apimodels/Order.java | 1 + .../app/apimodels/Pet.java | 9 +- .../app/apimodels/Tag.java | 1 + .../app/apimodels/User.java | 1 + .../app/controllers/PetApiController.java | 1 + .../app/controllers/PetApiControllerImp.java | 1 + .../PetApiControllerImpInterface.java | 1 + .../app/controllers/StoreApiController.java | 1 + .../controllers/StoreApiControllerImp.java | 1 + .../StoreApiControllerImpInterface.java | 1 + .../app/controllers/UserApiController.java | 9 +- .../app/controllers/UserApiControllerImp.java | 5 +- .../UserApiControllerImpInterface.java | 9 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../gen/java/org/openapitools/model/Pet.java | 8 +- .../gen/java/org/openapitools/api/PetApi.java | 1 + .../java/org/openapitools/api/StoreApi.java | 1 + .../java/org/openapitools/api/TestApi.java | 1 + .../java/org/openapitools/api/UserApi.java | 5 +- .../org/openapitools/api/UserApiService.java | 4 +- .../java/org/openapitools/model/Category.java | 1 + .../openapitools/model/ModelApiResponse.java | 1 + .../java/org/openapitools/model/Order.java | 1 + .../gen/java/org/openapitools/model/Pet.java | 9 +- .../gen/java/org/openapitools/model/Tag.java | 1 + .../gen/java/org/openapitools/model/User.java | 1 + .../api/impl/UserApiServiceImpl.java | 4 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../gen/java/org/openapitools/model/Pet.java | 8 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../org/openapitools/model/ArrayTest.java | 10 +- .../model/FileSchemaTestClass.java | 8 +- .../gen/java/org/openapitools/model/Pet.java | 8 +- .../api/AnotherFakeApiService.java | 1 + .../org/openapitools/api/FakeApiService.java | 1 + .../api/FakeClassnameTestApiService.java | 1 + .../org/openapitools/api/PetApiService.java | 1 + .../org/openapitools/api/StoreApiService.java | 1 + .../java/org/openapitools/api/UserApi.java | 4 +- .../org/openapitools/api/UserApiService.java | 5 +- .../org/openapitools/model/ArrayTest.java | 10 +- .../model/FileSchemaTestClass.java | 8 +- .../gen/java/org/openapitools/model/Pet.java | 8 +- .../api/impl/AnotherFakeApiServiceImpl.java | 1 + .../api/impl/FakeApiServiceImpl.java | 1 + .../impl/FakeClassnameTestApiServiceImpl.java | 1 + .../api/impl/PetApiServiceImpl.java | 1 + .../api/impl/StoreApiServiceImpl.java | 1 + .../api/impl/UserApiServiceImpl.java | 5 +- .../api/AnotherFakeApiService.java | 1 + .../java/org/openapitools/api/FakeApi.java | 2 +- .../org/openapitools/api/FakeApiService.java | 3 +- .../api/FakeClassnameTestApiService.java | 1 + .../org/openapitools/api/FooApiService.java | 1 + .../org/openapitools/api/PetApiService.java | 1 + .../org/openapitools/api/StoreApiService.java | 1 + .../java/org/openapitools/api/UserApi.java | 4 +- .../org/openapitools/api/UserApiService.java | 5 +- .../org/openapitools/model/ArrayTest.java | 10 +- .../model/FileSchemaTestClass.java | 8 +- .../model/ObjectWithDeprecatedFields.java | 8 +- .../gen/java/org/openapitools/model/Pet.java | 8 +- .../api/impl/AnotherFakeApiServiceImpl.java | 1 + .../api/impl/FakeApiServiceImpl.java | 3 +- .../impl/FakeClassnameTestApiServiceImpl.java | 1 + .../api/impl/FooApiServiceImpl.java | 1 + .../api/impl/PetApiServiceImpl.java | 1 + .../api/impl/StoreApiServiceImpl.java | 1 + .../api/impl/UserApiServiceImpl.java | 5 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../org/openapitools/api/UserApiService.java | 4 +- .../java/org/openapitools/model/Category.java | 1 + .../openapitools/model/ModelApiResponse.java | 1 + .../java/org/openapitools/model/Order.java | 1 + .../gen/java/org/openapitools/model/Pet.java | 7 +- .../gen/java/org/openapitools/model/Tag.java | 1 + .../gen/java/org/openapitools/model/User.java | 1 + .../api/impl/PetApiServiceImpl.java | 2 + .../api/impl/StoreApiServiceImpl.java | 2 + .../api/impl/UserApiServiceImpl.java | 6 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../java/org/openapitools/model/Category.java | 1 + .../openapitools/model/ModelApiResponse.java | 1 + .../java/org/openapitools/model/Order.java | 1 + .../gen/java/org/openapitools/model/Pet.java | 7 +- .../gen/java/org/openapitools/model/Tag.java | 1 + .../gen/java/org/openapitools/model/User.java | 1 + .../api/impl/PetApiServiceImpl.java | 2 + .../api/impl/StoreApiServiceImpl.java | 2 + .../api/impl/UserApiServiceImpl.java | 6 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../java/org/openapitools/model/Category.java | 1 + .../openapitools/model/ModelApiResponse.java | 1 + .../java/org/openapitools/model/Order.java | 1 + .../gen/java/org/openapitools/model/Pet.java | 7 +- .../gen/java/org/openapitools/model/Tag.java | 1 + .../gen/java/org/openapitools/model/User.java | 1 + .../api/impl/PetApiServiceImpl.java | 2 + .../api/impl/StoreApiServiceImpl.java | 2 + .../api/impl/UserApiServiceImpl.java | 6 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../java/org/openapitools/model/Category.java | 1 + .../openapitools/model/ModelApiResponse.java | 1 + .../java/org/openapitools/model/Order.java | 1 + .../gen/java/org/openapitools/model/Pet.java | 7 +- .../gen/java/org/openapitools/model/Tag.java | 1 + .../gen/java/org/openapitools/model/User.java | 1 + .../api/impl/PetApiServiceImpl.java | 2 + .../api/impl/StoreApiServiceImpl.java | 2 + .../api/impl/UserApiServiceImpl.java | 6 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../org/openapitools/api/UserApiService.java | 4 +- .../java/org/openapitools/model/Category.java | 1 + .../openapitools/model/ModelApiResponse.java | 1 + .../java/org/openapitools/model/Order.java | 1 + .../gen/java/org/openapitools/model/Pet.java | 7 +- .../gen/java/org/openapitools/model/Tag.java | 1 + .../gen/java/org/openapitools/model/User.java | 1 + .../api/impl/PetApiServiceImpl.java | 2 + .../api/impl/StoreApiServiceImpl.java | 2 + .../api/impl/UserApiServiceImpl.java | 6 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../org/openapitools/api/UserApiService.java | 4 +- .../java/org/openapitools/model/Category.java | 1 + .../openapitools/model/ModelApiResponse.java | 1 + .../java/org/openapitools/model/Order.java | 1 + .../gen/java/org/openapitools/model/Pet.java | 7 +- .../gen/java/org/openapitools/model/Tag.java | 1 + .../gen/java/org/openapitools/model/User.java | 1 + .../api/impl/PetApiServiceImpl.java | 2 + .../api/impl/StoreApiServiceImpl.java | 2 + .../api/impl/UserApiServiceImpl.java | 6 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../org/openapitools/model/ArrayTest.java | 10 +- .../model/FileSchemaTestClass.java | 6 +- .../gen/java/org/openapitools/model/Pet.java | 6 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../org/openapitools/model/ArrayTest.java | 10 +- .../model/FileSchemaTestClass.java | 6 +- .../gen/java/org/openapitools/model/Pet.java | 6 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../org/openapitools/model/ArrayTest.java | 14 +- .../model/FileSchemaTestClass.java | 10 +- .../gen/java/org/openapitools/model/Pet.java | 10 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../org/openapitools/model/ArrayTest.java | 14 +- .../model/FileSchemaTestClass.java | 10 +- .../gen/java/org/openapitools/model/Pet.java | 10 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../org/openapitools/model/ArrayTest.java | 14 +- .../model/FileSchemaTestClass.java | 10 +- .../gen/java/org/openapitools/model/Pet.java | 10 +- .../api/AnotherFakeApiService.java | 1 + .../org/openapitools/api/FakeApiService.java | 1 + .../api/FakeClassnameTags123ApiService.java | 1 + .../org/openapitools/api/PetApiService.java | 1 + .../org/openapitools/api/StoreApiService.java | 1 + .../java/org/openapitools/api/UserApi.java | 4 +- .../org/openapitools/api/UserApiService.java | 5 +- .../org/openapitools/model/ArrayTest.java | 10 +- .../model/FileSchemaTestClass.java | 8 +- .../gen/java/org/openapitools/model/Pet.java | 8 +- .../api/impl/AnotherFakeApiServiceImpl.java | 1 + .../api/impl/FakeApiServiceImpl.java | 1 + .../FakeClassnameTags123ApiServiceImpl.java | 1 + .../api/impl/PetApiServiceImpl.java | 1 + .../api/impl/StoreApiServiceImpl.java | 1 + .../api/impl/UserApiServiceImpl.java | 5 +- .../api/AnotherFakeApiService.java | 1 + .../org/openapitools/api/FakeApiService.java | 1 + .../api/FakeClassnameTestApiService.java | 1 + .../org/openapitools/api/PetApiService.java | 1 + .../org/openapitools/api/StoreApiService.java | 1 + .../java/org/openapitools/api/UserApi.java | 4 +- .../org/openapitools/api/UserApiService.java | 5 +- .../org/openapitools/model/ArrayTest.java | 10 +- .../model/FileSchemaTestClass.java | 8 +- .../gen/java/org/openapitools/model/Pet.java | 8 +- .../api/impl/AnotherFakeApiServiceImpl.java | 1 + .../api/impl/FakeApiServiceImpl.java | 1 + .../impl/FakeClassnameTestApiServiceImpl.java | 1 + .../api/impl/PetApiServiceImpl.java | 1 + .../api/impl/StoreApiServiceImpl.java | 1 + .../api/impl/UserApiServiceImpl.java | 5 +- .../api/AnotherFakeApiService.java | 1 + .../java/org/openapitools/api/FakeApi.java | 2 +- .../org/openapitools/api/FakeApiService.java | 3 +- .../api/FakeClassnameTestApiService.java | 1 + .../org/openapitools/api/FooApiService.java | 1 + .../org/openapitools/api/PetApiService.java | 1 + .../org/openapitools/api/StoreApiService.java | 1 + .../java/org/openapitools/api/UserApi.java | 4 +- .../org/openapitools/api/UserApiService.java | 5 +- .../org/openapitools/model/ArrayTest.java | 10 +- .../model/FileSchemaTestClass.java | 8 +- .../model/ObjectWithDeprecatedFields.java | 8 +- .../gen/java/org/openapitools/model/Pet.java | 8 +- .../api/impl/AnotherFakeApiServiceImpl.java | 1 + .../api/impl/FakeApiServiceImpl.java | 3 +- .../impl/FakeClassnameTestApiServiceImpl.java | 1 + .../api/impl/FooApiServiceImpl.java | 1 + .../api/impl/PetApiServiceImpl.java | 1 + .../api/impl/StoreApiServiceImpl.java | 1 + .../api/impl/UserApiServiceImpl.java | 5 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../org/openapitools/model/ArrayTest.java | 8 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../org/openapitools/model/ArrayTest.java | 8 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../org/openapitools/model/ArrayTest.java | 8 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../org/openapitools/api/UserApiDelegate.java | 4 +- .../org/openapitools/model/ArrayTest.java | 8 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../org/openapitools/api/UserApiDelegate.java | 4 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../org/openapitools/api/UserApiDelegate.java | 4 +- .../org/openapitools/model/ArrayTest.java | 8 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../org/openapitools/model/ArrayTest.java | 8 +- .../org/openapitools/model/ArrayTest.java | 8 +- .../org/openapitools/model/ArrayTest.java | 8 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../org/openapitools/api/UserApiDelegate.java | 4 +- .../org/openapitools/model/ArrayTest.java | 8 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../org/openapitools/api/UserApiDelegate.java | 4 +- .../org/openapitools/model/ArrayTest.java | 8 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../org/openapitools/model/ArrayTest.java | 8 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../org/openapitools/model/ArrayTest.java | 8 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../org/openapitools/model/ArrayTest.java | 8 +- .../openapitools/virtualan/api/UserApi.java | 4 +- .../virtualan/model/ArrayTest.java | 8 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../org/openapitools/model/ArrayTestDto.java | 8 +- 575 files changed, 1982 insertions(+), 843 deletions(-) create mode 100644 modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaValidationArrayPrimitivesTest.java create mode 100644 modules/openapi-generator/src/test/resources/bugs/issue_4947.yaml diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java index 9d43b19ccce7..ccb63c22e556 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java @@ -224,6 +224,8 @@ public interface CodegenConfig { void postProcessModelProperty(CodegenModel model, CodegenProperty property); + void postProcessResponseWithProperty(CodegenResponse response, CodegenProperty property); + void postProcessParameter(CodegenParameter parameter); String modelFilename(String templateName, String modelName); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index f49296e44773..b7cc314fd635 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -998,6 +998,12 @@ public Map postProcessSupportingFileData(Map obj public void postProcessModelProperty(CodegenModel model, CodegenProperty property) { } + // override to post-process any response + @Override + @SuppressWarnings("unused") + public void postProcessResponseWithProperty(CodegenResponse response, CodegenProperty property) { + } + // override to post-process any parameters @Override @SuppressWarnings("unused") @@ -4999,6 +5005,7 @@ public CodegenResponse fromResponse(String responseCode, ApiResponse response) { r.simpleType = true; } + postProcessResponseWithProperty(r, cp); return r; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java index 62be87b6531a..e43242f3c7bf 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java @@ -21,7 +21,6 @@ import com.fasterxml.jackson.databind.node.ArrayNode; import com.google.common.base.Strings; import com.google.common.collect.Sets; -import io.swagger.models.Model; import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.Operation; import io.swagger.v3.oas.models.PathItem; @@ -34,7 +33,9 @@ import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.StringUtils; +import org.apache.commons.text.StringEscapeUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.languages.features.BeanValidationFeatures; import org.openapitools.codegen.languages.features.DocumentationProviderFeatures; import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.model.ModelMap; @@ -930,7 +931,7 @@ public String getTypeDeclaration(Schema p) { Schema target = ModelUtils.isGenerateAliasAsModel() ? p : schema; if (ModelUtils.isArraySchema(target)) { Schema items = getSchemaItems((ArraySchema) schema); - return getSchemaType(target) + "<" + getTypeDeclaration(items) + ">"; + return getSchemaType(target) + "<" + getBeanValidation(items) + getTypeDeclaration(items) + ">"; } else if (ModelUtils.isMapSchema(target)) { // Note: ModelUtils.isMapSchema(p) returns true when p is a composed schema that also defines // additionalproperties: true @@ -945,6 +946,128 @@ public String getTypeDeclaration(Schema p) { return super.getTypeDeclaration(target); } + /** + * This method stand for resolve bean validation for container(array, set). + * Return empty if there's no bean validation for requested type or prop useBeanValidation false or missed. + * + * @param items type + * @return BeanValidation for declared type in container(array, set) + */ + private String getBeanValidation(Schema items) { + if (Boolean.FALSE.equals(additionalProperties.getOrDefault(BeanValidationFeatures.USE_BEANVALIDATION, Boolean.FALSE))) { + return ""; + } + + if (ModelUtils.isTypeObjectSchema(items)) { + // prevents generation '@Valid' for Object + return ""; + } + + if (items.get$ref() != null) { + return "@Valid "; + } + + if (ModelUtils.isStringSchema(items)) { + return getStringBeanValidation(items); + } + + if (ModelUtils.isNumberSchema(items)) { + return getNumberBeanValidation(items); + } + + if (ModelUtils.isIntegerSchema(items)) { + return getIntegerBeanValidation(items); + } + + return ""; + } + + private String getIntegerBeanValidation(Schema items) { + if (items.getMinimum() != null && items.getMaximum() != null) { + return String.format(Locale.ROOT, "@Min(%s) @Max(%s)", items.getMinimum(), items.getMaximum()); + } + + if (items.getMinimum() != null) { + return String.format(Locale.ROOT, "@Min(%s)", items.getMinimum()); + } + + if (items.getMaximum() != null) { + return String.format(Locale.ROOT, "@Max(%s)", items.getMaximum()); + } + return ""; + } + + private String getNumberBeanValidation(Schema items) { + if (items.getMinimum() != null && items.getMaximum() != null) { + return String.format(Locale.ROOT, "@DecimalMin(value = \"%s\", inclusive = %s) @DecimalMax(value = \"%s\", inclusive = %s)", + items.getMinimum(), + Optional.ofNullable(items.getExclusiveMinimum()).orElse(Boolean.FALSE), + items.getMaximum(), + Optional.ofNullable(items.getExclusiveMaximum()).orElse(Boolean.FALSE)); + } + + if (items.getMinimum() != null) { + return String.format(Locale.ROOT, "@DecimalMin( value = \"%s\", inclusive = %s)", + items.getMinimum(), + Optional.ofNullable(items.getExclusiveMinimum()).orElse(Boolean.FALSE)); + } + + if (items.getMaximum() != null) { + return String.format(Locale.ROOT, "@DecimalMax( value = \"%s\", inclusive = %s)", + items.getMaximum(), + Optional.ofNullable(items.getExclusiveMaximum()).orElse(Boolean.FALSE)); + } + + return ""; + } + + private String getStringBeanValidation(Schema items) { + String validations = ""; + if (ModelUtils.isByteArraySchema(items) || ModelUtils.isBinarySchema(items)) { + return validations; + } + + if (StringUtils.isNotEmpty(items.getPattern())) { + final String pattern = escapeUnsafeCharacters( + StringEscapeUtils.unescapeJava( + StringEscapeUtils.escapeJava(items.getPattern()) + .replace("\\/", "/")) + .replaceAll("[\\t\\n\\r]", " ") + .replace("\\", "\\\\") + .replace("\"", "\\\"")); + + validations = String.format(Locale.ROOT, "@Pattern(regexp = \"%s\")", pattern); + } + + if (ModelUtils.isEmailSchema(items)) { + return String.join("", "@Email "); + } + + if (ModelUtils.isDecimalSchema(items)) { + return String.join("", validations, getNumberBeanValidation(items)); + } + + if (items.getMinLength() != null && items.getMaxLength() != null) { + return String.join("", + validations, + String.format(Locale.ROOT, "@Size(min = %d, max = %d)", items.getMinLength(), items.getMaxLength())); + } + + if (items.getMinLength() != null) { + return String.join("", + validations, + String.format(Locale.ROOT, "@Size(min = %d)", items.getMinLength())); + } + + if (items.getMaxLength() != null) { + return String.join("", + validations, + String.format(Locale.ROOT, "@Size(max = %d)", items.getMaxLength())); + } + + return validations; + } + @Override public String getAlias(String name) { if (typeAliases != null && typeAliases.containsKey(name)) { @@ -1511,6 +1634,21 @@ public void postProcessModelProperty(CodegenModel model, CodegenProperty propert } } + public void postProcessResponseWithProperty(CodegenResponse response, CodegenProperty property) { + if (response == null || property == null || response.dataType == null || property.dataType == null) { + return; + } + + // the response data types should not contains a bean validation annotation. + if (property.dataType.contains("@")) { + property.dataType = property.dataType.replaceAll("(?:(?i)@[a-z0-9]*+\\s*)*+", ""); + } + // the response data types should not contains a bean validation annotation. + if (response.dataType.contains("@")) { + response.dataType = response.dataType.replaceAll("(?:(?i)@[a-z0-9]*+\\s*)*+", ""); + } + } + @Override public ModelsMap postProcessModels(ModelsMap objs) { // recursively add import for mapping one type to multiple imports @@ -2289,7 +2427,7 @@ protected void handleImplicitHeaders(CodegenOperation operation) { } operation.hasParams = !operation.allParams.isEmpty(); } - + private boolean shouldBeImplicitHeader(CodegenParameter parameter) { return StringUtils.isNotBlank(implicitHeadersRegex) && parameter.baseName.matches(implicitHeadersRegex); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java index 7bdf52ae7923..513cc2b7bfe9 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java @@ -1420,119 +1420,6 @@ public void setRequestMappingMode(RequestMappingMode requestMappingMode) { this.requestMappingMode = requestMappingMode; } - @Override - public CodegenParameter fromParameter( final Parameter parameter, final Set imports ) { - CodegenParameter codegenParameter = super.fromParameter( parameter, imports ); - if(!isListOrSet(codegenParameter)){ - return codegenParameter; - } - codegenParameter.datatypeWithEnum = replaceBeanValidationCollectionType(codegenParameter.items, codegenParameter.datatypeWithEnum ); - codegenParameter.dataType = replaceBeanValidationCollectionType(codegenParameter.items, codegenParameter.dataType ); - return codegenParameter; - } - @Override - public CodegenProperty fromProperty( String name, Schema p, boolean required, boolean schemaIsFromAdditionalProperties ) { - CodegenProperty codegenProperty = super.fromProperty( name, p, required, schemaIsFromAdditionalProperties ); - if(!isListOrSet(codegenProperty)){ - return codegenProperty; - } - codegenProperty.datatypeWithEnum = replaceBeanValidationCollectionType(codegenProperty.items, codegenProperty.datatypeWithEnum ); - codegenProperty.dataType = replaceBeanValidationCollectionType(codegenProperty.items, codegenProperty.dataType ); - return codegenProperty; - } - - // The default validation applied for non-container and non-map types is sufficient for the SpringCodegen. - // Maps are very complex for bean validation, so it's currently not supported. - private static boolean isListOrSet(CodegenProperty codegenProperty) { - return codegenProperty.isContainer && !codegenProperty.isMap; - } - - // The default validation applied for non-container and non-map types is sufficient for the SpringCodegen. - // Maps are very complex for bean validation, so it's currently not supported. - private static boolean isListOrSet(CodegenParameter codegenParameter) { - return codegenParameter.isContainer && !codegenParameter.isMap; - } - - private String replaceBeanValidationCollectionType(CodegenProperty codegenProperty, String dataType) { - if (!useBeanValidation() || isResponseType(codegenProperty)) { - return dataType; - } - - if (StringUtils.isEmpty(dataType) || dataType.contains("@Valid")) { - return dataType; - } - - if (codegenProperty.isModel) { - return dataType.replace("<", "<@Valid "); - } - String beanValidation = getPrimitiveBeanValidation(codegenProperty); - if (beanValidation == null) { - return dataType; - } - return dataType.replace("<", "<" + beanValidation + " "); - } - - /** - * This method should be in sync with beanValidationCore.mustache - * @param codegenProperty the code property - * @return the bean validation semantic for container primitive types - */ - private String getPrimitiveBeanValidation(CodegenProperty codegenProperty) { - - if (StringUtils.isNotEmpty(codegenProperty.pattern) && !codegenProperty.isByteArray) { - return "@Pattern(regexp = \""+codegenProperty.pattern+"\")"; - } - - if (codegenProperty.minLength != null && codegenProperty.maxLength != null) { - return "@Size(min = " + codegenProperty.minLength + ", max = " + codegenProperty.maxLength + ")"; - } - - if (codegenProperty.minLength != null) { - return "@Size(min = " + codegenProperty.minLength + ")"; - } - - if (codegenProperty.maxLength != null) { - return "@Size(max = " + codegenProperty.maxLength + ")"; - } - - - if (codegenProperty.isEmail) { - return "@" + additionalProperties.get(JAVAX_PACKAGE)+".validation.constraints.Email"; - } - - - if (codegenProperty.isLong || codegenProperty.isInteger) { - - if (StringUtils.isNotEmpty(codegenProperty.minimum) && StringUtils.isNotEmpty(codegenProperty.maximum)) { - return "@Min("+codegenProperty.minimum+") @Max("+codegenProperty.maximum+")"; - } - - if (StringUtils.isNotEmpty(codegenProperty.minimum)) { - return "@Min("+codegenProperty.minimum+")"; - } - - if (StringUtils.isNotEmpty(codegenProperty.maximum)) { - return "@Max("+codegenProperty.maximum+")"; - } - } - - if (StringUtils.isNotEmpty(codegenProperty.minimum) && StringUtils.isNotEmpty(codegenProperty.maximum)) { - return "@DecimalMin(value = \""+codegenProperty.minimum+"\", inclusive = false) @DecimalMax(value = \""+codegenProperty.maximum+"\", inclusive = false)"; - } - - if (StringUtils.isNotEmpty(codegenProperty.minimum)) { - return "@DecimalMin( value = \""+codegenProperty.minimum+"\", inclusive = false)"; - } - - if (StringUtils.isNotEmpty(codegenProperty.maximum)) { - return "@DecimalMax( value = \""+codegenProperty.maximum+"\", inclusive = false)"; - } - - return null; - } - - - public void setResourceFolder( String resourceFolder ) { this.resourceFolder = resourceFolder; } @@ -1540,16 +1427,4 @@ public void setResourceFolder( String resourceFolder ) { public String getResourceFolder() { return resourceFolder; } - - - // This should prevent, that the response data types not contains a @Valid annotation. - // However, the side effect is that attributes with response as name are also affected. - private static boolean isResponseType(CodegenProperty codegenProperty) { - return codegenProperty.baseName.toLowerCase(Locale.ROOT).contains("response"); - } - - // SPRING_HTTP_INTERFACE does not support bean validation. - public boolean useBeanValidation() { - return useBeanValidation && !SPRING_HTTP_INTERFACE.equals(library); - } } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api.mustache index b52a1cbd5cb0..fe08469b577e 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api.mustache @@ -27,6 +27,7 @@ import java.io.IOException; {{#useBeanValidation}} import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} {{#performBeanValidation}} import {{javaxPackage}}.validation.ConstraintViolation; diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/api.mustache index 0642414d608d..7e04598d681d 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/api.mustache @@ -32,6 +32,11 @@ import io.swagger.v3.oas.annotations.responses.*; import io.swagger.v3.oas.annotations.security.*; {{/swagger2AnnotationLibrary}} +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; +{{/useBeanValidation}} + import java.lang.reflect.Type; import java.util.function.Consumer; import java.util.function.Function; diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play26/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play26/api.mustache index a450a583cf51..7f7b9e2b0f2b 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play26/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play26/api.mustache @@ -17,6 +17,11 @@ import okhttp3.MultipartBody; {{#imports}}import {{import}}; {{/imports}} +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; +{{/useBeanValidation}} + import java.util.ArrayList; import java.util.HashMap; import java.util.List; diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/apiService.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/apiService.mustache index 64d61f6d465b..72682d96fba3 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/apiService.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/apiService.mustache @@ -19,6 +19,7 @@ import {{javaxPackage}}.ws.rs.core.Response; import {{javaxPackage}}.ws.rs.core.SecurityContext; {{#useBeanValidation}} import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} {{>generatedAnnotation}} {{#operations}} diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/apiServiceImpl.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/apiServiceImpl.mustache index 1c452eb8d32d..4d20508f3874 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/apiServiceImpl.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/apiServiceImpl.mustache @@ -18,6 +18,7 @@ import {{javaxPackage}}.ws.rs.core.Response; import {{javaxPackage}}.ws.rs.core.SecurityContext; {{#useBeanValidation}} import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} {{>generatedAnnotation}} {{#operations}} diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/api.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/api.mustache index f00d72939a7b..afc9931c2414 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/api.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/api.mustache @@ -22,6 +22,7 @@ import java.util.Map; import java.util.List; {{#useBeanValidation}} import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} @Path("{{commonPath}}") @RequestScoped diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/model.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/model.mustache index 711b94486d7a..f07ef535f3e4 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/model.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/model.mustache @@ -7,6 +7,7 @@ import java.io.Serializable; {{/serializableModel}} {{#useBeanValidation}} import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} {{#models}} {{#model}}{{#description}} diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/apiService.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/apiService.mustache index 65623eff6e02..fb0e53912631 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/apiService.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/apiService.mustache @@ -20,6 +20,7 @@ import {{javaxPackage}}.ws.rs.core.Response; import {{javaxPackage}}.ws.rs.core.SecurityContext; {{#useBeanValidation}} import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} {{>generatedAnnotation}} {{#operations}} diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/apiServiceImpl.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/apiServiceImpl.mustache index f6243396d88e..145e7fcf93cc 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/apiServiceImpl.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/apiServiceImpl.mustache @@ -20,6 +20,7 @@ import {{javaxPackage}}.ws.rs.core.Response; import {{javaxPackage}}.ws.rs.core.SecurityContext; {{#useBeanValidation}} import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} {{>generatedAnnotation}} {{#operations}} diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/apiServiceImpl.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/apiServiceImpl.mustache index 484b1cec942c..577f9b165e8b 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/apiServiceImpl.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/apiServiceImpl.mustache @@ -13,6 +13,10 @@ import {{package}}.NotFoundException; import java.io.InputStream; +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; +{{/useBeanValidation}} import {{javaxPackage}}.enterprise.context.RequestScoped; import {{javaxPackage}}.ws.rs.core.Response; import {{javaxPackage}}.ws.rs.core.SecurityContext; diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/apiServiceImpl.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/apiServiceImpl.mustache index 0035baccec7f..3488840a4627 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/apiServiceImpl.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/apiServiceImpl.mustache @@ -12,6 +12,10 @@ import java.util.List; import java.io.InputStream; +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; +{{/useBeanValidation}} import {{javaxPackage}}.ws.rs.core.Response; import {{javaxPackage}}.ws.rs.core.SecurityContext; diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/model.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/model.mustache index 6de67ac4fb17..ac974f01c9b9 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/model.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/model.mustache @@ -9,6 +9,7 @@ import java.io.Serializable; {{/serializableModel}} {{#useBeanValidation}} import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} {{#models}} {{#model}} diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/model.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/model.mustache index 6de67ac4fb17..ac974f01c9b9 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/model.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/model.mustache @@ -9,6 +9,7 @@ import java.io.Serializable; {{/serializableModel}} {{#useBeanValidation}} import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} {{#models}} {{#model}} diff --git a/modules/openapi-generator/src/main/resources/JavaPlayFramework/newApi.mustache b/modules/openapi-generator/src/main/resources/JavaPlayFramework/newApi.mustache index bf3cf9d4c014..646364fd2532 100644 --- a/modules/openapi-generator/src/main/resources/JavaPlayFramework/newApi.mustache +++ b/modules/openapi-generator/src/main/resources/JavaPlayFramework/newApi.mustache @@ -16,6 +16,7 @@ import java.util.concurrent.CompletableFuture; {{/supportAsync}} {{#useBeanValidation}} import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} {{>generatedAnnotation}} {{#operations}} diff --git a/modules/openapi-generator/src/main/resources/JavaPlayFramework/newApiController.mustache b/modules/openapi-generator/src/main/resources/JavaPlayFramework/newApiController.mustache index f9c14cbde1cf..c7e3dcc271e6 100644 --- a/modules/openapi-generator/src/main/resources/JavaPlayFramework/newApiController.mustache +++ b/modules/openapi-generator/src/main/resources/JavaPlayFramework/newApiController.mustache @@ -32,6 +32,7 @@ import java.util.concurrent.CompletableFuture; {{#useBeanValidation}} import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; import com.typesafe.config.Config; {{/useBeanValidation}} diff --git a/modules/openapi-generator/src/main/resources/JavaPlayFramework/newApiInterface.mustache b/modules/openapi-generator/src/main/resources/JavaPlayFramework/newApiInterface.mustache index 4328f6292103..a7f44d4d8a67 100644 --- a/modules/openapi-generator/src/main/resources/JavaPlayFramework/newApiInterface.mustache +++ b/modules/openapi-generator/src/main/resources/JavaPlayFramework/newApiInterface.mustache @@ -26,6 +26,7 @@ import java.util.concurrent.CompletableFuture; {{#useBeanValidation}} import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} {{#operations}} diff --git a/modules/openapi-generator/src/main/resources/JavaPlayFramework/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaPlayFramework/pojo.mustache index fdd159e7e174..dfb6062aeb4d 100644 --- a/modules/openapi-generator/src/main/resources/JavaPlayFramework/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaPlayFramework/pojo.mustache @@ -1,6 +1,7 @@ import java.util.Objects; {{#useBeanValidation}} import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} /** * {{description}}{{^description}}{{classname}}{{/description}} diff --git a/modules/openapi-generator/src/main/resources/java-helidon/server/libraries/se/model.mustache b/modules/openapi-generator/src/main/resources/java-helidon/server/libraries/se/model.mustache index dbe0359ada42..14b9e283fda8 100644 --- a/modules/openapi-generator/src/main/resources/java-helidon/server/libraries/se/model.mustache +++ b/modules/openapi-generator/src/main/resources/java-helidon/server/libraries/se/model.mustache @@ -2,6 +2,10 @@ package {{package}}; {{#imports}}import {{import}}; {{/imports}} +{{#useBeanValidation}} +import {{rootJavaEEPackage}}.validation.constraints.*; +import {{rootJavaEEPackage}}.validation.Valid; +{{/useBeanValidation}} {{#models}} {{#model}}{{#isEnum}} {{>enumOuterClass}}{{/isEnum}}{{^isEnum}} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaValidationArrayPrimitivesTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaValidationArrayPrimitivesTest.java new file mode 100644 index 000000000000..7d20e42b195b --- /dev/null +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaValidationArrayPrimitivesTest.java @@ -0,0 +1,410 @@ +/* + * Copyright 2022 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.java; + +import io.swagger.parser.OpenAPIParser; +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.parser.core.models.ParseOptions; +import org.openapitools.codegen.ClientOptInput; +import org.openapitools.codegen.CodegenConstants; +import org.openapitools.codegen.DefaultGenerator; +import org.openapitools.codegen.java.assertions.JavaFileAssert; +import org.openapitools.codegen.languages.*; +import org.testng.annotations.DataProvider; +import org.testng.annotations.Test; + +import java.io.File; +import java.io.IOException; +import java.nio.file.Files; +import java.util.Map; +import java.util.function.Consumer; +import java.util.function.Function; +import java.util.stream.Collectors; + +public class JavaValidationArrayPrimitivesTest { + private static Consumer> assertWithValidationWithoutJsonNullable() { + return files -> JavaFileAssert.assertThat(files.get("Foo.java")) + .isNormalClass() + .hasProperty("stringPattern") + .withType("Set<@Pattern(regexp = \"[a-z]\") String>") + .toType() + .hasProperty("stringMaxMinLength") + .withType("Set<@Size(min = 1, max = 10) String>") + .toType() + .hasProperty("stringMinLength") + .withType("List<@Size(min = 1) String>") + .toType() + .hasProperty("stringMaxLength") + .withType("Set<@Size(max = 1) String>") + .toType() + .hasProperty("stringEmail") + .withType("List<@Email String>") + .toType() + .hasProperty("intMinMax") + .withType("List<@Min(1) @Max(10) Integer>") + .toType() + .hasProperty("intMin") + .withType("List<@Min(1) Integer>") + .toType() + .hasProperty("intMax") + .withType("List<@Max(10) Integer>") + .toType() + .hasProperty("numberMinMax") + .withType("List<@DecimalMin(value = \"1\", inclusive = false) @DecimalMax(value = \"10\", inclusive = false) BigDecimal>") + .toType() + .hasProperty("numberMin") + .withType("List<@DecimalMin(value = \"1\", inclusive = false) BigDecimal>") + .toType() + .hasProperty("numberMax") + .withType("List<@DecimalMax(value = \"10\", inclusive = false) BigDecimal>") + .toType() + .hasProperty("stringPatternWithMin") + .withType("Set<@Pattern(regexp = \"^\\\\d{3}-\\\\d{2}-\\\\d{4}$\") @Size(min = 10) String>") + .toType() + .hasProperty("stringPatternNullable") + .withType("Set<@Pattern(regexp = \"^\\\\d{3}-\\\\d{2}-\\\\d{4}$\") String>") + .toType() + .hasProperty("stringMaxMinLengthNullable") + .withType("Set<@Size(min = 1, max = 10) String>") + .toType() + .hasProperty("stringMinLengthNullable") + .withType("List<@Size(min = 1) String>") + .toType() + .hasProperty("stringMaxLengthNullable") + .withType("Set<@Size(max = 1) String>") + .toType() + .hasProperty("stringNumbers") + .withType("Set<@DecimalMin(value = \"1\", inclusive = false) @DecimalMax(value = \"10\", inclusive = false) BigDecimal>") + .toType() + .hasProperty("intMinMaxNullable") + .withType("List<@Min(1) @Max(10) Integer>") + .toType() + .hasProperty("intMinNullable") + .withType("List<@Min(1) Integer>") + .toType() + .hasProperty("intMaxNullable") + .withType("List<@Max(10) Integer>") + .toType() + .hasProperty("numberMinMaxNullable") + .withType("List<@DecimalMin(value = \"1\", inclusive = false) @DecimalMax(value = \"10\", inclusive = false) BigDecimal>") + .toType() + .hasProperty("numberMinNullable") + .withType("List<@DecimalMin(value = \"1\", inclusive = false) BigDecimal>") + .toType() + .hasProperty("numberMaxNullable") + .withType("List<@DecimalMax(value = \"10\", inclusive = true) BigDecimal>") + .toType(); + } + + private static Consumer> assertWithValidationWithJsonNullable() { + return files -> JavaFileAssert.assertThat(files.get("Foo.java")) + .isNormalClass() + .hasProperty("stringPattern") + .withType("Set<@Pattern(regexp = \"[a-z]\") String>") + .toType() + .hasProperty("stringMaxMinLength") + .withType("Set<@Size(min = 1, max = 10) String>") + .toType() + .hasProperty("stringMinLength") + .withType("List<@Size(min = 1) String>") + .toType() + .hasProperty("stringMaxLength") + .withType("Set<@Size(max = 1) String>") + .toType() + .hasProperty("stringEmail") + .withType("List<@Email String>") + .toType() + .hasProperty("intMinMax") + .withType("List<@Min(1) @Max(10) Integer>") + .toType() + .hasProperty("intMin") + .withType("List<@Min(1) Integer>") + .toType() + .hasProperty("intMax") + .withType("List<@Max(10) Integer>") + .toType() + .hasProperty("numberMinMax") + .withType("List<@DecimalMin(value = \"1\", inclusive = false) @DecimalMax(value = \"10\", inclusive = false) BigDecimal>") + .toType() + .hasProperty("numberMin") + .withType("List<@DecimalMin(value = \"1\", inclusive = false) BigDecimal>") + .toType() + .hasProperty("numberMax") + .withType("List<@DecimalMax(value = \"10\", inclusive = false) BigDecimal>") + .toType() + .hasProperty("stringPatternWithMin") + .withType("JsonNullable>") + .toType() + .hasProperty("stringPatternNullable") + .withType("JsonNullable>") + .toType() + .hasProperty("stringMaxMinLengthNullable") + .withType("JsonNullable>") + .toType() + .hasProperty("stringMinLengthNullable") + .withType("JsonNullable>") + .toType() + .hasProperty("stringMaxLengthNullable") + .withType("JsonNullable>") + .toType() + .hasProperty("stringNumbers") + .withType("Set<@DecimalMin(value = \"1\", inclusive = false) @DecimalMax(value = \"10\", inclusive = false) BigDecimal>") + .toType() + .hasProperty("intMinMaxNullable") + .withType("JsonNullable>") + .toType() + .hasProperty("intMinNullable") + .withType("JsonNullable>") + .toType() + .hasProperty("intMaxNullable") + .withType("JsonNullable>") + .toType() + .hasProperty("numberMinMaxNullable") + .withType("JsonNullable>") + .toType() + .hasProperty("numberMinNullable") + .withType("JsonNullable>") + .toType() + .hasProperty("numberMaxNullable") + .withType("JsonNullable>") + .toType(); + } + + @DataProvider(name = "javaCodegensUsedBeanValidation") + public static Object[][] javaCodegensUsedBeanValidation() { + return new Object[][]{ + {new JavaCXFClientCodegen(), assertWithValidationWithoutJsonNullable()}, + {new JavaClientCodegen(), assertWithValidationWithoutJsonNullable()}, + {new JavaPlayFrameworkCodegen(), assertWithValidationWithoutJsonNullable()}, + {new JavaMicronautClientCodegen(), assertWithValidationWithoutJsonNullable()}, + {new JavaMicronautServerCodegen(), assertWithValidationWithoutJsonNullable()}, + {new JavaJAXRSCXFCDIServerCodegen(), assertWithValidationWithoutJsonNullable()}, + {new JavaCXFExtServerCodegen(), assertWithValidationWithoutJsonNullable()}, + {new JavaResteasyServerCodegen(), assertWithValidationWithoutJsonNullable()}, + {new JavaJAXRSSpecServerCodegen(), assertWithValidationWithoutJsonNullable()}, + {new JavaJerseyServerCodegen(), assertWithValidationWithoutJsonNullable()}, + {new JavaResteasyEapServerCodegen(), assertWithValidationWithoutJsonNullable()}, + {new SpringCodegen(), assertWithValidationWithJsonNullable()} + }; + } + + @Test(dataProvider = "javaCodegensUsedBeanValidation") + public void shouldAddValidAnnotationIntoCollectionWhenBeanValidationIsEnabled_issue4947(final AbstractJavaCodegen codegen, final Consumer> asserts) throws IOException { + File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); + output.deleteOnExit(); + + final OpenAPI openAPI = new OpenAPIParser() + .readLocation("src/test/resources/bugs/issue_4947.yaml", null, new ParseOptions()).getOpenAPI(); + codegen.setOutputDir(output.getAbsolutePath()); + codegen.additionalProperties().put(SpringCodegen.USE_BEANVALIDATION, "true"); + codegen.additionalProperties().put(CodegenConstants.MODEL_PACKAGE, "xyz.model"); + codegen.additionalProperties().put(CodegenConstants.API_PACKAGE, "xyz.controller"); + + final ClientOptInput input = new ClientOptInput() + .openAPI(openAPI) + .config(codegen); + + final DefaultGenerator generator = new DefaultGenerator(); + final Map files = generator.opts(input).generate().stream() + .collect(Collectors.toMap(File::getName, Function.identity())); + + asserts.accept(files); + } + + private static Consumer> assertWithoutValidationWithoutJsonNullable() { + return files -> JavaFileAssert.assertThat(files.get("Foo.java")) + .isNormalClass() + .hasProperty("stringPattern") + .withType("Set") + .toType() + .hasProperty("stringMaxMinLength") + .withType("Set") + .toType() + .hasProperty("stringMinLength") + .withType("List") + .toType() + .hasProperty("stringMaxLength") + .withType("Set") + .toType() + .hasProperty("stringEmail") + .withType("List") + .toType() + .hasProperty("intMinMax") + .withType("List") + .toType() + .hasProperty("intMin") + .withType("List") + .toType() + .hasProperty("intMax") + .withType("List") + .toType() + .hasProperty("numberMinMax") + .withType("List") + .toType() + .hasProperty("numberMin") + .withType("List") + .toType() + .hasProperty("numberMax") + .withType("List") + .toType() + .hasProperty("stringPatternWithMin") + .withType("Set") + .toType() + .hasProperty("stringPatternNullable") + .withType("Set") + .toType() + .hasProperty("stringMaxMinLengthNullable") + .withType("Set") + .toType() + .hasProperty("stringMinLengthNullable") + .withType("List") + .toType() + .hasProperty("stringMaxLengthNullable") + .withType("Set") + .toType() + .hasProperty("intMinMaxNullable") + .withType("List") + .toType() + .hasProperty("intMinNullable") + .withType("List") + .toType() + .hasProperty("intMaxNullable") + .withType("List") + .toType() + .hasProperty("numberMinMaxNullable") + .withType("List") + .toType() + .hasProperty("numberMinNullable") + .withType("List") + .toType() + .hasProperty("numberMaxNullable") + .withType("List") + .toType(); + } + + private static Consumer> assertWithoutValidationWithJsonNullable() { + return files -> JavaFileAssert.assertThat(files.get("Foo.java")) + .isNormalClass() + .hasProperty("stringPattern") + .withType("Set") + .toType() + .hasProperty("stringMaxMinLength") + .withType("Set") + .toType() + .hasProperty("stringMinLength") + .withType("List") + .toType() + .hasProperty("stringMaxLength") + .withType("Set") + .toType() + .hasProperty("stringEmail") + .withType("List") + .toType() + .hasProperty("intMinMax") + .withType("List") + .toType() + .hasProperty("intMin") + .withType("List") + .toType() + .hasProperty("intMax") + .withType("List") + .toType() + .hasProperty("numberMinMax") + .withType("List") + .toType() + .hasProperty("numberMin") + .withType("List") + .toType() + .hasProperty("numberMax") + .withType("List") + .toType() + .hasProperty("stringPatternWithMin") + .withType("JsonNullable>") + .toType() + .hasProperty("stringPatternNullable") + .withType("JsonNullable>") + .toType() + .hasProperty("stringMaxMinLengthNullable") + .withType("JsonNullable>") + .toType() + .hasProperty("stringMinLengthNullable") + .withType("JsonNullable>") + .toType() + .hasProperty("stringMaxLengthNullable") + .withType("JsonNullable>") + .toType() + .hasProperty("intMinMaxNullable") + .withType("JsonNullable>") + .toType() + .hasProperty("intMinNullable") + .withType("JsonNullable>") + .toType() + .hasProperty("intMaxNullable") + .withType("JsonNullable>") + .toType() + .hasProperty("numberMinMaxNullable") + .withType("JsonNullable>") + .toType() + .hasProperty("numberMinNullable") + .withType("JsonNullable>") + .toType() + .hasProperty("numberMaxNullable") + .withType("JsonNullable>") + .toType(); + } + + @DataProvider(name = "javaCodegensNotUsedBeanValidation") + public static Object[][] javaCodegensNotUsedBeanValidation() { + return new Object[][]{ + {new JavaCXFClientCodegen(), assertWithoutValidationWithoutJsonNullable()}, + {new JavaClientCodegen(), assertWithoutValidationWithoutJsonNullable()}, + {new JavaPlayFrameworkCodegen(), assertWithoutValidationWithoutJsonNullable()}, + {new JavaMicronautClientCodegen(), assertWithoutValidationWithoutJsonNullable()}, + {new JavaMicronautServerCodegen(), assertWithoutValidationWithoutJsonNullable()}, + {new JavaJAXRSCXFCDIServerCodegen(), assertWithoutValidationWithoutJsonNullable()}, + {new JavaCXFExtServerCodegen(), assertWithoutValidationWithoutJsonNullable()}, + {new JavaResteasyServerCodegen(), assertWithoutValidationWithoutJsonNullable()}, + {new JavaJAXRSSpecServerCodegen(), assertWithoutValidationWithoutJsonNullable()}, + {new JavaJerseyServerCodegen(), assertWithoutValidationWithoutJsonNullable()}, + {new JavaResteasyEapServerCodegen(), assertWithoutValidationWithoutJsonNullable()}, + {new SpringCodegen(), assertWithoutValidationWithJsonNullable()} + }; + } + + @Test(dataProvider = "javaCodegensNotUsedBeanValidation") + public void shouldNotAddValidAnnotationIntoCollectionWhenBeanValidationIsNotEnabled_issue4947(final AbstractJavaCodegen codegen, final Consumer> asserts) throws IOException { + File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); + output.deleteOnExit(); + + final OpenAPI openAPI = new OpenAPIParser() + .readLocation("src/test/resources/bugs/issue_4947.yaml", null, new ParseOptions()).getOpenAPI(); + codegen.setOutputDir(output.getAbsolutePath()); + codegen.additionalProperties().put(CodegenConstants.MODEL_PACKAGE, "xyz.model"); + codegen.additionalProperties().put(CodegenConstants.API_PACKAGE, "xyz.controller"); + codegen.additionalProperties().put(SpringCodegen.USE_BEANVALIDATION, "false"); + + final ClientOptInput input = new ClientOptInput() + .openAPI(openAPI) + .config(codegen); + + final DefaultGenerator generator = new DefaultGenerator(); + final Map files = generator.opts(input).generate().stream() + .collect(Collectors.toMap(File::getName, Function.identity())); + + asserts.accept(files); + } +} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java index ae01734ec88d..60a3b05b91ca 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java @@ -946,7 +946,7 @@ public void shouldAddValidAnnotationIntoCollectionWhenBeanValidationIsEnabled_is .withType( "Map" ) .toType() .hasProperty("response") - .withType( "JsonNullable>" ) + .withType( "JsonNullable>" ) .toType() .hasProperty("nullableDtos") .withType( "JsonNullable>" ) diff --git a/modules/openapi-generator/src/test/resources/bugs/issue_4947.yaml b/modules/openapi-generator/src/test/resources/bugs/issue_4947.yaml new file mode 100644 index 000000000000..003ad599c992 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/bugs/issue_4947.yaml @@ -0,0 +1,176 @@ +openapi: 3.0.3 +info: + title: Test Issue + version: v1 +paths: + /test: + get: + responses: + '200': + description: default response + content: + '*/*': + schema: + $ref: '#/components/schemas/Foo' +components: + schemas: + Foo: + type: object + properties: + stringPattern: + type: array + uniqueItems: true + items: + type: string + pattern: "[a-z]" + stringMaxMinLength: + type: array + uniqueItems: true + items: + type: string + minLength: 1 + maxLength: 10 + maxItems: 10 + stringMinLength: + type: array + items: + type: string + minLength: 1 + maxItems: 10 + stringMaxLength: + type: array + uniqueItems: true + items: + type: string + maxLength: 1 + maxItems: 10 + stringEmail: + type: array + items: + type: string + format: email + intMinMax: + type: array + items: + type: integer + minimum: 1 + maximum: 10 + intMin: + type: array + items: + type: integer + minimum: 1 + intMax: + type: array + items: + type: integer + maximum: 10 + numberMinMax: + type: array + items: + type: number + minimum: 1 + maximum: 10 + numberMin: + type: array + items: + type: number + minimum: 1 + numberMax: + type: array + items: + type: number + maximum: 10 + stringPatternWithMin: + nullable: true + type: array + uniqueItems: true + items: + type: string + minLength: 10 + pattern: '^\d{3}-\d{2}-\d{4}$' + stringPatternNullable: + nullable: true + type: array + uniqueItems: true + items: + type: string + pattern: '^\d{3}-\d{2}-\d{4}$' + stringMaxMinLengthNullable: + nullable: true + type: array + uniqueItems: true + items: + type: string + minLength: 1 + maxLength: 10 + maxItems: 10 + stringMinLengthNullable: + nullable: true + type: array + items: + type: string + minLength: 1 + maxItems: 10 + stringMaxLengthNullable: + nullable: true + type: array + uniqueItems: true + items: + type: string + maxLength: 1 + maxItems: 10 + stringNumbers: + type: array + uniqueItems: true + items: + type: string + format: number + minimum: 1 + maximum: 10 + maxItems: 10 + stringEmailNullable: + nullable: true + type: array + items: + type: string + format: email + intMinMaxNullable: + nullable: true + type: array + items: + type: integer + minimum: 1 + maximum: 10 + intMinNullable: + nullable: true + type: array + items: + type: integer + minimum: 1 + intMaxNullable: + nullable: true + type: array + items: + type: integer + maximum: 10 + numberMinMaxNullable: + nullable: true + type: array + items: + type: number + minimum: 1 + maximum: 10 + numberMinNullable: + nullable: true + type: array + items: + type: number + minimum: 1 + numberMaxNullable: + nullable: true + type: array + items: + type: number + maximum: 10 + exclusiveMaximum: true diff --git a/samples/client/petstore/java-micronaut-client/docs/apis/UserApi.md b/samples/client/petstore/java-micronaut-client/docs/apis/UserApi.md index bb760808f4df..ca85889bcf5e 100644 --- a/samples/client/petstore/java-micronaut-client/docs/apis/UserApi.md +++ b/samples/client/petstore/java-micronaut-client/docs/apis/UserApi.md @@ -77,7 +77,7 @@ Creates list of users with given input array ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **_body** | [**List<User>**](User.md)| List of user object | | +| **_body** | [**List<@Valid User>**](User.md)| List of user object | | @@ -99,7 +99,7 @@ Creates list of users with given input array ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **_body** | [**List<User>**](User.md)| List of user object | | +| **_body** | [**List<@Valid User>**](User.md)| List of user object | | diff --git a/samples/client/petstore/java-micronaut-client/docs/models/ArrayTest.md b/samples/client/petstore/java-micronaut-client/docs/models/ArrayTest.md index 3f3ec33c736e..c95e61a50f59 100644 --- a/samples/client/petstore/java-micronaut-client/docs/models/ArrayTest.md +++ b/samples/client/petstore/java-micronaut-client/docs/models/ArrayTest.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **arrayOfString** | `List<String>` | | [optional property] **arrayArrayOfInteger** | `List<List<Long>>` | | [optional property] -**arrayArrayOfModel** | `List<List<ReadOnlyFirst>>` | | [optional property] +**arrayArrayOfModel** | `List<List<@Valid ReadOnlyFirst>>` | | [optional property] diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/UserApi.java index fc76d17cfd6e..524a2eb2c58a 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/UserApi.java @@ -48,7 +48,7 @@ Mono createUser( */ @Post(uri="/user/createWithArray") Mono createUsersWithArrayInput( - @Body @NotNull List _body + @Body @NotNull List<@Valid User> _body ); /** @@ -58,7 +58,7 @@ Mono createUsersWithArrayInput( */ @Post(uri="/user/createWithList") Mono createUsersWithListInput( - @Body @NotNull List _body + @Body @NotNull List<@Valid User> _body ); /** diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ArrayTest.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ArrayTest.java index 0b0d73bea2e1..9dcb6ea376ae 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ArrayTest.java @@ -44,7 +44,7 @@ public class ArrayTest { private List> arrayArrayOfInteger = null; public static final String JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL = "array_array_of_model"; - private List> arrayArrayOfModel = null; + private List> arrayArrayOfModel = null; public ArrayTest() { } @@ -108,12 +108,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 arrayArrayOfModelItem) { + public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) { if (this.arrayArrayOfModel == null) { this.arrayArrayOfModel = new ArrayList<>(); } @@ -128,13 +128,13 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI @Nullable @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List> getArrayArrayOfModel() { + public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setArrayArrayOfModel(List> arrayArrayOfModel) { + public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 7e964895e156..4a4421313811 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -40,7 +40,7 @@ public class FileSchemaTestClass { private ModelFile _file; public static final String JSON_PROPERTY_FILES = "files"; - private List files = null; + private List<@Valid ModelFile> files = null; public FileSchemaTestClass() { } @@ -67,7 +67,7 @@ public void setFile(ModelFile _file) { this._file = _file; } - public FileSchemaTestClass files(List files) { + public FileSchemaTestClass files(List<@Valid ModelFile> files) { this.files = files; return this; } @@ -87,13 +87,13 @@ public FileSchemaTestClass addFilesItem(ModelFile filesItem) { @Nullable @JsonProperty(JSON_PROPERTY_FILES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFiles() { + public List<@Valid ModelFile> getFiles() { return files; } @JsonProperty(JSON_PROPERTY_FILES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { + public void setFiles(List<@Valid ModelFile> files) { this.files = files; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Pet.java index 4f4db37b47bc..19afe15d87de 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Pet.java @@ -57,7 +57,7 @@ public class Pet { private Set photoUrls = new LinkedHashSet<>(); public static final String JSON_PROPERTY_TAGS = "tags"; - private List tags = null; + private List<@Valid Tag> tags = null; /** * pet status in the store @@ -193,7 +193,7 @@ public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List tags) { + public Pet tags(List<@Valid Tag> tags) { this.tags = tags; return this; } @@ -213,13 +213,13 @@ public Pet addTagsItem(Tag tagsItem) { @Nullable @JsonProperty(JSON_PROPERTY_TAGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { + public List<@Valid Tag> getTags() { return tags; } @JsonProperty(JSON_PROPERTY_TAGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTags(List tags) { + public void setTags(List<@Valid Tag> tags) { this.tags = tags; } diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/ArrayTest.md b/samples/client/petstore/java/rest-assured-jackson/docs/ArrayTest.md index 36077c9df300..ae2672809aa9 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/ArrayTest.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/ArrayTest.md @@ -9,7 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**arrayOfString** | **List<String>** | | [optional] | |**arrayArrayOfInteger** | **List<List<Long>>** | | [optional] | -|**arrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] | +|**arrayArrayOfModel** | **List<List<@Valid ReadOnlyFirst>>** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/UserApi.md b/samples/client/petstore/java/rest-assured-jackson/docs/UserApi.md index 8d4dfba9ff41..87fb20faa572 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/UserApi.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/UserApi.md @@ -81,7 +81,7 @@ api.createUsersWithArrayInput() | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**List<User>**](User.md)| List of user object | | +| **body** | [**List<@Valid User>**](User.md)| List of user object | | ### Return type @@ -121,7 +121,7 @@ api.createUsersWithListInput() | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**List<User>**](User.md)| List of user object | | +| **body** | [**List<@Valid User>**](User.md)| List of user object | | ### Return type diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index 4beb2b367149..4dfb005c9938 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -28,6 +28,9 @@ import io.restassured.http.Method; import io.restassured.response.Response; +import javax.validation.constraints.*; +import javax.validation.Valid; + import java.lang.reflect.Type; import java.util.function.Consumer; import java.util.function.Function; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/FakeApi.java index 47e5b6b62cdd..76fce0633b27 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/FakeApi.java @@ -35,6 +35,9 @@ import io.restassured.http.Method; import io.restassured.response.Response; +import javax.validation.constraints.*; +import javax.validation.Valid; + import java.lang.reflect.Type; import java.util.function.Consumer; import java.util.function.Function; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index 7df98f1d91d4..d00177e63313 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -27,6 +27,9 @@ import io.restassured.http.Method; import io.restassured.response.Response; +import javax.validation.constraints.*; +import javax.validation.Valid; + import java.lang.reflect.Type; import java.util.function.Consumer; import java.util.function.Function; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/PetApi.java index cf5a6a11f415..2bebdbf853cd 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/PetApi.java @@ -30,6 +30,9 @@ import io.restassured.http.Method; import io.restassured.response.Response; +import javax.validation.constraints.*; +import javax.validation.Valid; + import java.lang.reflect.Type; import java.util.function.Consumer; import java.util.function.Function; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/StoreApi.java index 730db2d87b7a..2894f03e56b2 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/StoreApi.java @@ -27,6 +27,9 @@ import io.restassured.http.Method; import io.restassured.response.Response; +import javax.validation.constraints.*; +import javax.validation.Valid; + import java.lang.reflect.Type; import java.util.function.Consumer; import java.util.function.Function; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/UserApi.java index da04feeb5372..ec2869045566 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/UserApi.java @@ -28,6 +28,9 @@ import io.restassured.http.Method; import io.restassured.response.Response; +import javax.validation.constraints.*; +import javax.validation.Valid; + import java.lang.reflect.Type; import java.util.function.Consumer; import java.util.function.Function; @@ -204,10 +207,10 @@ public T execute(Function handler) { } /** - * @param body (List<User>) List of user object (required) + * @param body (List<@Valid User>) List of user object (required) * @return operation */ - public CreateUsersWithArrayInputOper body(List body) { + public CreateUsersWithArrayInputOper body(List<@Valid User> body) { reqSpec.setBody(body); return this; } @@ -265,10 +268,10 @@ public T execute(Function handler) { } /** - * @param body (List<User>) List of user object (required) + * @param body (List<@Valid User>) List of user object (required) * @return operation */ - public CreateUsersWithListInputOper body(List body) { + public CreateUsersWithListInputOper body(List<@Valid User> body) { reqSpec.setBody(body); return this; } diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ArrayTest.java index c6de0aba2175..fb4fd954d50c 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -47,7 +47,7 @@ public class ArrayTest { private List> arrayArrayOfInteger; public static final String JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL = "array_array_of_model"; - private List> arrayArrayOfModel; + private List> arrayArrayOfModel; public ArrayTest() { } @@ -123,13 +123,13 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } - public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { + public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) { if (this.arrayArrayOfModel == null) { this.arrayArrayOfModel = new ArrayList<>(); } @@ -147,14 +147,14 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List> getArrayArrayOfModel() { + public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setArrayArrayOfModel(List> arrayArrayOfModel) { + public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index baf04c9f83e6..2ec49a7e8b0b 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -43,7 +43,7 @@ public class FileSchemaTestClass { private ModelFile _file; public static final String JSON_PROPERTY_FILES = "files"; - private List files; + private List<@Valid ModelFile> files; public FileSchemaTestClass() { } @@ -76,7 +76,7 @@ public void setFile(ModelFile _file) { } - public FileSchemaTestClass files(List files) { + public FileSchemaTestClass files(List<@Valid ModelFile> files) { this.files = files; return this; @@ -100,14 +100,14 @@ public FileSchemaTestClass addFilesItem(ModelFile filesItem) { @JsonProperty(JSON_PROPERTY_FILES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFiles() { + public List<@Valid ModelFile> getFiles() { return files; } @JsonProperty(JSON_PROPERTY_FILES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { + public void setFiles(List<@Valid ModelFile> files) { this.files = files; } diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Pet.java index d7f9218f5eae..dd787c5dd702 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/Pet.java @@ -60,7 +60,7 @@ public class Pet { private Set photoUrls = new LinkedHashSet<>(); public static final String JSON_PROPERTY_TAGS = "tags"; - private List tags; + private List<@Valid Tag> tags; /** * pet status in the store @@ -225,7 +225,7 @@ public void setPhotoUrls(Set photoUrls) { } - public Pet tags(List tags) { + public Pet tags(List<@Valid Tag> tags) { this.tags = tags; return this; @@ -249,14 +249,14 @@ public Pet addTagsItem(Tag tagsItem) { @JsonProperty(JSON_PROPERTY_TAGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { + public List<@Valid Tag> getTags() { return tags; } @JsonProperty(JSON_PROPERTY_TAGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTags(List tags) { + public void setTags(List<@Valid Tag> tags) { this.tags = tags; } diff --git a/samples/client/petstore/java/rest-assured/docs/ArrayTest.md b/samples/client/petstore/java/rest-assured/docs/ArrayTest.md index 36077c9df300..ae2672809aa9 100644 --- a/samples/client/petstore/java/rest-assured/docs/ArrayTest.md +++ b/samples/client/petstore/java/rest-assured/docs/ArrayTest.md @@ -9,7 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**arrayOfString** | **List<String>** | | [optional] | |**arrayArrayOfInteger** | **List<List<Long>>** | | [optional] | -|**arrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] | +|**arrayArrayOfModel** | **List<List<@Valid ReadOnlyFirst>>** | | [optional] | diff --git a/samples/client/petstore/java/rest-assured/docs/UserApi.md b/samples/client/petstore/java/rest-assured/docs/UserApi.md index 8d4dfba9ff41..87fb20faa572 100644 --- a/samples/client/petstore/java/rest-assured/docs/UserApi.md +++ b/samples/client/petstore/java/rest-assured/docs/UserApi.md @@ -81,7 +81,7 @@ api.createUsersWithArrayInput() | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**List<User>**](User.md)| List of user object | | +| **body** | [**List<@Valid User>**](User.md)| List of user object | | ### Return type @@ -121,7 +121,7 @@ api.createUsersWithListInput() | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**List<User>**](User.md)| List of user object | | +| **body** | [**List<@Valid User>**](User.md)| List of user object | | ### Return type diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index dcf36d88183e..52e88b2db2bd 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -28,6 +28,9 @@ import io.restassured.http.Method; import io.restassured.response.Response; +import javax.validation.constraints.*; +import javax.validation.Valid; + import java.lang.reflect.Type; import java.util.function.Consumer; import java.util.function.Function; diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/FakeApi.java index 850217b7edc1..842d9fa2bc80 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/FakeApi.java @@ -35,6 +35,9 @@ import io.restassured.http.Method; import io.restassured.response.Response; +import javax.validation.constraints.*; +import javax.validation.Valid; + import java.lang.reflect.Type; import java.util.function.Consumer; import java.util.function.Function; diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index 12178fc04bd4..0447c8a88c67 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -27,6 +27,9 @@ import io.restassured.http.Method; import io.restassured.response.Response; +import javax.validation.constraints.*; +import javax.validation.Valid; + import java.lang.reflect.Type; import java.util.function.Consumer; import java.util.function.Function; diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/PetApi.java index 24567d7becf4..8846a084ec08 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/PetApi.java @@ -30,6 +30,9 @@ import io.restassured.http.Method; import io.restassured.response.Response; +import javax.validation.constraints.*; +import javax.validation.Valid; + import java.lang.reflect.Type; import java.util.function.Consumer; import java.util.function.Function; diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/StoreApi.java index fd1abe4db3c5..e6281a0a34e8 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/StoreApi.java @@ -27,6 +27,9 @@ import io.restassured.http.Method; import io.restassured.response.Response; +import javax.validation.constraints.*; +import javax.validation.Valid; + import java.lang.reflect.Type; import java.util.function.Consumer; import java.util.function.Function; diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/UserApi.java index f2babb7cb22b..dfd991dc96c1 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/UserApi.java @@ -28,6 +28,9 @@ import io.restassured.http.Method; import io.restassured.response.Response; +import javax.validation.constraints.*; +import javax.validation.Valid; + import java.lang.reflect.Type; import java.util.function.Consumer; import java.util.function.Function; @@ -205,10 +208,10 @@ public T execute(Function handler) { } /** - * @param body (List<User>) List of user object (required) + * @param body (List<@Valid User>) List of user object (required) * @return operation */ - public CreateUsersWithArrayInputOper body(List body) { + public CreateUsersWithArrayInputOper body(List<@Valid User> body) { reqSpec.setBody(body); return this; } @@ -266,10 +269,10 @@ public T execute(Function handler) { } /** - * @param body (List<User>) List of user object (required) + * @param body (List<@Valid User>) List of user object (required) * @return operation */ - public CreateUsersWithListInputOper body(List body) { + public CreateUsersWithListInputOper body(List<@Valid User> body) { reqSpec.setBody(body); return this; } diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ArrayTest.java index 2898e700a4a5..a29dbe5b7d91 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -44,7 +44,7 @@ public class ArrayTest { public static final String SERIALIZED_NAME_ARRAY_ARRAY_OF_MODEL = "array_array_of_model"; @SerializedName(SERIALIZED_NAME_ARRAY_ARRAY_OF_MODEL) - private List> arrayArrayOfModel; + private List> arrayArrayOfModel; public ArrayTest() { } @@ -112,13 +112,13 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } - public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { + public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) { if (this.arrayArrayOfModel == null) { this.arrayArrayOfModel = new ArrayList<>(); } @@ -134,12 +134,12 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI @Valid - public List> getArrayArrayOfModel() { + public List> getArrayArrayOfModel() { return arrayArrayOfModel; } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { + public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 997bf161b873..a121bcfca136 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -40,7 +40,7 @@ public class FileSchemaTestClass { public static final String SERIALIZED_NAME_FILES = "files"; @SerializedName(SERIALIZED_NAME_FILES) - private List files; + private List<@Valid ModelFile> files; public FileSchemaTestClass() { } @@ -69,7 +69,7 @@ public void setFile(ModelFile _file) { } - public FileSchemaTestClass files(List files) { + public FileSchemaTestClass files(List<@Valid ModelFile> files) { this.files = files; return this; @@ -91,12 +91,12 @@ public FileSchemaTestClass addFilesItem(ModelFile filesItem) { @Valid - public List getFiles() { + public List<@Valid ModelFile> getFiles() { return files; } - public void setFiles(List files) { + public void setFiles(List<@Valid ModelFile> files) { this.files = files; } diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Pet.java index 76aaad0bab8c..b0d3770ba8dd 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Pet.java @@ -55,7 +55,7 @@ public class Pet { public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; + private List<@Valid Tag> tags; /** * pet status in the store @@ -216,7 +216,7 @@ public void setPhotoUrls(Set photoUrls) { } - public Pet tags(List tags) { + public Pet tags(List<@Valid Tag> tags) { this.tags = tags; return this; @@ -238,12 +238,12 @@ public Pet addTagsItem(Tag tagsItem) { @Valid - public List getTags() { + public List<@Valid Tag> getTags() { return tags; } - public void setTags(List tags) { + public void setTags(List<@Valid Tag> tags) { this.tags = tags; } diff --git a/samples/client/petstore/java/retrofit2-play26/docs/ArrayTest.md b/samples/client/petstore/java/retrofit2-play26/docs/ArrayTest.md index 36077c9df300..ae2672809aa9 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/ArrayTest.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/ArrayTest.md @@ -9,7 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**arrayOfString** | **List<String>** | | [optional] | |**arrayArrayOfInteger** | **List<List<Long>>** | | [optional] | -|**arrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] | +|**arrayArrayOfModel** | **List<List<@Valid ReadOnlyFirst>>** | | [optional] | diff --git a/samples/client/petstore/java/retrofit2-play26/docs/UserApi.md b/samples/client/petstore/java/retrofit2-play26/docs/UserApi.md index 8425a5f810ed..c562981ef7f7 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/UserApi.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/UserApi.md @@ -102,7 +102,7 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); UserApi apiInstance = new UserApi(defaultClient); - List body = Arrays.asList(); // List | List of user object + List<@Valid User> body = Arrays.asList(); // List<@Valid User> | List of user object try { apiInstance.createUsersWithArrayInput(body); } catch (ApiException e) { @@ -121,7 +121,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**List<User>**](User.md)| List of user object | | +| **body** | [**List<@Valid User>**](User.md)| List of user object | | ### Return type @@ -165,7 +165,7 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); UserApi apiInstance = new UserApi(defaultClient); - List body = Arrays.asList(); // List | List of user object + List<@Valid User> body = Arrays.asList(); // List<@Valid User> | List of user object try { apiInstance.createUsersWithListInput(body); } catch (ApiException e) { @@ -184,7 +184,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**List<User>**](User.md)| List of user object | | +| **body** | [**List<@Valid User>**](User.md)| List of user object | | ### Return type diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index e613b9b8e09f..05c24d6bdb53 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -12,6 +12,9 @@ import org.openapitools.client.model.Client; import java.util.UUID; +import javax.validation.constraints.*; +import javax.validation.Valid; + import java.util.ArrayList; import java.util.HashMap; import java.util.List; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/FakeApi.java index 6279aae50c8b..3f72d5f3c634 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/FakeApi.java @@ -19,6 +19,9 @@ import org.openapitools.client.model.User; import org.openapitools.client.model.XmlItem; +import javax.validation.constraints.*; +import javax.validation.Valid; + import java.util.ArrayList; import java.util.HashMap; import java.util.List; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index af53baad6ab2..8eda86928f53 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -11,6 +11,9 @@ import org.openapitools.client.model.Client; +import javax.validation.constraints.*; +import javax.validation.Valid; + import java.util.ArrayList; import java.util.HashMap; import java.util.List; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/PetApi.java index ecc66db936ae..b6814c9e916e 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/PetApi.java @@ -14,6 +14,9 @@ import org.openapitools.client.model.Pet; import java.util.Set; +import javax.validation.constraints.*; +import javax.validation.Valid; + import java.util.ArrayList; import java.util.HashMap; import java.util.List; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/StoreApi.java index 361ae3560b54..9904c1fb871e 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/StoreApi.java @@ -11,6 +11,9 @@ import org.openapitools.client.model.Order; +import javax.validation.constraints.*; +import javax.validation.Valid; + import java.util.ArrayList; import java.util.HashMap; import java.util.List; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/UserApi.java index b3729f27abee..e28e7e4f3d42 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/UserApi.java @@ -12,6 +12,9 @@ import java.time.OffsetDateTime; import org.openapitools.client.model.User; +import javax.validation.constraints.*; +import javax.validation.Valid; + import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -40,7 +43,7 @@ CompletionStage> createUser( */ @POST("user/createWithArray") CompletionStage> createUsersWithArrayInput( - @retrofit2.http.Body List body + @retrofit2.http.Body List<@Valid User> body ); /** @@ -51,7 +54,7 @@ CompletionStage> createUsersWithArrayInput( */ @POST("user/createWithList") CompletionStage> createUsersWithListInput( - @retrofit2.http.Body List body + @retrofit2.http.Body List<@Valid User> body ); /** diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ArrayTest.java index 7c664f0ed7c5..0676b9eb693a 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -46,7 +46,7 @@ public class ArrayTest { private List> arrayArrayOfInteger; public static final String JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL = "array_array_of_model"; - private List> arrayArrayOfModel; + private List> arrayArrayOfModel; public ArrayTest() { } @@ -122,13 +122,13 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } - public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { + public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) { if (this.arrayArrayOfModel == null) { this.arrayArrayOfModel = new ArrayList<>(); } @@ -146,14 +146,14 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List> getArrayArrayOfModel() { + public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setArrayArrayOfModel(List> arrayArrayOfModel) { + public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 03cbf4eafabe..f8821d021eb9 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -42,7 +42,7 @@ public class FileSchemaTestClass { private ModelFile _file; public static final String JSON_PROPERTY_FILES = "files"; - private List files; + private List<@Valid ModelFile> files; public FileSchemaTestClass() { } @@ -75,7 +75,7 @@ public void setFile(ModelFile _file) { } - public FileSchemaTestClass files(List files) { + public FileSchemaTestClass files(List<@Valid ModelFile> files) { this.files = files; return this; @@ -99,14 +99,14 @@ public FileSchemaTestClass addFilesItem(ModelFile filesItem) { @JsonProperty(JSON_PROPERTY_FILES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFiles() { + public List<@Valid ModelFile> getFiles() { return files; } @JsonProperty(JSON_PROPERTY_FILES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { + public void setFiles(List<@Valid ModelFile> files) { this.files = files; } diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Pet.java index 467c931fb45e..b937cc816dcd 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/Pet.java @@ -59,7 +59,7 @@ public class Pet { private Set photoUrls = new LinkedHashSet<>(); public static final String JSON_PROPERTY_TAGS = "tags"; - private List tags; + private List<@Valid Tag> tags; /** * pet status in the store @@ -224,7 +224,7 @@ public void setPhotoUrls(Set photoUrls) { } - public Pet tags(List tags) { + public Pet tags(List<@Valid Tag> tags) { this.tags = tags; return this; @@ -248,14 +248,14 @@ public Pet addTagsItem(Tag tagsItem) { @JsonProperty(JSON_PROPERTY_TAGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { + public List<@Valid Tag> getTags() { return tags; } @JsonProperty(JSON_PROPERTY_TAGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTags(List tags) { + public void setTags(List<@Valid Tag> tags) { this.tags = tags; } 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 e5aec5e37e3a..ab273bd2b1cc 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 @@ -94,7 +94,7 @@ ResponseEntity createUser( ) ResponseEntity createUsersWithArrayInput( - @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List user + @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody 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 user + @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user ); 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 50168dc49a50..bb2e1e79540c 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 @@ -84,7 +84,7 @@ ResponseEntity createUser( ) ResponseEntity createUsersWithArrayInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List user + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user ); @@ -114,7 +114,7 @@ ResponseEntity createUsersWithArrayInput( ) ResponseEntity createUsersWithListInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List user + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user ); 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 03b5ab78aa21..6f9f4317875b 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 @@ -75,7 +75,7 @@ ResponseEntity createUser( ) ResponseEntity createUsersWithArrayInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@Valid User> body ); @@ -100,7 +100,7 @@ ResponseEntity createUsersWithArrayInput( ) ResponseEntity createUsersWithListInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@Valid User> body ); 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 50168dc49a50..bb2e1e79540c 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 @@ -84,7 +84,7 @@ ResponseEntity createUser( ) ResponseEntity createUsersWithArrayInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List user + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user ); @@ -114,7 +114,7 @@ ResponseEntity createUsersWithArrayInput( ) ResponseEntity createUsersWithListInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List user + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user ); 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 bcf3175db6a5..5e4e16d957be 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 @@ -58,7 +58,7 @@ ResponseEntity createUser( ) ResponseEntity createUsersWithArrayInput( - @Valid @RequestBody List user + @Valid @RequestBody List<@Valid User> user ); @@ -76,7 +76,7 @@ ResponseEntity createUsersWithArrayInput( ) ResponseEntity createUsersWithListInput( - @Valid @RequestBody List user + @Valid @RequestBody List<@Valid User> user ); 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 8ada5fb4650b..bbbd254ab90e 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 @@ -94,7 +94,7 @@ ResponseEntity createUser( ) ResponseEntity createUsersWithArrayInput( - @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List user + @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody 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 user + @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user ); 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 f167e995aade..86910d865bb6 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 @@ -95,7 +95,7 @@ CompletableFuture> createUser( ) CompletableFuture> createUsersWithArrayInput( - @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List user + @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody 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 user + @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user ); 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 254ffffbd4d7..b675d599bd98 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 @@ -88,7 +88,7 @@ ResponseEntity createUser( ) ResponseEntity createUsersWithArrayInput( - @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List user + @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody 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 user + @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user ); 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 9f1e50085dac..32a273fe3286 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 @@ -32,7 +32,7 @@ public class ArrayTest { private List> arrayArrayOfInteger; @Valid - private List> arrayArrayOfModel; + private List> arrayArrayOfModel; public ArrayTest arrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; @@ -90,7 +90,7 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } @@ -110,11 +110,11 @@ public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayO @Valid @Schema(name = "array_array_of_model", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @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; } 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 6b6a22544c84..869385907fd3 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 @@ -84,7 +84,7 @@ ResponseEntity createUser( ) ResponseEntity createUsersWithArrayInput( - @Parameter(name = "body", description = "List of user object", required = true) @Valid @RequestBody List body + @Parameter(name = "body", description = "List of user object", required = true) @Valid @RequestBody 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 body + @Parameter(name = "body", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> body ); 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 98875ae653a6..c5f1bbe17993 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 @@ -94,7 +94,7 @@ ResponseEntity createUser( ) ResponseEntity createUsersWithArrayInput( - @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List user + @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody 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 user + @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user ); 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 9cdc42bdbbce..d6435b37b093 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 @@ -94,7 +94,7 @@ ResponseEntity createUser( ) ResponseEntity createUsersWithArrayInput( - @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List user + @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody 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 user + @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user ) throws Exception; 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 d917da5e1c1a..3e50238b3b96 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 @@ -101,7 +101,7 @@ default ResponseEntity createUser( ) default ResponseEntity createUsersWithArrayInput( - @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List user + @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody 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 user + @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); 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 846e5187a22a..064e7d7faefc 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 @@ -101,7 +101,7 @@ default ResponseEntity createUser( ) default ResponseEntity createUsersWithArrayInput( - @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List user + @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody 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 user + @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); 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 4205359f0363..a5cab7f83860 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 @@ -101,7 +101,7 @@ default ResponseEntity createUser( ) default ResponseEntity createUsersWithArrayInput( - @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List user + @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody 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 user + @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); 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 b345d407989d..075817a4c287 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 @@ -90,7 +90,7 @@ default ResponseEntity createUser( ) default ResponseEntity createUsersWithArrayInput( - @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List user + @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody 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 user + @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user ) { return getDelegate().createUsersWithListInput(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 8f4502411c53..a67248a54f31 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 user) { + default ResponseEntity createUsersWithArrayInput(List<@Valid User> user) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -60,7 +60,7 @@ default ResponseEntity createUsersWithArrayInput(List user) { * @return successful operation (status code 200) * @see UserApi#createUsersWithListInput */ - default ResponseEntity createUsersWithListInput(List user) { + default ResponseEntity createUsersWithListInput(List<@Valid User> user) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } 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 9f1e50085dac..32a273fe3286 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 @@ -32,7 +32,7 @@ public class ArrayTest { private List> arrayArrayOfInteger; @Valid - private List> arrayArrayOfModel; + private List> arrayArrayOfModel; public ArrayTest arrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; @@ -90,7 +90,7 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } @@ -110,11 +110,11 @@ public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayO @Valid @Schema(name = "array_array_of_model", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @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; } 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 71b82e4ecf14..1dc04c1f7a88 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 @@ -95,7 +95,7 @@ default ResponseEntity createUser( ) default ResponseEntity createUsersWithArrayInput( - @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List user + @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody 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 user + @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); 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 9f1e50085dac..32a273fe3286 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 @@ -32,7 +32,7 @@ public class ArrayTest { private List> arrayArrayOfInteger; @Valid - private List> arrayArrayOfModel; + private List> arrayArrayOfModel; public ArrayTest arrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; @@ -90,7 +90,7 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } @@ -110,11 +110,11 @@ public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayO @Valid @Schema(name = "array_array_of_model", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @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; } 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 cb87014e41f3..90d2cf53b223 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 @@ -65,7 +65,7 @@ default ResponseEntity createUser( ) default ResponseEntity createUsersWithArrayInput( - @Valid @RequestBody List user + @Valid @RequestBody List<@Valid User> user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -86,7 +86,7 @@ default ResponseEntity createUsersWithArrayInput( ) default ResponseEntity createUsersWithListInput( - @Valid @RequestBody List user + @Valid @RequestBody List<@Valid User> user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); 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 b9d2ecc5fbe7..1751844ad674 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 @@ -102,7 +102,7 @@ default ResponseEntity createUser( ) default ResponseEntity createUsersWithArrayInput( - @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List user + @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody 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 user + @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/api/FakeService.java b/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/api/FakeService.java index 856a23d38dca..3a4f094c8a66 100644 --- a/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/api/FakeService.java +++ b/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/api/FakeService.java @@ -113,7 +113,7 @@ public interface FakeService { @GET @Consumes({ "application/x-www-form-urlencoded" }) - void testEnumParameters(@HeaderParam("enum_header_string_array") List enumHeaderStringArray, @HeaderParam("enum_header_string") @DefaultValue("-efg") String enumHeaderString, @QueryParam("enum_query_string_array") List enumQueryStringArray, @QueryParam("enum_query_string") @DefaultValue("-efg") String enumQueryString, @QueryParam("enum_query_integer") Integer enumQueryInteger, @QueryParam("enum_query_double") Double enumQueryDouble, @QueryParam("enum_query_model_array") List enumQueryModelArray, @FormParam(value = "enum_form_string_array") List enumFormStringArray, @FormParam(value = "enum_form_string") String enumFormString); + void testEnumParameters(@HeaderParam("enum_header_string_array") List enumHeaderStringArray, @HeaderParam("enum_header_string") @DefaultValue("-efg") String enumHeaderString, @QueryParam("enum_query_string_array") List enumQueryStringArray, @QueryParam("enum_query_string") @DefaultValue("-efg") String enumQueryString, @QueryParam("enum_query_integer") Integer enumQueryInteger, @QueryParam("enum_query_double") Double enumQueryDouble, @QueryParam("enum_query_model_array") List<@Valid EnumClass> enumQueryModelArray, @FormParam(value = "enum_form_string_array") List enumFormStringArray, @FormParam(value = "enum_form_string") String enumFormString); @DELETE void testGroupParameters(@QueryParam("required_string_group") @NotNull Integer requiredStringGroup, @HeaderParam("required_boolean_group") @NotNull Boolean requiredBooleanGroup, @QueryParam("required_int64_group") @NotNull Long requiredInt64Group, @QueryParam("string_group") Integer stringGroup, @HeaderParam("boolean_group") Boolean booleanGroup, @QueryParam("int64_group") Long int64Group); diff --git a/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/api/FakeServiceImpl.java b/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/api/FakeServiceImpl.java index 83412a6d0ea2..93c2e32bc753 100644 --- a/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/api/FakeServiceImpl.java +++ b/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/api/FakeServiceImpl.java @@ -143,7 +143,7 @@ public void testEndpointParameters(@FormParam(value = "number") BigDecimal numb @GET @Consumes({ "application/x-www-form-urlencoded" }) - public void testEnumParameters(@HeaderParam("enum_header_string_array") List enumHeaderStringArray,@HeaderParam("enum_header_string") @DefaultValue("-efg") String enumHeaderString,@QueryParam("enum_query_string_array") List enumQueryStringArray,@QueryParam("enum_query_string") @DefaultValue("-efg") String enumQueryString,@QueryParam("enum_query_integer") Integer enumQueryInteger,@QueryParam("enum_query_double") Double enumQueryDouble,@QueryParam("enum_query_model_array") List enumQueryModelArray,@FormParam(value = "enum_form_string_array") List enumFormStringArray,@FormParam(value = "enum_form_string") String enumFormString) { + public void testEnumParameters(@HeaderParam("enum_header_string_array") List enumHeaderStringArray,@HeaderParam("enum_header_string") @DefaultValue("-efg") String enumHeaderString,@QueryParam("enum_query_string_array") List enumQueryStringArray,@QueryParam("enum_query_string") @DefaultValue("-efg") String enumQueryString,@QueryParam("enum_query_integer") Integer enumQueryInteger,@QueryParam("enum_query_double") Double enumQueryDouble,@QueryParam("enum_query_model_array") List<@Valid EnumClass> enumQueryModelArray,@FormParam(value = "enum_form_string_array") List enumFormStringArray,@FormParam(value = "enum_form_string") String enumFormString) { } @DELETE diff --git a/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/api/UserService.java b/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/api/UserService.java index 3b907684f9aa..6a679508b5d6 100644 --- a/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/api/UserService.java +++ b/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/api/UserService.java @@ -35,12 +35,12 @@ public interface UserService { @POST @Path("/createWithArray") @Consumes({ "application/json" }) - void createUsersWithArrayInput(@Valid @NotNull List user); + void createUsersWithArrayInput(@Valid @NotNull List<@Valid User> user); @POST @Path("/createWithList") @Consumes({ "application/json" }) - void createUsersWithListInput(@Valid @NotNull List user); + void createUsersWithListInput(@Valid @NotNull List<@Valid User> user); @DELETE @Path("/{username}") diff --git a/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/api/UserServiceImpl.java b/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/api/UserServiceImpl.java index b5189292c8d5..a439f5904dde 100644 --- a/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/api/UserServiceImpl.java +++ b/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/api/UserServiceImpl.java @@ -37,13 +37,13 @@ public void createUser(@Valid @NotNull User user) { @POST @Path("/createWithArray") @Consumes({ "application/json" }) - public void createUsersWithArrayInput(@Valid @NotNull List user) { + public void createUsersWithArrayInput(@Valid @NotNull List<@Valid User> user) { } @POST @Path("/createWithList") @Consumes({ "application/json" }) - public void createUsersWithListInput(@Valid @NotNull List user) { + public void createUsersWithListInput(@Valid @NotNull List<@Valid User> user) { } @DELETE diff --git a/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/model/ArrayTest.java b/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/model/ArrayTest.java index bee37780d6b0..d599c7993066 100644 --- a/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/model/ArrayTest.java +++ b/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/model/ArrayTest.java @@ -31,7 +31,7 @@ public class ArrayTest { private List> arrayArrayOfInteger = null; - private List> arrayArrayOfModel = null; + private List> arrayArrayOfModel = null; /** * Get arrayOfString @@ -87,23 +87,23 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfModel * @return arrayArrayOfModel **/ - public List> getArrayArrayOfModel() { + public List> getArrayArrayOfModel() { return arrayArrayOfModel; } /** * Set arrayArrayOfModel **/ - public void setArrayArrayOfModel(List> arrayArrayOfModel) { + public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } - public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { + public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) { this.arrayArrayOfModel.add(arrayArrayOfModelItem); return this; } diff --git a/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/model/FileSchemaTestClass.java b/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/model/FileSchemaTestClass.java index 734eba6873de..1b47816ef284 100644 --- a/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/model/FileSchemaTestClass.java +++ b/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/model/FileSchemaTestClass.java @@ -29,7 +29,7 @@ public class FileSchemaTestClass { private ModelFile _file; - private List files = null; + private List<@Valid ModelFile> files = null; /** * Get _file @@ -55,18 +55,18 @@ public FileSchemaTestClass _file(ModelFile _file) { * Get files * @return files **/ - public List getFiles() { + public List<@Valid ModelFile> getFiles() { return files; } /** * Set files **/ - public void setFiles(List files) { + public void setFiles(List<@Valid ModelFile> files) { this.files = files; } - public FileSchemaTestClass files(List files) { + public FileSchemaTestClass files(List<@Valid ModelFile> files) { this.files = files; return this; } diff --git a/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/model/ObjectWithDeprecatedFields.java b/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/model/ObjectWithDeprecatedFields.java index dc24a224465a..c2c23ed5d786 100644 --- a/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/model/ObjectWithDeprecatedFields.java +++ b/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/model/ObjectWithDeprecatedFields.java @@ -34,7 +34,7 @@ public class ObjectWithDeprecatedFields { private DeprecatedObject deprecatedRef; - private List bars = null; + private List<@Valid String> bars = null; /** * Get uuid @@ -106,18 +106,18 @@ public ObjectWithDeprecatedFields deprecatedRef(DeprecatedObject deprecatedRef) * @deprecated **/ @Deprecated - public List getBars() { + public List<@Valid String> getBars() { return bars; } /** * Set bars **/ - public void setBars(List bars) { + public void setBars(List<@Valid String> bars) { this.bars = bars; } - public ObjectWithDeprecatedFields bars(List bars) { + public ObjectWithDeprecatedFields bars(List<@Valid String> bars) { this.bars = bars; return this; } diff --git a/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/model/Pet.java b/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/model/Pet.java index 669e7ddbe407..f58096fff738 100644 --- a/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/model/Pet.java +++ b/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/model/Pet.java @@ -41,7 +41,7 @@ public class Pet { private Set photoUrls = new LinkedHashSet<>(); - private List tags = null; + private List<@Valid Tag> tags = null; public enum StatusEnum { @@ -187,18 +187,18 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get tags * @return tags **/ - public List getTags() { + public List<@Valid Tag> getTags() { return tags; } /** * Set tags **/ - public void setTags(List tags) { + public void setTags(List<@Valid Tag> tags) { this.tags = tags; } - public Pet tags(List tags) { + public Pet tags(List<@Valid Tag> tags) { this.tags = tags; return this; } diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/AdditionalPropertiesClass.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/AdditionalPropertiesClass.java index 9f9f831237ce..1266dac5d907 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/AdditionalPropertiesClass.java @@ -2,6 +2,8 @@ import java.util.HashMap; import java.util.Map; +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/AllOfWithSingleRef.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/AllOfWithSingleRef.java index cdf67cc9aa49..63eeb7f67afb 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/AllOfWithSingleRef.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/AllOfWithSingleRef.java @@ -3,6 +3,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.server.model.SingleRefType; +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/Animal.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/Animal.java index 1aa44d002043..548edc48a8a8 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/Animal.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/Animal.java @@ -3,6 +3,8 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ArrayOfArrayOfNumberOnly.java index acd3cfc6391d..dab2aafb6ad0 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ArrayOfArrayOfNumberOnly.java @@ -4,6 +4,8 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ArrayOfNumberOnly.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ArrayOfNumberOnly.java index 780d79670469..96ff5ea0a444 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ArrayOfNumberOnly.java @@ -4,6 +4,8 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ArrayTest.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ArrayTest.java index 18a0c9a8f9a7..8112ec19d48a 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ArrayTest.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ArrayTest.java @@ -4,6 +4,8 @@ import java.util.Arrays; import java.util.List; import org.openapitools.server.model.ReadOnlyFirst; +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; @@ -11,7 +13,7 @@ public class ArrayTest { private List arrayOfString; private List> arrayArrayOfInteger; - private List> arrayArrayOfModel; + private List> arrayArrayOfModel; /** * Default constructor. @@ -30,7 +32,7 @@ public ArrayTest() { public ArrayTest( List arrayOfString, List> arrayArrayOfInteger, - List> arrayArrayOfModel + List> arrayArrayOfModel ) { this.arrayOfString = arrayOfString; this.arrayArrayOfInteger = arrayArrayOfInteger; @@ -67,11 +69,11 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { * Get arrayArrayOfModel * @return arrayArrayOfModel */ - public List> getArrayArrayOfModel() { + public List> getArrayArrayOfModel() { return arrayArrayOfModel; } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { + public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/Capitalization.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/Capitalization.java index ab3f58fcd434..942f62d57fbc 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/Capitalization.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/Capitalization.java @@ -1,5 +1,7 @@ package org.openapitools.server.model; +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/Cat.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/Cat.java index 663f2a85183a..d0d01e632a5e 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/Cat.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/Cat.java @@ -4,6 +4,8 @@ import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import org.openapitools.server.model.Animal; +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/Category.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/Category.java index f449dcdbdcc4..ce9f854b3b91 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/Category.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/Category.java @@ -1,5 +1,7 @@ package org.openapitools.server.model; +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ChildWithNullable.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ChildWithNullable.java index aced0bb7a9ef..ea4c963b2b56 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ChildWithNullable.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ChildWithNullable.java @@ -7,6 +7,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.jackson.nullable.JsonNullable; import org.openapitools.server.model.ParentWithNullable; +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ClassModel.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ClassModel.java index ba7528f6ddb1..806a179ba10a 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ClassModel.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ClassModel.java @@ -1,5 +1,7 @@ package org.openapitools.server.model; +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; /** diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/Client.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/Client.java index 76c4d19ab60c..3b500ac997ee 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/Client.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/Client.java @@ -1,5 +1,7 @@ package org.openapitools.server.model; +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/DeprecatedObject.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/DeprecatedObject.java index 7add1761a845..4e2b7051130c 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/DeprecatedObject.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/DeprecatedObject.java @@ -1,5 +1,7 @@ package org.openapitools.server.model; +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/Dog.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/Dog.java index 2c904956ac4c..f935612575ee 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/Dog.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/Dog.java @@ -4,6 +4,8 @@ import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import org.openapitools.server.model.Animal; +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/EnumArrays.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/EnumArrays.java index da4a33310ba3..ba6203947fe2 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/EnumArrays.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/EnumArrays.java @@ -5,6 +5,8 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/EnumClass.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/EnumClass.java index d3f6c24ce36c..ce974651d829 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/EnumClass.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/EnumClass.java @@ -1,5 +1,7 @@ package org.openapitools.server.model; +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; import com.fasterxml.jackson.annotation.JsonCreator; diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/EnumTest.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/EnumTest.java index 54b36a98ed9a..d2d7d27c9414 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/EnumTest.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/EnumTest.java @@ -8,6 +8,8 @@ import org.openapitools.server.model.OuterEnumDefaultValue; import org.openapitools.server.model.OuterEnumInteger; import org.openapitools.server.model.OuterEnumIntegerDefaultValue; +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/FakeBigDecimalMap200Response.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/FakeBigDecimalMap200Response.java index 3236f8167539..b50b92931cf5 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/FakeBigDecimalMap200Response.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/FakeBigDecimalMap200Response.java @@ -4,6 +4,8 @@ import java.math.BigDecimal; import java.util.HashMap; import java.util.Map; +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/FileSchemaTestClass.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/FileSchemaTestClass.java index 7ed4f1009d44..34fbdce5ca9e 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/FileSchemaTestClass.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/FileSchemaTestClass.java @@ -4,13 +4,15 @@ import java.util.Arrays; import java.util.List; import org.openapitools.server.model.ModelFile; +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; public class FileSchemaTestClass { private ModelFile _file; - private List files; + private List<@Valid ModelFile> files; /** * Default constructor. @@ -27,7 +29,7 @@ public FileSchemaTestClass() { */ public FileSchemaTestClass( ModelFile _file, - List files + List<@Valid ModelFile> files ) { this._file = _file; this.files = files; @@ -51,11 +53,11 @@ public void setFile(ModelFile _file) { * Get files * @return files */ - public List getFiles() { + public List<@Valid ModelFile> getFiles() { return files; } - public void setFiles(List files) { + public void setFiles(List<@Valid ModelFile> files) { this.files = files; } diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/Foo.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/Foo.java index 6b3869f6f4ca..e02a00803c22 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/Foo.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/Foo.java @@ -1,5 +1,7 @@ package org.openapitools.server.model; +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/FooGetDefaultResponse.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/FooGetDefaultResponse.java index f4716bdfcd1e..40f8d5855417 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/FooGetDefaultResponse.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/FooGetDefaultResponse.java @@ -2,6 +2,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import org.openapitools.server.model.Foo; +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/FormatTest.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/FormatTest.java index 754cbfe9cb59..92e3aef3e80d 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/FormatTest.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/FormatTest.java @@ -6,6 +6,8 @@ import java.time.LocalDate; import java.time.OffsetDateTime; import java.util.UUID; +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/HasOnlyReadOnly.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/HasOnlyReadOnly.java index b5228bf6e66d..50c41f059e3b 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/HasOnlyReadOnly.java @@ -1,6 +1,8 @@ package org.openapitools.server.model; import com.fasterxml.jackson.annotation.JsonTypeName; +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/HealthCheckResult.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/HealthCheckResult.java index 97e9dba137ad..5b865aa0e3f3 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/HealthCheckResult.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/HealthCheckResult.java @@ -1,6 +1,8 @@ package org.openapitools.server.model; import org.openapitools.jackson.nullable.JsonNullable; +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; /** diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/MapTest.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/MapTest.java index 4bef65f6a8e2..f8051c6e3e45 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/MapTest.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/MapTest.java @@ -4,6 +4,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.util.HashMap; import java.util.Map; +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/MixedPropertiesAndAdditionalPropertiesClass.java index 0a6bef328e2b..9f2e5dc7bbef 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -5,6 +5,8 @@ import java.util.Map; import java.util.UUID; import org.openapitools.server.model.Animal; +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/Model200Response.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/Model200Response.java index dc685bdf99bd..28f6bd2cdac0 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/Model200Response.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/Model200Response.java @@ -1,6 +1,8 @@ package org.openapitools.server.model; import com.fasterxml.jackson.annotation.JsonTypeName; +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; /** diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ModelApiResponse.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ModelApiResponse.java index 10d22866ed5c..81a468f1af79 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ModelApiResponse.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ModelApiResponse.java @@ -1,6 +1,8 @@ package org.openapitools.server.model; import com.fasterxml.jackson.annotation.JsonTypeName; +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ModelFile.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ModelFile.java index 0721c23130d4..6743c641a001 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ModelFile.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ModelFile.java @@ -1,6 +1,8 @@ package org.openapitools.server.model; import com.fasterxml.jackson.annotation.JsonTypeName; +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; /** diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ModelList.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ModelList.java index 6bba122e69ea..88000df9959e 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ModelList.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ModelList.java @@ -1,6 +1,8 @@ package org.openapitools.server.model; import com.fasterxml.jackson.annotation.JsonTypeName; +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ModelReturn.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ModelReturn.java index 0b9538b4aafc..a11d5e2b4e49 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ModelReturn.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ModelReturn.java @@ -1,6 +1,8 @@ package org.openapitools.server.model; import com.fasterxml.jackson.annotation.JsonTypeName; +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; /** diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/Name.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/Name.java index a081e1d5c13a..a3524465b284 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/Name.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/Name.java @@ -1,5 +1,7 @@ package org.openapitools.server.model; +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; /** diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/NullableClass.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/NullableClass.java index 9e9ed3215cd2..fa9e97a3c055 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/NullableClass.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/NullableClass.java @@ -9,6 +9,8 @@ import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/NumberOnly.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/NumberOnly.java index 3a003f97091e..7caf3c857f39 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/NumberOnly.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/NumberOnly.java @@ -1,6 +1,8 @@ package org.openapitools.server.model; import java.math.BigDecimal; +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ObjectWithDeprecatedFields.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ObjectWithDeprecatedFields.java index 2a6633c0f2cb..4c052bc32816 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ObjectWithDeprecatedFields.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ObjectWithDeprecatedFields.java @@ -5,6 +5,8 @@ import java.util.Arrays; import java.util.List; import org.openapitools.server.model.DeprecatedObject; +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; @@ -13,7 +15,7 @@ public class ObjectWithDeprecatedFields { private String uuid; private BigDecimal id; private DeprecatedObject deprecatedRef; - private List bars; + private List<@Valid String> bars; /** * Default constructor. @@ -34,7 +36,7 @@ public ObjectWithDeprecatedFields( String uuid, BigDecimal id, DeprecatedObject deprecatedRef, - List bars + List<@Valid String> bars ) { this.uuid = uuid; this.id = id; @@ -84,11 +86,11 @@ public void setDeprecatedRef(DeprecatedObject deprecatedRef) { * Get bars * @return bars */ - public List getBars() { + public List<@Valid String> getBars() { return bars; } - public void setBars(List bars) { + public void setBars(List<@Valid String> bars) { this.bars = bars; } diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/Order.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/Order.java index 39a04dc15112..0ca5e240f6f6 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/Order.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/Order.java @@ -3,6 +3,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import java.time.OffsetDateTime; +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/OuterComposite.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/OuterComposite.java index 92eb34508d3f..696e549642d2 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/OuterComposite.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/OuterComposite.java @@ -1,6 +1,8 @@ package org.openapitools.server.model; import java.math.BigDecimal; +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/OuterEnum.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/OuterEnum.java index 3cdb4cdeb794..5a6730ab1b57 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/OuterEnum.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/OuterEnum.java @@ -1,5 +1,7 @@ package org.openapitools.server.model; +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; import com.fasterxml.jackson.annotation.JsonCreator; diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/OuterEnumDefaultValue.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/OuterEnumDefaultValue.java index c8110bd330ab..986b7b1f7f60 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/OuterEnumDefaultValue.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/OuterEnumDefaultValue.java @@ -1,5 +1,7 @@ package org.openapitools.server.model; +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; import com.fasterxml.jackson.annotation.JsonCreator; diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/OuterEnumInteger.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/OuterEnumInteger.java index b6d2661725fe..ad5c4c2d3784 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/OuterEnumInteger.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/OuterEnumInteger.java @@ -1,5 +1,7 @@ package org.openapitools.server.model; +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; import com.fasterxml.jackson.annotation.JsonCreator; diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/OuterEnumIntegerDefaultValue.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/OuterEnumIntegerDefaultValue.java index af1fe21752aa..93151449261e 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/OuterEnumIntegerDefaultValue.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/OuterEnumIntegerDefaultValue.java @@ -1,5 +1,7 @@ package org.openapitools.server.model; +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; import com.fasterxml.jackson.annotation.JsonCreator; diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/OuterObjectWithEnumProperty.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/OuterObjectWithEnumProperty.java index 54e563c42d3c..cd57e792975e 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/OuterObjectWithEnumProperty.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/OuterObjectWithEnumProperty.java @@ -3,6 +3,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.server.model.OuterEnumInteger; +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ParentWithNullable.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ParentWithNullable.java index 22a7bc13fce2..74568b6224ed 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ParentWithNullable.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ParentWithNullable.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.jackson.nullable.JsonNullable; +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/Pet.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/Pet.java index 2ac850409977..17dd8d5f5170 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/Pet.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/Pet.java @@ -10,6 +10,8 @@ import java.util.Set; import org.openapitools.server.model.Category; import org.openapitools.server.model.Tag; +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; @@ -19,7 +21,7 @@ public class Pet { private Category category; private String name; private Set photoUrls = new LinkedHashSet<>(); - private List tags; + private List<@Valid Tag> tags; /** * pet status in the store @@ -82,7 +84,7 @@ public Pet( Category category, String name, Set photoUrls, - List tags, + List<@Valid Tag> tags, StatusEnum status ) { this.id = id; @@ -147,11 +149,11 @@ public void setPhotoUrls(Set photoUrls) { * Get tags * @return tags */ - public List getTags() { + public List<@Valid Tag> getTags() { return tags; } - public void setTags(List tags) { + public void setTags(List<@Valid Tag> tags) { this.tags = tags; } diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ReadOnlyFirst.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ReadOnlyFirst.java index e62e2270eea5..6e9d1f16fb1d 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ReadOnlyFirst.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ReadOnlyFirst.java @@ -1,5 +1,7 @@ package org.openapitools.server.model; +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/SingleRefType.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/SingleRefType.java index 6689e8a2b60c..d7ada5dddeaf 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/SingleRefType.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/SingleRefType.java @@ -1,5 +1,7 @@ package org.openapitools.server.model; +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; import com.fasterxml.jackson.annotation.JsonCreator; diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/SpecialModelName.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/SpecialModelName.java index 2ab0a3701978..9c14659f899a 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/SpecialModelName.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/SpecialModelName.java @@ -1,6 +1,8 @@ package org.openapitools.server.model; import com.fasterxml.jackson.annotation.JsonTypeName; +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/Tag.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/Tag.java index 494d8fcf9280..e0d425d782e2 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/Tag.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/Tag.java @@ -1,5 +1,7 @@ package org.openapitools.server.model; +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/TestInlineFreeformAdditionalPropertiesRequest.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/TestInlineFreeformAdditionalPropertiesRequest.java index ef5a7dabad7f..499fa5013feb 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/TestInlineFreeformAdditionalPropertiesRequest.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/TestInlineFreeformAdditionalPropertiesRequest.java @@ -3,6 +3,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.HashMap; import java.util.Map; +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/User.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/User.java index 8110b662252a..9decbea90472 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/User.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/User.java @@ -1,5 +1,7 @@ package org.openapitools.server.model; +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; diff --git a/samples/server/petstore/java-micronaut-server/docs/controllers/UserController.md b/samples/server/petstore/java-micronaut-server/docs/controllers/UserController.md index d35eab18468d..c29abaa8a8d4 100644 --- a/samples/server/petstore/java-micronaut-server/docs/controllers/UserController.md +++ b/samples/server/petstore/java-micronaut-server/docs/controllers/UserController.md @@ -51,7 +51,7 @@ Creates list of users with given input array ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**user** | [**List<User>**](../../docs/models/User.md) | List of user object | +**user** | [**List<@Valid User>**](../../docs/models/User.md) | List of user object | ### Authorization @@ -74,7 +74,7 @@ Creates list of users with given input array ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**user** | [**List<User>**](../../docs/models/User.md) | List of user object | +**user** | [**List<@Valid User>**](../../docs/models/User.md) | List of user object | ### Authorization diff --git a/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/controller/UserController.java b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/controller/UserController.java index 2f97208d1a71..e849f2b51eb7 100644 --- a/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/controller/UserController.java +++ b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/controller/UserController.java @@ -93,7 +93,7 @@ public Mono createUser( @Produces(value = {}) @Consumes(value = {"application/json"}) public Mono createUsersWithArrayInput( - @Body @NotNull List user + @Body @NotNull List<@Valid User> user ) { // TODO implement createUsersWithArrayInput(); return Mono.error(new HttpStatusException(HttpStatus.NOT_IMPLEMENTED, null)); @@ -123,7 +123,7 @@ public Mono createUsersWithArrayInput( @Produces(value = {}) @Consumes(value = {"application/json"}) public Mono createUsersWithListInput( - @Body @NotNull List user + @Body @NotNull List<@Valid User> user ) { // TODO implement createUsersWithListInput(); return Mono.error(new HttpStatusException(HttpStatus.NOT_IMPLEMENTED, null)); diff --git a/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Pet.java index 7bbb87a186ea..0346cbecedc1 100644 --- a/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Pet.java @@ -56,7 +56,7 @@ public class Pet { private List photoUrls = new ArrayList<>(); public static final String JSON_PROPERTY_TAGS = "tags"; - private List tags = null; + private List<@Valid Tag> tags = null; /** * pet status in the store @@ -198,7 +198,7 @@ public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List tags) { + public Pet tags(List<@Valid Tag> tags) { this.tags = tags; return this; } @@ -219,13 +219,13 @@ public Pet addTagsItem(Tag tagsItem) { @Schema(name = "tags", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty(JSON_PROPERTY_TAGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { + public List<@Valid Tag> getTags() { return tags; } @JsonProperty(JSON_PROPERTY_TAGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTags(List tags) { + public void setTags(List<@Valid Tag> tags) { this.tags = tags; } diff --git a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/UserApi.java index a54f5e2a3ee4..c414b0db8f2a 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/UserApi.java @@ -51,7 +51,7 @@ public Response createUser(@ApiParam(value = "Created user object" ,required=tru @io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true) List body + public Response createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true) List<@Valid User> body ) throws NotFoundException { return delegate.createUsersWithArrayInput(body); @@ -63,7 +63,7 @@ public Response createUsersWithArrayInput(@ApiParam(value = "List of user object @io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true) List body + public Response createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true) List<@Valid User> body ) throws NotFoundException { return delegate.createUsersWithListInput(body); diff --git a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/UserApiService.java b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/UserApiService.java index 905aab2c1b61..864db80f2e86 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/UserApiService.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/UserApiService.java @@ -22,9 +22,9 @@ public abstract class UserApiService { public abstract Response createUser(User body ) throws NotFoundException; - public abstract Response createUsersWithArrayInput(List body + public abstract Response createUsersWithArrayInput(List<@Valid User> body ) throws NotFoundException; - public abstract Response createUsersWithListInput(List body + public abstract Response createUsersWithListInput(List<@Valid User> body ) throws NotFoundException; public abstract Response deleteUser(String username ) throws NotFoundException; diff --git a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/ArrayTest.java index 187da0ad45a3..f807f4daec7a 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/ArrayTest.java @@ -22,7 +22,7 @@ public class ArrayTest { private List> arrayArrayOfInteger = null; @JsonProperty("array_array_of_model") - private List> arrayArrayOfModel = null; + private List> arrayArrayOfModel = null; public ArrayTest arrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; @@ -76,12 +76,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 arrayArrayOfModelItem) { + public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) { if (this.arrayArrayOfModel == null) { this.arrayArrayOfModel = ; } @@ -94,11 +94,11 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * @return arrayArrayOfModel **/ @ApiModelProperty(value = "") - public List> getArrayArrayOfModel() { + public List> getArrayArrayOfModel() { return arrayArrayOfModel; } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { + public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } diff --git a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/FileSchemaTestClass.java index 216cd400f286..78ae9ae5237e 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/FileSchemaTestClass.java @@ -19,7 +19,7 @@ public class FileSchemaTestClass { private ModelFile _file; @JsonProperty("files") - private List files = null; + private List<@Valid ModelFile> files = null; public FileSchemaTestClass _file(ModelFile _file) { this._file = _file; @@ -39,7 +39,7 @@ public void setFile(ModelFile _file) { this._file = _file; } - public FileSchemaTestClass files(List files) { + public FileSchemaTestClass files(List<@Valid ModelFile> files) { this.files = files; return this; } @@ -57,11 +57,11 @@ public FileSchemaTestClass addFilesItem(ModelFile filesItem) { * @return files **/ @ApiModelProperty(value = "") - public List getFiles() { + public List<@Valid ModelFile> getFiles() { return files; } - public void setFiles(List files) { + public void setFiles(List<@Valid ModelFile> files) { this.files = files; } diff --git a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/Pet.java b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/Pet.java index d918f75324f3..7c7bed08c872 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/Pet.java @@ -33,7 +33,7 @@ public class Pet { private Set photoUrls = new LinkedHashSet<>(); @JsonProperty("tags") - private List tags = null; + private List<@Valid Tag> tags = null; /** * pet status in the store @@ -149,7 +149,7 @@ public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List tags) { + public Pet tags(List<@Valid Tag> tags) { this.tags = tags; return this; } @@ -167,11 +167,11 @@ public Pet addTagsItem(Tag tagsItem) { * @return tags **/ @ApiModelProperty(value = "") - public List getTags() { + public List<@Valid Tag> getTags() { return tags; } - public void setTags(List tags) { + public void setTags(List<@Valid Tag> tags) { this.tags = tags; } diff --git a/samples/server/petstore/java-msf4j/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java b/samples/server/petstore/java-msf4j/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java index 092f5f3a5819..055a942b819d 100644 --- a/samples/server/petstore/java-msf4j/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java +++ b/samples/server/petstore/java-msf4j/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java @@ -27,13 +27,13 @@ public Response createUser(User body return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } @Override - public Response createUsersWithArrayInput(List body + public Response createUsersWithArrayInput(List<@Valid User> body ) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } @Override - public Response createUsersWithListInput(List body + public Response createUsersWithListInput(List<@Valid User> body ) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); diff --git a/samples/server/petstore/java-play-framework-api-package-override/app/apimodels/Category.java b/samples/server/petstore/java-play-framework-api-package-override/app/apimodels/Category.java index afed4d545a99..2c2765d9a802 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/app/apimodels/Category.java +++ b/samples/server/petstore/java-play-framework-api-package-override/app/apimodels/Category.java @@ -5,6 +5,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * A category for a pet */ diff --git a/samples/server/petstore/java-play-framework-api-package-override/app/apimodels/ModelApiResponse.java b/samples/server/petstore/java-play-framework-api-package-override/app/apimodels/ModelApiResponse.java index 301968462bb4..883865cd5098 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/app/apimodels/ModelApiResponse.java +++ b/samples/server/petstore/java-play-framework-api-package-override/app/apimodels/ModelApiResponse.java @@ -6,6 +6,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * Describes the result of uploading an image resource */ diff --git a/samples/server/petstore/java-play-framework-api-package-override/app/apimodels/Order.java b/samples/server/petstore/java-play-framework-api-package-override/app/apimodels/Order.java index d54cba148ad3..29b6e3f6b5cb 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/app/apimodels/Order.java +++ b/samples/server/petstore/java-play-framework-api-package-override/app/apimodels/Order.java @@ -6,6 +6,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * An order for a pets from the pet store */ diff --git a/samples/server/petstore/java-play-framework-api-package-override/app/apimodels/Pet.java b/samples/server/petstore/java-play-framework-api-package-override/app/apimodels/Pet.java index 2ea68e667f47..b3bcca614be0 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/app/apimodels/Pet.java +++ b/samples/server/petstore/java-play-framework-api-package-override/app/apimodels/Pet.java @@ -10,6 +10,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * A pet for sale in the pet store */ @@ -38,7 +39,7 @@ public class Pet { @JsonProperty("tags") @Valid - private List tags = null; + private List<@Valid Tag> tags = null; /** * pet status in the store @@ -153,7 +154,7 @@ public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List tags) { + public Pet tags(List<@Valid Tag> tags) { this.tags = tags; return this; } @@ -170,11 +171,11 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags **/ - public List getTags() { + public List<@Valid Tag> getTags() { return tags; } - public void setTags(List tags) { + public void setTags(List<@Valid Tag> tags) { this.tags = tags; } diff --git a/samples/server/petstore/java-play-framework-api-package-override/app/apimodels/Tag.java b/samples/server/petstore/java-play-framework-api-package-override/app/apimodels/Tag.java index adac882cd052..e6019d2887d1 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/app/apimodels/Tag.java +++ b/samples/server/petstore/java-play-framework-api-package-override/app/apimodels/Tag.java @@ -5,6 +5,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * A tag for a pet */ diff --git a/samples/server/petstore/java-play-framework-api-package-override/app/apimodels/User.java b/samples/server/petstore/java-play-framework-api-package-override/app/apimodels/User.java index 4e5d397b990c..1a157887085b 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/app/apimodels/User.java +++ b/samples/server/petstore/java-play-framework-api-package-override/app/apimodels/User.java @@ -5,6 +5,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * A User who is purchasing from the pet store */ diff --git a/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/PetApiController.java b/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/PetApiController.java index 55ff3e6b7952..bf6da104bd6b 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/PetApiController.java +++ b/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/PetApiController.java @@ -21,6 +21,7 @@ import com.fasterxml.jackson.core.type.TypeReference; import javax.validation.constraints.*; +import javax.validation.Valid; import com.typesafe.config.Config; import openapitools.OpenAPIUtils.ApiAction; diff --git a/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/PetApiControllerImp.java b/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/PetApiControllerImp.java index 99652aa88ba9..3441fea08348 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/PetApiControllerImp.java +++ b/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/PetApiControllerImp.java @@ -12,6 +12,7 @@ import java.io.FileInputStream; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaPlayFrameworkCodegen") public class PetApiControllerImp extends PetApiControllerImpInterface { @Override diff --git a/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/PetApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/PetApiControllerImpInterface.java index a6863a4d9bc0..b7b5c9d83d88 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/PetApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/PetApiControllerImpInterface.java @@ -21,6 +21,7 @@ import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @SuppressWarnings("RedundantThrows") public abstract class PetApiControllerImpInterface { diff --git a/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/StoreApiController.java b/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/StoreApiController.java index 47c5b5c2c341..336a57069cf2 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/StoreApiController.java +++ b/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/StoreApiController.java @@ -20,6 +20,7 @@ import com.fasterxml.jackson.core.type.TypeReference; import javax.validation.constraints.*; +import javax.validation.Valid; import com.typesafe.config.Config; import openapitools.OpenAPIUtils.ApiAction; diff --git a/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/StoreApiControllerImp.java b/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/StoreApiControllerImp.java index e9f736fadf62..7bfb4863bc10 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/StoreApiControllerImp.java +++ b/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/StoreApiControllerImp.java @@ -11,6 +11,7 @@ import java.io.FileInputStream; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaPlayFrameworkCodegen") public class StoreApiControllerImp extends StoreApiControllerImpInterface { @Override diff --git a/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/StoreApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/StoreApiControllerImpInterface.java index b18fcb34cc81..9df120612613 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/StoreApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/StoreApiControllerImpInterface.java @@ -20,6 +20,7 @@ import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @SuppressWarnings("RedundantThrows") public abstract class StoreApiControllerImpInterface { diff --git a/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/UserApiController.java b/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/UserApiController.java index e6a78057b93c..7e5334377601 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/UserApiController.java +++ b/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/UserApiController.java @@ -20,6 +20,7 @@ import com.fasterxml.jackson.core.type.TypeReference; import javax.validation.constraints.*; +import javax.validation.Valid; import com.typesafe.config.Config; import openapitools.OpenAPIUtils.ApiAction; @@ -55,9 +56,9 @@ public Result createUser(Http.Request request) throws Exception { @ApiAction public Result createUsersWithArrayInput(Http.Request request) throws Exception { JsonNode nodebody = request.body().asJson(); - List body; + List<@Valid User> body; if (nodebody != null) { - body = mapper.readValue(nodebody.toString(), new TypeReference>(){}); + body = mapper.readValue(nodebody.toString(), new TypeReference>(){}); if (configuration.getBoolean("useInputBeanValidation")) { for (User curItem : body) { OpenAPIUtils.validate(curItem); @@ -72,9 +73,9 @@ public Result createUsersWithArrayInput(Http.Request request) throws Exception { @ApiAction public Result createUsersWithListInput(Http.Request request) throws Exception { JsonNode nodebody = request.body().asJson(); - List body; + List<@Valid User> body; if (nodebody != null) { - body = mapper.readValue(nodebody.toString(), new TypeReference>(){}); + body = mapper.readValue(nodebody.toString(), new TypeReference>(){}); if (configuration.getBoolean("useInputBeanValidation")) { for (User curItem : body) { OpenAPIUtils.validate(curItem); diff --git a/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/UserApiControllerImp.java b/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/UserApiControllerImp.java index cc782eb4c050..c4783f3e0e69 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/UserApiControllerImp.java +++ b/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/UserApiControllerImp.java @@ -11,6 +11,7 @@ import java.io.FileInputStream; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaPlayFrameworkCodegen") public class UserApiControllerImp extends UserApiControllerImpInterface { @Override @@ -19,12 +20,12 @@ public void createUser(Http.Request request, User body) throws Exception { } @Override - public void createUsersWithArrayInput(Http.Request request, List body) throws Exception { + public void createUsersWithArrayInput(Http.Request request, List<@Valid User> body) throws Exception { //Do your magic!!! } @Override - public void createUsersWithListInput(Http.Request request, List body) throws Exception { + public void createUsersWithListInput(Http.Request request, List<@Valid User> body) throws Exception { //Do your magic!!! } diff --git a/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/UserApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/UserApiControllerImpInterface.java index b591a04e9e68..58abb056b58b 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/UserApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/UserApiControllerImpInterface.java @@ -20,6 +20,7 @@ import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @SuppressWarnings("RedundantThrows") public abstract class UserApiControllerImpInterface { @@ -35,21 +36,21 @@ public Result createUserHttp(Http.Request request, User body) throws Exception { public abstract void createUser(Http.Request request, User body) throws Exception; - public Result createUsersWithArrayInputHttp(Http.Request request, List body) throws Exception { + public Result createUsersWithArrayInputHttp(Http.Request request, List<@Valid User> body) throws Exception { createUsersWithArrayInput(request, body); return ok(); } - public abstract void createUsersWithArrayInput(Http.Request request, List body) throws Exception; + public abstract void createUsersWithArrayInput(Http.Request request, List<@Valid User> body) throws Exception; - public Result createUsersWithListInputHttp(Http.Request request, List body) throws Exception { + public Result createUsersWithListInputHttp(Http.Request request, List<@Valid User> body) throws Exception { createUsersWithListInput(request, body); return ok(); } - public abstract void createUsersWithListInput(Http.Request request, List body) throws Exception; + public abstract void createUsersWithListInput(Http.Request request, List<@Valid User> body) throws Exception; public Result deleteUserHttp(Http.Request request, String username) throws Exception { deleteUser(request, username); diff --git a/samples/server/petstore/java-play-framework-async/app/apimodels/Category.java b/samples/server/petstore/java-play-framework-async/app/apimodels/Category.java index afed4d545a99..2c2765d9a802 100644 --- a/samples/server/petstore/java-play-framework-async/app/apimodels/Category.java +++ b/samples/server/petstore/java-play-framework-async/app/apimodels/Category.java @@ -5,6 +5,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * A category for a pet */ diff --git a/samples/server/petstore/java-play-framework-async/app/apimodels/ModelApiResponse.java b/samples/server/petstore/java-play-framework-async/app/apimodels/ModelApiResponse.java index 301968462bb4..883865cd5098 100644 --- a/samples/server/petstore/java-play-framework-async/app/apimodels/ModelApiResponse.java +++ b/samples/server/petstore/java-play-framework-async/app/apimodels/ModelApiResponse.java @@ -6,6 +6,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * Describes the result of uploading an image resource */ diff --git a/samples/server/petstore/java-play-framework-async/app/apimodels/Order.java b/samples/server/petstore/java-play-framework-async/app/apimodels/Order.java index d54cba148ad3..29b6e3f6b5cb 100644 --- a/samples/server/petstore/java-play-framework-async/app/apimodels/Order.java +++ b/samples/server/petstore/java-play-framework-async/app/apimodels/Order.java @@ -6,6 +6,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * An order for a pets from the pet store */ diff --git a/samples/server/petstore/java-play-framework-async/app/apimodels/Pet.java b/samples/server/petstore/java-play-framework-async/app/apimodels/Pet.java index 2ea68e667f47..b3bcca614be0 100644 --- a/samples/server/petstore/java-play-framework-async/app/apimodels/Pet.java +++ b/samples/server/petstore/java-play-framework-async/app/apimodels/Pet.java @@ -10,6 +10,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * A pet for sale in the pet store */ @@ -38,7 +39,7 @@ public class Pet { @JsonProperty("tags") @Valid - private List tags = null; + private List<@Valid Tag> tags = null; /** * pet status in the store @@ -153,7 +154,7 @@ public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List tags) { + public Pet tags(List<@Valid Tag> tags) { this.tags = tags; return this; } @@ -170,11 +171,11 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags **/ - public List getTags() { + public List<@Valid Tag> getTags() { return tags; } - public void setTags(List tags) { + public void setTags(List<@Valid Tag> tags) { this.tags = tags; } diff --git a/samples/server/petstore/java-play-framework-async/app/apimodels/Tag.java b/samples/server/petstore/java-play-framework-async/app/apimodels/Tag.java index adac882cd052..e6019d2887d1 100644 --- a/samples/server/petstore/java-play-framework-async/app/apimodels/Tag.java +++ b/samples/server/petstore/java-play-framework-async/app/apimodels/Tag.java @@ -5,6 +5,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * A tag for a pet */ diff --git a/samples/server/petstore/java-play-framework-async/app/apimodels/User.java b/samples/server/petstore/java-play-framework-async/app/apimodels/User.java index 4e5d397b990c..1a157887085b 100644 --- a/samples/server/petstore/java-play-framework-async/app/apimodels/User.java +++ b/samples/server/petstore/java-play-framework-async/app/apimodels/User.java @@ -5,6 +5,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * A User who is purchasing from the pet store */ diff --git a/samples/server/petstore/java-play-framework-async/app/controllers/PetApiController.java b/samples/server/petstore/java-play-framework-async/app/controllers/PetApiController.java index 093fa1b2a6ce..e24e2d82e838 100644 --- a/samples/server/petstore/java-play-framework-async/app/controllers/PetApiController.java +++ b/samples/server/petstore/java-play-framework-async/app/controllers/PetApiController.java @@ -24,6 +24,7 @@ import java.util.concurrent.CompletableFuture; import javax.validation.constraints.*; +import javax.validation.Valid; import com.typesafe.config.Config; import openapitools.OpenAPIUtils.ApiAction; diff --git a/samples/server/petstore/java-play-framework-async/app/controllers/PetApiControllerImp.java b/samples/server/petstore/java-play-framework-async/app/controllers/PetApiControllerImp.java index b865f46dffd0..0e07789f372d 100644 --- a/samples/server/petstore/java-play-framework-async/app/controllers/PetApiControllerImp.java +++ b/samples/server/petstore/java-play-framework-async/app/controllers/PetApiControllerImp.java @@ -14,6 +14,7 @@ import java.util.concurrent.CompletionStage; import java.util.concurrent.CompletableFuture; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaPlayFrameworkCodegen") public class PetApiControllerImp extends PetApiControllerImpInterface { @Override diff --git a/samples/server/petstore/java-play-framework-async/app/controllers/PetApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-async/app/controllers/PetApiControllerImpInterface.java index 73f7d4c870ba..2bad62696e26 100644 --- a/samples/server/petstore/java-play-framework-async/app/controllers/PetApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-async/app/controllers/PetApiControllerImpInterface.java @@ -24,6 +24,7 @@ import java.util.concurrent.CompletableFuture; import javax.validation.constraints.*; +import javax.validation.Valid; @SuppressWarnings("RedundantThrows") public abstract class PetApiControllerImpInterface { diff --git a/samples/server/petstore/java-play-framework-async/app/controllers/StoreApiController.java b/samples/server/petstore/java-play-framework-async/app/controllers/StoreApiController.java index 927c2794470f..3af3ee78dd7f 100644 --- a/samples/server/petstore/java-play-framework-async/app/controllers/StoreApiController.java +++ b/samples/server/petstore/java-play-framework-async/app/controllers/StoreApiController.java @@ -23,6 +23,7 @@ import java.util.concurrent.CompletableFuture; import javax.validation.constraints.*; +import javax.validation.Valid; import com.typesafe.config.Config; import openapitools.OpenAPIUtils.ApiAction; diff --git a/samples/server/petstore/java-play-framework-async/app/controllers/StoreApiControllerImp.java b/samples/server/petstore/java-play-framework-async/app/controllers/StoreApiControllerImp.java index 05b9594f9994..13d3d0e33537 100644 --- a/samples/server/petstore/java-play-framework-async/app/controllers/StoreApiControllerImp.java +++ b/samples/server/petstore/java-play-framework-async/app/controllers/StoreApiControllerImp.java @@ -13,6 +13,7 @@ import java.util.concurrent.CompletionStage; import java.util.concurrent.CompletableFuture; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaPlayFrameworkCodegen") public class StoreApiControllerImp extends StoreApiControllerImpInterface { @Override diff --git a/samples/server/petstore/java-play-framework-async/app/controllers/StoreApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-async/app/controllers/StoreApiControllerImpInterface.java index 3afa76d31144..02431b095ca1 100644 --- a/samples/server/petstore/java-play-framework-async/app/controllers/StoreApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-async/app/controllers/StoreApiControllerImpInterface.java @@ -23,6 +23,7 @@ import java.util.concurrent.CompletableFuture; import javax.validation.constraints.*; +import javax.validation.Valid; @SuppressWarnings("RedundantThrows") public abstract class StoreApiControllerImpInterface { diff --git a/samples/server/petstore/java-play-framework-async/app/controllers/UserApiController.java b/samples/server/petstore/java-play-framework-async/app/controllers/UserApiController.java index a48e8d6b4374..12c1fb33d95c 100644 --- a/samples/server/petstore/java-play-framework-async/app/controllers/UserApiController.java +++ b/samples/server/petstore/java-play-framework-async/app/controllers/UserApiController.java @@ -23,6 +23,7 @@ import java.util.concurrent.CompletableFuture; import javax.validation.constraints.*; +import javax.validation.Valid; import com.typesafe.config.Config; import openapitools.OpenAPIUtils.ApiAction; @@ -58,9 +59,9 @@ public CompletionStage createUser(Http.Request request) throws Exception @ApiAction public CompletionStage createUsersWithArrayInput(Http.Request request) throws Exception { JsonNode nodebody = request.body().asJson(); - List body; + List<@Valid User> body; if (nodebody != null) { - body = mapper.readValue(nodebody.toString(), new TypeReference>(){}); + body = mapper.readValue(nodebody.toString(), new TypeReference>(){}); if (configuration.getBoolean("useInputBeanValidation")) { for (User curItem : body) { OpenAPIUtils.validate(curItem); @@ -75,9 +76,9 @@ public CompletionStage createUsersWithArrayInput(Http.Request request) t @ApiAction public CompletionStage createUsersWithListInput(Http.Request request) throws Exception { JsonNode nodebody = request.body().asJson(); - List body; + List<@Valid User> body; if (nodebody != null) { - body = mapper.readValue(nodebody.toString(), new TypeReference>(){}); + body = mapper.readValue(nodebody.toString(), new TypeReference>(){}); if (configuration.getBoolean("useInputBeanValidation")) { for (User curItem : body) { OpenAPIUtils.validate(curItem); diff --git a/samples/server/petstore/java-play-framework-async/app/controllers/UserApiControllerImp.java b/samples/server/petstore/java-play-framework-async/app/controllers/UserApiControllerImp.java index d91f66b3cf4e..046032de713e 100644 --- a/samples/server/petstore/java-play-framework-async/app/controllers/UserApiControllerImp.java +++ b/samples/server/petstore/java-play-framework-async/app/controllers/UserApiControllerImp.java @@ -13,6 +13,7 @@ import java.util.concurrent.CompletionStage; import java.util.concurrent.CompletableFuture; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaPlayFrameworkCodegen") public class UserApiControllerImp extends UserApiControllerImpInterface { @Override @@ -21,12 +22,12 @@ public void createUser(Http.Request request, User body) throws Exception { } @Override - public void createUsersWithArrayInput(Http.Request request, List body) throws Exception { + public void createUsersWithArrayInput(Http.Request request, List<@Valid User> body) throws Exception { //Do your magic!!! } @Override - public void createUsersWithListInput(Http.Request request, List body) throws Exception { + public void createUsersWithListInput(Http.Request request, List<@Valid User> body) throws Exception { //Do your magic!!! } diff --git a/samples/server/petstore/java-play-framework-async/app/controllers/UserApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-async/app/controllers/UserApiControllerImpInterface.java index 7c9f9f60346e..21388f030cec 100644 --- a/samples/server/petstore/java-play-framework-async/app/controllers/UserApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-async/app/controllers/UserApiControllerImpInterface.java @@ -23,6 +23,7 @@ import java.util.concurrent.CompletableFuture; import javax.validation.constraints.*; +import javax.validation.Valid; @SuppressWarnings("RedundantThrows") public abstract class UserApiControllerImpInterface { @@ -45,7 +46,7 @@ public CompletionStage createUserHttp(Http.Request request, User body) t public abstract void createUser(Http.Request request, User body) throws Exception; - public CompletionStage createUsersWithArrayInputHttp(Http.Request request, List body) throws Exception { + public CompletionStage createUsersWithArrayInputHttp(Http.Request request, List<@Valid User> body) throws Exception { CompletableFuture result = CompletableFuture.supplyAsync(() -> { try { createUsersWithArrayInput(request, body); @@ -58,9 +59,9 @@ public CompletionStage createUsersWithArrayInputHttp(Http.Request reques } - public abstract void createUsersWithArrayInput(Http.Request request, List body) throws Exception; + public abstract void createUsersWithArrayInput(Http.Request request, List<@Valid User> body) throws Exception; - public CompletionStage createUsersWithListInputHttp(Http.Request request, List body) throws Exception { + public CompletionStage createUsersWithListInputHttp(Http.Request request, List<@Valid User> body) throws Exception { CompletableFuture result = CompletableFuture.supplyAsync(() -> { try { createUsersWithListInput(request, body); @@ -73,7 +74,7 @@ public CompletionStage createUsersWithListInputHttp(Http.Request request } - public abstract void createUsersWithListInput(Http.Request request, List body) throws Exception; + public abstract void createUsersWithListInput(Http.Request request, List<@Valid User> body) throws Exception; public CompletionStage deleteUserHttp(Http.Request request, String username) throws Exception { CompletableFuture result = CompletableFuture.supplyAsync(() -> { diff --git a/samples/server/petstore/java-play-framework-controller-only/app/apimodels/Category.java b/samples/server/petstore/java-play-framework-controller-only/app/apimodels/Category.java index afed4d545a99..2c2765d9a802 100644 --- a/samples/server/petstore/java-play-framework-controller-only/app/apimodels/Category.java +++ b/samples/server/petstore/java-play-framework-controller-only/app/apimodels/Category.java @@ -5,6 +5,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * A category for a pet */ diff --git a/samples/server/petstore/java-play-framework-controller-only/app/apimodels/ModelApiResponse.java b/samples/server/petstore/java-play-framework-controller-only/app/apimodels/ModelApiResponse.java index 301968462bb4..883865cd5098 100644 --- a/samples/server/petstore/java-play-framework-controller-only/app/apimodels/ModelApiResponse.java +++ b/samples/server/petstore/java-play-framework-controller-only/app/apimodels/ModelApiResponse.java @@ -6,6 +6,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * Describes the result of uploading an image resource */ diff --git a/samples/server/petstore/java-play-framework-controller-only/app/apimodels/Order.java b/samples/server/petstore/java-play-framework-controller-only/app/apimodels/Order.java index d54cba148ad3..29b6e3f6b5cb 100644 --- a/samples/server/petstore/java-play-framework-controller-only/app/apimodels/Order.java +++ b/samples/server/petstore/java-play-framework-controller-only/app/apimodels/Order.java @@ -6,6 +6,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * An order for a pets from the pet store */ diff --git a/samples/server/petstore/java-play-framework-controller-only/app/apimodels/Pet.java b/samples/server/petstore/java-play-framework-controller-only/app/apimodels/Pet.java index 2ea68e667f47..b3bcca614be0 100644 --- a/samples/server/petstore/java-play-framework-controller-only/app/apimodels/Pet.java +++ b/samples/server/petstore/java-play-framework-controller-only/app/apimodels/Pet.java @@ -10,6 +10,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * A pet for sale in the pet store */ @@ -38,7 +39,7 @@ public class Pet { @JsonProperty("tags") @Valid - private List tags = null; + private List<@Valid Tag> tags = null; /** * pet status in the store @@ -153,7 +154,7 @@ public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List tags) { + public Pet tags(List<@Valid Tag> tags) { this.tags = tags; return this; } @@ -170,11 +171,11 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags **/ - public List getTags() { + public List<@Valid Tag> getTags() { return tags; } - public void setTags(List tags) { + public void setTags(List<@Valid Tag> tags) { this.tags = tags; } diff --git a/samples/server/petstore/java-play-framework-controller-only/app/apimodels/Tag.java b/samples/server/petstore/java-play-framework-controller-only/app/apimodels/Tag.java index adac882cd052..e6019d2887d1 100644 --- a/samples/server/petstore/java-play-framework-controller-only/app/apimodels/Tag.java +++ b/samples/server/petstore/java-play-framework-controller-only/app/apimodels/Tag.java @@ -5,6 +5,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * A tag for a pet */ diff --git a/samples/server/petstore/java-play-framework-controller-only/app/apimodels/User.java b/samples/server/petstore/java-play-framework-controller-only/app/apimodels/User.java index 4e5d397b990c..1a157887085b 100644 --- a/samples/server/petstore/java-play-framework-controller-only/app/apimodels/User.java +++ b/samples/server/petstore/java-play-framework-controller-only/app/apimodels/User.java @@ -5,6 +5,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * A User who is purchasing from the pet store */ diff --git a/samples/server/petstore/java-play-framework-controller-only/app/controllers/PetApiController.java b/samples/server/petstore/java-play-framework-controller-only/app/controllers/PetApiController.java index a477bbba24ea..15c1739a07d1 100644 --- a/samples/server/petstore/java-play-framework-controller-only/app/controllers/PetApiController.java +++ b/samples/server/petstore/java-play-framework-controller-only/app/controllers/PetApiController.java @@ -21,6 +21,7 @@ import com.fasterxml.jackson.core.type.TypeReference; import javax.validation.constraints.*; +import javax.validation.Valid; import com.typesafe.config.Config; import openapitools.OpenAPIUtils.ApiAction; diff --git a/samples/server/petstore/java-play-framework-controller-only/app/controllers/StoreApiController.java b/samples/server/petstore/java-play-framework-controller-only/app/controllers/StoreApiController.java index f8ac351ae749..f75bc166f38f 100644 --- a/samples/server/petstore/java-play-framework-controller-only/app/controllers/StoreApiController.java +++ b/samples/server/petstore/java-play-framework-controller-only/app/controllers/StoreApiController.java @@ -20,6 +20,7 @@ import com.fasterxml.jackson.core.type.TypeReference; import javax.validation.constraints.*; +import javax.validation.Valid; import com.typesafe.config.Config; import openapitools.OpenAPIUtils.ApiAction; diff --git a/samples/server/petstore/java-play-framework-controller-only/app/controllers/UserApiController.java b/samples/server/petstore/java-play-framework-controller-only/app/controllers/UserApiController.java index 0a862bf9d2c0..91c91a8fa734 100644 --- a/samples/server/petstore/java-play-framework-controller-only/app/controllers/UserApiController.java +++ b/samples/server/petstore/java-play-framework-controller-only/app/controllers/UserApiController.java @@ -20,6 +20,7 @@ import com.fasterxml.jackson.core.type.TypeReference; import javax.validation.constraints.*; +import javax.validation.Valid; import com.typesafe.config.Config; import openapitools.OpenAPIUtils.ApiAction; @@ -53,9 +54,9 @@ public Result createUser(Http.Request request) throws Exception { @ApiAction public Result createUsersWithArrayInput(Http.Request request) throws Exception { JsonNode nodebody = request.body().asJson(); - List body; + List<@Valid User> body; if (nodebody != null) { - body = mapper.readValue(nodebody.toString(), new TypeReference>(){}); + body = mapper.readValue(nodebody.toString(), new TypeReference>(){}); if (configuration.getBoolean("useInputBeanValidation")) { for (User curItem : body) { OpenAPIUtils.validate(curItem); @@ -70,9 +71,9 @@ public Result createUsersWithArrayInput(Http.Request request) throws Exception { @ApiAction public Result createUsersWithListInput(Http.Request request) throws Exception { JsonNode nodebody = request.body().asJson(); - List body; + List<@Valid User> body; if (nodebody != null) { - body = mapper.readValue(nodebody.toString(), new TypeReference>(){}); + body = mapper.readValue(nodebody.toString(), new TypeReference>(){}); if (configuration.getBoolean("useInputBeanValidation")) { for (User curItem : body) { OpenAPIUtils.validate(curItem); diff --git a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/apimodels/Category.java b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/apimodels/Category.java index afed4d545a99..2c2765d9a802 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/apimodels/Category.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/apimodels/Category.java @@ -5,6 +5,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * A category for a pet */ diff --git a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/apimodels/ModelApiResponse.java b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/apimodels/ModelApiResponse.java index 301968462bb4..883865cd5098 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/apimodels/ModelApiResponse.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/apimodels/ModelApiResponse.java @@ -6,6 +6,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * Describes the result of uploading an image resource */ diff --git a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/apimodels/Order.java b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/apimodels/Order.java index d54cba148ad3..29b6e3f6b5cb 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/apimodels/Order.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/apimodels/Order.java @@ -6,6 +6,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * An order for a pets from the pet store */ diff --git a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/apimodels/Pet.java b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/apimodels/Pet.java index 2ea68e667f47..b3bcca614be0 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/apimodels/Pet.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/apimodels/Pet.java @@ -10,6 +10,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * A pet for sale in the pet store */ @@ -38,7 +39,7 @@ public class Pet { @JsonProperty("tags") @Valid - private List tags = null; + private List<@Valid Tag> tags = null; /** * pet status in the store @@ -153,7 +154,7 @@ public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List tags) { + public Pet tags(List<@Valid Tag> tags) { this.tags = tags; return this; } @@ -170,11 +171,11 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags **/ - public List getTags() { + public List<@Valid Tag> getTags() { return tags; } - public void setTags(List tags) { + public void setTags(List<@Valid Tag> tags) { this.tags = tags; } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/apimodels/Tag.java b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/apimodels/Tag.java index adac882cd052..e6019d2887d1 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/apimodels/Tag.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/apimodels/Tag.java @@ -5,6 +5,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * A tag for a pet */ diff --git a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/apimodels/User.java b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/apimodels/User.java index 4e5d397b990c..1a157887085b 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/apimodels/User.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/apimodels/User.java @@ -5,6 +5,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * A User who is purchasing from the pet store */ diff --git a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/controllers/PetApiController.java b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/controllers/PetApiController.java index d66a24f477c3..20e07a95ad4b 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/controllers/PetApiController.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/controllers/PetApiController.java @@ -19,6 +19,7 @@ import com.fasterxml.jackson.core.type.TypeReference; import javax.validation.constraints.*; +import javax.validation.Valid; import com.typesafe.config.Config; import openapitools.OpenAPIUtils.ApiAction; diff --git a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/controllers/PetApiControllerImp.java b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/controllers/PetApiControllerImp.java index baaedaae78c9..f429d96bd8b2 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/controllers/PetApiControllerImp.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/controllers/PetApiControllerImp.java @@ -10,6 +10,7 @@ import java.io.FileInputStream; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaPlayFrameworkCodegen") public class PetApiControllerImp extends PetApiControllerImpInterface { @Override diff --git a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/controllers/PetApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/controllers/PetApiControllerImpInterface.java index 3c05b7bff361..0a6e22a7af49 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/controllers/PetApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/app/controllers/PetApiControllerImpInterface.java @@ -19,6 +19,7 @@ import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @SuppressWarnings("RedundantThrows") public abstract class PetApiControllerImpInterface { diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AdditionalPropertiesAnyType.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AdditionalPropertiesAnyType.java index b0a7d76dd743..b596063e22a3 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AdditionalPropertiesAnyType.java @@ -7,6 +7,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * AdditionalPropertiesAnyType */ diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AdditionalPropertiesArray.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AdditionalPropertiesArray.java index 84342b61bd46..8c802c737899 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AdditionalPropertiesArray.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AdditionalPropertiesArray.java @@ -8,6 +8,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * AdditionalPropertiesArray */ diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AdditionalPropertiesBoolean.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AdditionalPropertiesBoolean.java index f6631c053d4f..98b3f22bacd1 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AdditionalPropertiesBoolean.java @@ -7,6 +7,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * AdditionalPropertiesBoolean */ diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AdditionalPropertiesClass.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AdditionalPropertiesClass.java index 84ba450c9601..044eaf655d49 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AdditionalPropertiesClass.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AdditionalPropertiesClass.java @@ -9,6 +9,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * AdditionalPropertiesClass */ diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AdditionalPropertiesInteger.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AdditionalPropertiesInteger.java index 9d1d43a69d83..712afcd8b5fd 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AdditionalPropertiesInteger.java @@ -7,6 +7,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * AdditionalPropertiesInteger */ diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AdditionalPropertiesNumber.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AdditionalPropertiesNumber.java index d87ad137d020..4ee8a083c0ad 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AdditionalPropertiesNumber.java @@ -8,6 +8,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * AdditionalPropertiesNumber */ diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AdditionalPropertiesObject.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AdditionalPropertiesObject.java index c7bf488d2ffd..830315edb27e 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AdditionalPropertiesObject.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AdditionalPropertiesObject.java @@ -7,6 +7,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * AdditionalPropertiesObject */ diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AdditionalPropertiesString.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AdditionalPropertiesString.java index 0c2c8c1ebc4a..746fdd04e47b 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AdditionalPropertiesString.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AdditionalPropertiesString.java @@ -7,6 +7,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * AdditionalPropertiesString */ diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Animal.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Animal.java index f7b46fdf15e8..7370e4269721 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Animal.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Animal.java @@ -8,6 +8,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * Animal */ diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ArrayOfArrayOfNumberOnly.java index c6def2db6ad3..7c930dc6a937 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ArrayOfArrayOfNumberOnly.java @@ -9,6 +9,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * ArrayOfArrayOfNumberOnly */ diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ArrayOfNumberOnly.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ArrayOfNumberOnly.java index f397215bac15..c6a814c8d18c 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ArrayOfNumberOnly.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ArrayOfNumberOnly.java @@ -9,6 +9,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * ArrayOfNumberOnly */ diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ArrayTest.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ArrayTest.java index b894cfc76b37..5a11d75d9968 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ArrayTest.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ArrayTest.java @@ -9,6 +9,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * ArrayTest */ @@ -27,7 +28,7 @@ public class ArrayTest { @JsonProperty("array_array_of_model") @Valid - private List> arrayArrayOfModel = null; + private List> arrayArrayOfModel = null; public ArrayTest arrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; @@ -79,12 +80,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 arrayArrayOfModelItem) { + public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) { if (this.arrayArrayOfModel == null) { this.arrayArrayOfModel = new ArrayList<>(); } @@ -96,11 +97,11 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * Get arrayArrayOfModel * @return arrayArrayOfModel **/ - public List> getArrayArrayOfModel() { + public List> getArrayArrayOfModel() { return arrayArrayOfModel; } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { + public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/BigCat.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/BigCat.java index 4acdbb7e67aa..fdddc5300d61 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/BigCat.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/BigCat.java @@ -6,6 +6,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * BigCat */ diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Capitalization.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Capitalization.java index adbe5dd10fae..27a669388840 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Capitalization.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Capitalization.java @@ -5,6 +5,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * Capitalization */ diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Cat.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Cat.java index 014159adc645..168c9ed651fb 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Cat.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Cat.java @@ -6,6 +6,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * Cat */ diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Category.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Category.java index 453ad7e2a958..dd84fb3e24fa 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Category.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Category.java @@ -5,6 +5,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * Category */ diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ClassModel.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ClassModel.java index a35a880dd0c8..bcf0008f22bc 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ClassModel.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ClassModel.java @@ -5,6 +5,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * Model for testing model with \"_class\" property */ diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Client.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Client.java index e5792709a198..6c2947efdf72 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Client.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Client.java @@ -5,6 +5,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * Client */ diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Dog.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Dog.java index 8887b68658ae..2943b8d6c063 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Dog.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Dog.java @@ -6,6 +6,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * Dog */ diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/EnumArrays.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/EnumArrays.java index c2d1b809165b..73f0822af839 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/EnumArrays.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/EnumArrays.java @@ -8,6 +8,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * EnumArrays */ diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/EnumTest.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/EnumTest.java index 6081f7810492..11d48fee066b 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/EnumTest.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/EnumTest.java @@ -7,6 +7,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * EnumTest */ diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/FileSchemaTestClass.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/FileSchemaTestClass.java index 9a11315dd65c..147456326d4f 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/FileSchemaTestClass.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/FileSchemaTestClass.java @@ -9,6 +9,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * FileSchemaTestClass */ @@ -23,7 +24,7 @@ public class FileSchemaTestClass { @JsonProperty("files") @Valid - private List files = null; + private List<@Valid ModelFile> files = null; public FileSchemaTestClass _file(ModelFile _file) { this._file = _file; @@ -42,7 +43,7 @@ public void setFile(ModelFile _file) { this._file = _file; } - public FileSchemaTestClass files(List files) { + public FileSchemaTestClass files(List<@Valid ModelFile> files) { this.files = files; return this; } @@ -59,11 +60,11 @@ public FileSchemaTestClass addFilesItem(ModelFile filesItem) { * Get files * @return files **/ - public List getFiles() { + public List<@Valid ModelFile> getFiles() { return files; } - public void setFiles(List files) { + public void setFiles(List<@Valid ModelFile> files) { this.files = files; } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/FormatTest.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/FormatTest.java index c6427147ba66..24462c23a843 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/FormatTest.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/FormatTest.java @@ -11,6 +11,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * FormatTest */ diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/HasOnlyReadOnly.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/HasOnlyReadOnly.java index 697e96681c7d..afdf9b42ffe9 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/HasOnlyReadOnly.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/HasOnlyReadOnly.java @@ -6,6 +6,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * HasOnlyReadOnly */ diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/MapTest.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/MapTest.java index 230ffa29bc84..a2d839ecda3c 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/MapTest.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/MapTest.java @@ -7,6 +7,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * MapTest */ diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/MixedPropertiesAndAdditionalPropertiesClass.java index b5ae9f0b47fd..8d5294afa279 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/MixedPropertiesAndAdditionalPropertiesClass.java @@ -10,6 +10,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * MixedPropertiesAndAdditionalPropertiesClass */ diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Model200Response.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Model200Response.java index ebffc7e5dc27..2e560509bac3 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Model200Response.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Model200Response.java @@ -6,6 +6,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * Model for testing model name starting with number */ diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ModelApiResponse.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ModelApiResponse.java index 0820d45f5def..a7eda644d156 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ModelApiResponse.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ModelApiResponse.java @@ -6,6 +6,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * ModelApiResponse */ diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ModelFile.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ModelFile.java index 9f509226df49..f500767f55fc 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ModelFile.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ModelFile.java @@ -6,6 +6,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * Must be named `File` for test. */ diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ModelList.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ModelList.java index e31afffb3ac2..99113c60c67a 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ModelList.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ModelList.java @@ -6,6 +6,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * ModelList */ diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ModelReturn.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ModelReturn.java index e367c3941e94..fb6e7414102c 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ModelReturn.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ModelReturn.java @@ -6,6 +6,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * Model for testing reserved words */ diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Name.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Name.java index 232f49c5dceb..e7365ee40ef1 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Name.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Name.java @@ -5,6 +5,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * Model for testing model name same as property name */ diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/NumberOnly.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/NumberOnly.java index bbcccc2ebe09..50d14fe892f1 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/NumberOnly.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/NumberOnly.java @@ -6,6 +6,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * NumberOnly */ diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Order.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Order.java index ad0b6c1e8617..a49f506d42c0 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Order.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Order.java @@ -6,6 +6,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * Order */ diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/OuterComposite.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/OuterComposite.java index 3f19923097ac..ee01312bf163 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/OuterComposite.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/OuterComposite.java @@ -6,6 +6,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * OuterComposite */ diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Pet.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Pet.java index f58450cb480d..3621b6d35d65 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Pet.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Pet.java @@ -13,6 +13,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * Pet */ @@ -41,7 +42,7 @@ public class Pet { @JsonProperty("tags") @Valid - private List tags = null; + private List<@Valid Tag> tags = null; /** * pet status in the store @@ -157,7 +158,7 @@ public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List tags) { + public Pet tags(List<@Valid Tag> tags) { this.tags = tags; return this; } @@ -174,11 +175,11 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags **/ - public List getTags() { + public List<@Valid Tag> getTags() { return tags; } - public void setTags(List tags) { + public void setTags(List<@Valid Tag> tags) { this.tags = tags; } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ReadOnlyFirst.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ReadOnlyFirst.java index 55d2816002b8..1ed67fc36637 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ReadOnlyFirst.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ReadOnlyFirst.java @@ -5,6 +5,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * ReadOnlyFirst */ diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/SpecialModelName.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/SpecialModelName.java index da472606817b..779ca5d74ff3 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/SpecialModelName.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/SpecialModelName.java @@ -6,6 +6,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * SpecialModelName */ diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Tag.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Tag.java index 39bceb93f4ac..e200bcda99de 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Tag.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Tag.java @@ -5,6 +5,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * Tag */ diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/TypeHolderDefault.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/TypeHolderDefault.java index 688a80ca22b7..b7fb95fff2cc 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/TypeHolderDefault.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/TypeHolderDefault.java @@ -9,6 +9,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * TypeHolderDefault */ diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/TypeHolderExample.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/TypeHolderExample.java index 8a713cb754d0..08d86718b51d 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/TypeHolderExample.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/TypeHolderExample.java @@ -9,6 +9,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * TypeHolderExample */ diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/User.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/User.java index 72ef978f3dca..3b3c01615e6a 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/User.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/User.java @@ -5,6 +5,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * User */ diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/XmlItem.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/XmlItem.java index 09654e3285d1..aa88e14b9a73 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/XmlItem.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/XmlItem.java @@ -9,6 +9,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * XmlItem */ diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/AnotherFakeApiController.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/AnotherFakeApiController.java index 1583cc31312a..1110f15b03c3 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/AnotherFakeApiController.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/AnotherFakeApiController.java @@ -20,6 +20,7 @@ import com.fasterxml.jackson.core.type.TypeReference; import javax.validation.constraints.*; +import javax.validation.Valid; import com.typesafe.config.Config; import openapitools.OpenAPIUtils.ApiAction; diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/AnotherFakeApiControllerImp.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/AnotherFakeApiControllerImp.java index 090cf0e428af..f069c2316cbd 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/AnotherFakeApiControllerImp.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/AnotherFakeApiControllerImp.java @@ -11,6 +11,7 @@ import java.io.FileInputStream; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaPlayFrameworkCodegen") public class AnotherFakeApiControllerImp extends AnotherFakeApiControllerImpInterface { @Override diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/AnotherFakeApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/AnotherFakeApiControllerImpInterface.java index 2ab1a36b0d98..cda2b4a8b326 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/AnotherFakeApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/AnotherFakeApiControllerImpInterface.java @@ -20,6 +20,7 @@ import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @SuppressWarnings("RedundantThrows") public abstract class AnotherFakeApiControllerImpInterface { diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/FakeApiController.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/FakeApiController.java index 8cc88003ee33..45901365f1b1 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/FakeApiController.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/FakeApiController.java @@ -28,6 +28,7 @@ import com.fasterxml.jackson.core.type.TypeReference; import javax.validation.constraints.*; +import javax.validation.Valid; import com.typesafe.config.Config; import openapitools.OpenAPIUtils.ApiAction; diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/FakeApiControllerImp.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/FakeApiControllerImp.java index 0d999b3bde66..1fc64b9c08c5 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/FakeApiControllerImp.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/FakeApiControllerImp.java @@ -19,6 +19,7 @@ import java.io.FileInputStream; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaPlayFrameworkCodegen") public class FakeApiControllerImp extends FakeApiControllerImpInterface { @Override diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/FakeApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/FakeApiControllerImpInterface.java index b7871b677ac6..4625cca51f05 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/FakeApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/FakeApiControllerImpInterface.java @@ -28,6 +28,7 @@ import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @SuppressWarnings("RedundantThrows") public abstract class FakeApiControllerImpInterface { diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/FakeClassnameTags123ApiController.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/FakeClassnameTags123ApiController.java index 8f2ca195120a..4129cedfd8ad 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/FakeClassnameTags123ApiController.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/FakeClassnameTags123ApiController.java @@ -19,6 +19,7 @@ import com.fasterxml.jackson.core.type.TypeReference; import javax.validation.constraints.*; +import javax.validation.Valid; import com.typesafe.config.Config; import openapitools.OpenAPIUtils.ApiAction; diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/FakeClassnameTags123ApiControllerImp.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/FakeClassnameTags123ApiControllerImp.java index c3103ee3ec87..51ebec1dd04f 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/FakeClassnameTags123ApiControllerImp.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/FakeClassnameTags123ApiControllerImp.java @@ -10,6 +10,7 @@ import java.io.FileInputStream; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaPlayFrameworkCodegen") public class FakeClassnameTags123ApiControllerImp extends FakeClassnameTags123ApiControllerImpInterface { @Override diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/FakeClassnameTags123ApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/FakeClassnameTags123ApiControllerImpInterface.java index 17286d728b85..64c01a9e1eac 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/FakeClassnameTags123ApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/FakeClassnameTags123ApiControllerImpInterface.java @@ -19,6 +19,7 @@ import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @SuppressWarnings("RedundantThrows") public abstract class FakeClassnameTags123ApiControllerImpInterface { diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiController.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiController.java index 700be254347a..bc3848b0e41d 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiController.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiController.java @@ -22,6 +22,7 @@ import com.fasterxml.jackson.core.type.TypeReference; import javax.validation.constraints.*; +import javax.validation.Valid; import com.typesafe.config.Config; import openapitools.OpenAPIUtils.ApiAction; diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiControllerImp.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiControllerImp.java index d1c85f1e7fdd..ebc97f08ff73 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiControllerImp.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiControllerImp.java @@ -13,6 +13,7 @@ import java.io.FileInputStream; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaPlayFrameworkCodegen") public class PetApiControllerImp extends PetApiControllerImpInterface { @Override diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiControllerImpInterface.java index e9ab7c1397f8..73b25e32a7c9 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiControllerImpInterface.java @@ -22,6 +22,7 @@ import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @SuppressWarnings("RedundantThrows") public abstract class PetApiControllerImpInterface { diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/StoreApiController.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/StoreApiController.java index 29596d15fb1e..ba0449715144 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/StoreApiController.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/StoreApiController.java @@ -20,6 +20,7 @@ import com.fasterxml.jackson.core.type.TypeReference; import javax.validation.constraints.*; +import javax.validation.Valid; import com.typesafe.config.Config; import openapitools.OpenAPIUtils.ApiAction; diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/StoreApiControllerImp.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/StoreApiControllerImp.java index 0d10b230b617..c42de86818b9 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/StoreApiControllerImp.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/StoreApiControllerImp.java @@ -11,6 +11,7 @@ import java.io.FileInputStream; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaPlayFrameworkCodegen") public class StoreApiControllerImp extends StoreApiControllerImpInterface { @Override diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/StoreApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/StoreApiControllerImpInterface.java index 67780d39c1cf..3111fd7b6c4c 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/StoreApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/StoreApiControllerImpInterface.java @@ -20,6 +20,7 @@ import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @SuppressWarnings("RedundantThrows") public abstract class StoreApiControllerImpInterface { diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/UserApiController.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/UserApiController.java index 240f87644886..33d172d7c431 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/UserApiController.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/UserApiController.java @@ -20,6 +20,7 @@ import com.fasterxml.jackson.core.type.TypeReference; import javax.validation.constraints.*; +import javax.validation.Valid; import com.typesafe.config.Config; import openapitools.OpenAPIUtils.ApiAction; @@ -55,9 +56,9 @@ public Result createUser(Http.Request request) throws Exception { @ApiAction public Result createUsersWithArrayInput(Http.Request request) throws Exception { JsonNode nodebody = request.body().asJson(); - List body; + List<@Valid User> body; if (nodebody != null) { - body = mapper.readValue(nodebody.toString(), new TypeReference>(){}); + body = mapper.readValue(nodebody.toString(), new TypeReference>(){}); if (configuration.getBoolean("useInputBeanValidation")) { for (User curItem : body) { OpenAPIUtils.validate(curItem); @@ -72,9 +73,9 @@ public Result createUsersWithArrayInput(Http.Request request) throws Exception { @ApiAction public Result createUsersWithListInput(Http.Request request) throws Exception { JsonNode nodebody = request.body().asJson(); - List body; + List<@Valid User> body; if (nodebody != null) { - body = mapper.readValue(nodebody.toString(), new TypeReference>(){}); + body = mapper.readValue(nodebody.toString(), new TypeReference>(){}); if (configuration.getBoolean("useInputBeanValidation")) { for (User curItem : body) { OpenAPIUtils.validate(curItem); diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/UserApiControllerImp.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/UserApiControllerImp.java index 941e5d9f6ce2..284f8c7f950d 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/UserApiControllerImp.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/UserApiControllerImp.java @@ -11,6 +11,7 @@ import java.io.FileInputStream; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaPlayFrameworkCodegen") public class UserApiControllerImp extends UserApiControllerImpInterface { @Override @@ -19,12 +20,12 @@ public void createUser(Http.Request request, User body) throws Exception { } @Override - public void createUsersWithArrayInput(Http.Request request, List body) throws Exception { + public void createUsersWithArrayInput(Http.Request request, List<@Valid User> body) throws Exception { //Do your magic!!! } @Override - public void createUsersWithListInput(Http.Request request, List body) throws Exception { + public void createUsersWithListInput(Http.Request request, List<@Valid User> body) throws Exception { //Do your magic!!! } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/UserApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/UserApiControllerImpInterface.java index 9737f817f0e2..083eb4d7d02e 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/UserApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/UserApiControllerImpInterface.java @@ -20,6 +20,7 @@ import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @SuppressWarnings("RedundantThrows") public abstract class UserApiControllerImpInterface { @@ -35,21 +36,21 @@ public Result createUserHttp(Http.Request request, User body) throws Exception { public abstract void createUser(Http.Request request, User body) throws Exception; - public Result createUsersWithArrayInputHttp(Http.Request request, List body) throws Exception { + public Result createUsersWithArrayInputHttp(Http.Request request, List<@Valid User> body) throws Exception { createUsersWithArrayInput(request, body); return ok(); } - public abstract void createUsersWithArrayInput(Http.Request request, List body) throws Exception; + public abstract void createUsersWithArrayInput(Http.Request request, List<@Valid User> body) throws Exception; - public Result createUsersWithListInputHttp(Http.Request request, List body) throws Exception { + public Result createUsersWithListInputHttp(Http.Request request, List<@Valid User> body) throws Exception { createUsersWithListInput(request, body); return ok(); } - public abstract void createUsersWithListInput(Http.Request request, List body) throws Exception; + public abstract void createUsersWithListInput(Http.Request request, List<@Valid User> body) throws Exception; public Result deleteUserHttp(Http.Request request, String username) throws Exception { deleteUser(request, username); diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/Category.java b/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/Category.java index afed4d545a99..2c2765d9a802 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/Category.java +++ b/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/Category.java @@ -5,6 +5,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * A category for a pet */ diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/ModelApiResponse.java b/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/ModelApiResponse.java index 301968462bb4..883865cd5098 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/ModelApiResponse.java +++ b/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/ModelApiResponse.java @@ -6,6 +6,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * Describes the result of uploading an image resource */ diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/Order.java b/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/Order.java index d54cba148ad3..29b6e3f6b5cb 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/Order.java +++ b/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/Order.java @@ -6,6 +6,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * An order for a pets from the pet store */ diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/Pet.java b/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/Pet.java index 2ea68e667f47..b3bcca614be0 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/Pet.java +++ b/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/Pet.java @@ -10,6 +10,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * A pet for sale in the pet store */ @@ -38,7 +39,7 @@ public class Pet { @JsonProperty("tags") @Valid - private List tags = null; + private List<@Valid Tag> tags = null; /** * pet status in the store @@ -153,7 +154,7 @@ public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List tags) { + public Pet tags(List<@Valid Tag> tags) { this.tags = tags; return this; } @@ -170,11 +171,11 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags **/ - public List getTags() { + public List<@Valid Tag> getTags() { return tags; } - public void setTags(List tags) { + public void setTags(List<@Valid Tag> tags) { this.tags = tags; } diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/Tag.java b/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/Tag.java index adac882cd052..e6019d2887d1 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/Tag.java +++ b/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/Tag.java @@ -5,6 +5,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * A tag for a pet */ diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/User.java b/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/User.java index 4e5d397b990c..1a157887085b 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/User.java +++ b/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/User.java @@ -5,6 +5,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * A User who is purchasing from the pet store */ diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/PetApiController.java b/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/PetApiController.java index e52afb643a2b..0ecbaa0f48eb 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/PetApiController.java +++ b/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/PetApiController.java @@ -22,6 +22,7 @@ import com.fasterxml.jackson.core.type.TypeReference; import javax.validation.constraints.*; +import javax.validation.Valid; import com.typesafe.config.Config; import openapitools.OpenAPIUtils.ApiAction; diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/PetApiControllerImp.java b/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/PetApiControllerImp.java index 5a45819711ef..0010fd8ce7e6 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/PetApiControllerImp.java +++ b/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/PetApiControllerImp.java @@ -12,6 +12,7 @@ import java.io.FileInputStream; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaPlayFrameworkCodegen") public class PetApiControllerImp extends PetApiControllerImpInterface { @Override diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/PetApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/PetApiControllerImpInterface.java index 34df059ba94a..34cfbb257d62 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/PetApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/PetApiControllerImpInterface.java @@ -21,6 +21,7 @@ import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @SuppressWarnings("RedundantThrows") public abstract class PetApiControllerImpInterface { diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/StoreApiController.java b/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/StoreApiController.java index 79c7202aaa27..ee129b72004d 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/StoreApiController.java +++ b/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/StoreApiController.java @@ -21,6 +21,7 @@ import com.fasterxml.jackson.core.type.TypeReference; import javax.validation.constraints.*; +import javax.validation.Valid; import com.typesafe.config.Config; import openapitools.OpenAPIUtils.ApiAction; diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/StoreApiControllerImp.java b/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/StoreApiControllerImp.java index ca2f73e6c3a6..ef8464bbc037 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/StoreApiControllerImp.java +++ b/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/StoreApiControllerImp.java @@ -11,6 +11,7 @@ import java.io.FileInputStream; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaPlayFrameworkCodegen") public class StoreApiControllerImp extends StoreApiControllerImpInterface { @Override diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/StoreApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/StoreApiControllerImpInterface.java index 31e5240767ad..e2cb6abf8083 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/StoreApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/StoreApiControllerImpInterface.java @@ -20,6 +20,7 @@ import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @SuppressWarnings("RedundantThrows") public abstract class StoreApiControllerImpInterface { diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/UserApiController.java b/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/UserApiController.java index 939a7afdacd9..78e543a3cbdd 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/UserApiController.java +++ b/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/UserApiController.java @@ -21,6 +21,7 @@ import com.fasterxml.jackson.core.type.TypeReference; import javax.validation.constraints.*; +import javax.validation.Valid; import com.typesafe.config.Config; import openapitools.OpenAPIUtils.ApiAction; @@ -56,9 +57,9 @@ public Result createUser(Http.Request request) throws IOException { @ApiAction public Result createUsersWithArrayInput(Http.Request request) throws IOException { JsonNode nodebody = request.body().asJson(); - List body; + List<@Valid User> body; if (nodebody != null) { - body = mapper.readValue(nodebody.toString(), new TypeReference>(){}); + body = mapper.readValue(nodebody.toString(), new TypeReference>(){}); if (configuration.getBoolean("useInputBeanValidation")) { for (User curItem : body) { OpenAPIUtils.validate(curItem); @@ -73,9 +74,9 @@ public Result createUsersWithArrayInput(Http.Request request) throws IOException @ApiAction public Result createUsersWithListInput(Http.Request request) throws IOException { JsonNode nodebody = request.body().asJson(); - List body; + List<@Valid User> body; if (nodebody != null) { - body = mapper.readValue(nodebody.toString(), new TypeReference>(){}); + body = mapper.readValue(nodebody.toString(), new TypeReference>(){}); if (configuration.getBoolean("useInputBeanValidation")) { for (User curItem : body) { OpenAPIUtils.validate(curItem); diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/UserApiControllerImp.java b/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/UserApiControllerImp.java index 79dfd1844648..d5399a889fe2 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/UserApiControllerImp.java +++ b/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/UserApiControllerImp.java @@ -11,6 +11,7 @@ import java.io.FileInputStream; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaPlayFrameworkCodegen") public class UserApiControllerImp extends UserApiControllerImpInterface { @Override @@ -19,12 +20,12 @@ public void createUser(Http.Request request, User body) { } @Override - public void createUsersWithArrayInput(Http.Request request, List body) { + public void createUsersWithArrayInput(Http.Request request, List<@Valid User> body) { //Do your magic!!! } @Override - public void createUsersWithListInput(Http.Request request, List body) { + public void createUsersWithListInput(Http.Request request, List<@Valid User> body) { //Do your magic!!! } diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/UserApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/UserApiControllerImpInterface.java index d26ead9d14da..712cf4ead3a1 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/UserApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/UserApiControllerImpInterface.java @@ -20,6 +20,7 @@ import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @SuppressWarnings("RedundantThrows") public abstract class UserApiControllerImpInterface { @@ -35,21 +36,21 @@ public Result createUserHttp(Http.Request request, User body) { public abstract void createUser(Http.Request request, User body) ; - public Result createUsersWithArrayInputHttp(Http.Request request, List body) { + public Result createUsersWithArrayInputHttp(Http.Request request, List<@Valid User> body) { createUsersWithArrayInput(request, body); return ok(); } - public abstract void createUsersWithArrayInput(Http.Request request, List body) ; + public abstract void createUsersWithArrayInput(Http.Request request, List<@Valid User> body) ; - public Result createUsersWithListInputHttp(Http.Request request, List body) { + public Result createUsersWithListInputHttp(Http.Request request, List<@Valid User> body) { createUsersWithListInput(request, body); return ok(); } - public abstract void createUsersWithListInput(Http.Request request, List body) ; + public abstract void createUsersWithListInput(Http.Request request, List<@Valid User> body) ; public Result deleteUserHttp(Http.Request request, String username) { deleteUser(request, username); diff --git a/samples/server/petstore/java-play-framework-no-interface/app/apimodels/Category.java b/samples/server/petstore/java-play-framework-no-interface/app/apimodels/Category.java index afed4d545a99..2c2765d9a802 100644 --- a/samples/server/petstore/java-play-framework-no-interface/app/apimodels/Category.java +++ b/samples/server/petstore/java-play-framework-no-interface/app/apimodels/Category.java @@ -5,6 +5,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * A category for a pet */ diff --git a/samples/server/petstore/java-play-framework-no-interface/app/apimodels/ModelApiResponse.java b/samples/server/petstore/java-play-framework-no-interface/app/apimodels/ModelApiResponse.java index 301968462bb4..883865cd5098 100644 --- a/samples/server/petstore/java-play-framework-no-interface/app/apimodels/ModelApiResponse.java +++ b/samples/server/petstore/java-play-framework-no-interface/app/apimodels/ModelApiResponse.java @@ -6,6 +6,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * Describes the result of uploading an image resource */ diff --git a/samples/server/petstore/java-play-framework-no-interface/app/apimodels/Order.java b/samples/server/petstore/java-play-framework-no-interface/app/apimodels/Order.java index d54cba148ad3..29b6e3f6b5cb 100644 --- a/samples/server/petstore/java-play-framework-no-interface/app/apimodels/Order.java +++ b/samples/server/petstore/java-play-framework-no-interface/app/apimodels/Order.java @@ -6,6 +6,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * An order for a pets from the pet store */ diff --git a/samples/server/petstore/java-play-framework-no-interface/app/apimodels/Pet.java b/samples/server/petstore/java-play-framework-no-interface/app/apimodels/Pet.java index 2ea68e667f47..b3bcca614be0 100644 --- a/samples/server/petstore/java-play-framework-no-interface/app/apimodels/Pet.java +++ b/samples/server/petstore/java-play-framework-no-interface/app/apimodels/Pet.java @@ -10,6 +10,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * A pet for sale in the pet store */ @@ -38,7 +39,7 @@ public class Pet { @JsonProperty("tags") @Valid - private List tags = null; + private List<@Valid Tag> tags = null; /** * pet status in the store @@ -153,7 +154,7 @@ public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List tags) { + public Pet tags(List<@Valid Tag> tags) { this.tags = tags; return this; } @@ -170,11 +171,11 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags **/ - public List getTags() { + public List<@Valid Tag> getTags() { return tags; } - public void setTags(List tags) { + public void setTags(List<@Valid Tag> tags) { this.tags = tags; } diff --git a/samples/server/petstore/java-play-framework-no-interface/app/apimodels/Tag.java b/samples/server/petstore/java-play-framework-no-interface/app/apimodels/Tag.java index adac882cd052..e6019d2887d1 100644 --- a/samples/server/petstore/java-play-framework-no-interface/app/apimodels/Tag.java +++ b/samples/server/petstore/java-play-framework-no-interface/app/apimodels/Tag.java @@ -5,6 +5,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * A tag for a pet */ diff --git a/samples/server/petstore/java-play-framework-no-interface/app/apimodels/User.java b/samples/server/petstore/java-play-framework-no-interface/app/apimodels/User.java index 4e5d397b990c..1a157887085b 100644 --- a/samples/server/petstore/java-play-framework-no-interface/app/apimodels/User.java +++ b/samples/server/petstore/java-play-framework-no-interface/app/apimodels/User.java @@ -5,6 +5,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * A User who is purchasing from the pet store */ diff --git a/samples/server/petstore/java-play-framework-no-interface/app/controllers/PetApiController.java b/samples/server/petstore/java-play-framework-no-interface/app/controllers/PetApiController.java index f43290fb2124..4db2b07fde99 100644 --- a/samples/server/petstore/java-play-framework-no-interface/app/controllers/PetApiController.java +++ b/samples/server/petstore/java-play-framework-no-interface/app/controllers/PetApiController.java @@ -22,6 +22,7 @@ import com.fasterxml.jackson.core.type.TypeReference; import javax.validation.constraints.*; +import javax.validation.Valid; import com.typesafe.config.Config; import openapitools.OpenAPIUtils.ApiAction; diff --git a/samples/server/petstore/java-play-framework-no-interface/app/controllers/PetApiControllerImp.java b/samples/server/petstore/java-play-framework-no-interface/app/controllers/PetApiControllerImp.java index 4f6506d0512b..8c1841bfc78f 100644 --- a/samples/server/petstore/java-play-framework-no-interface/app/controllers/PetApiControllerImp.java +++ b/samples/server/petstore/java-play-framework-no-interface/app/controllers/PetApiControllerImp.java @@ -12,6 +12,7 @@ import java.io.FileInputStream; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaPlayFrameworkCodegen") public class PetApiControllerImp { diff --git a/samples/server/petstore/java-play-framework-no-interface/app/controllers/StoreApiController.java b/samples/server/petstore/java-play-framework-no-interface/app/controllers/StoreApiController.java index 67f0cd4e3023..b20aaec67e16 100644 --- a/samples/server/petstore/java-play-framework-no-interface/app/controllers/StoreApiController.java +++ b/samples/server/petstore/java-play-framework-no-interface/app/controllers/StoreApiController.java @@ -21,6 +21,7 @@ import com.fasterxml.jackson.core.type.TypeReference; import javax.validation.constraints.*; +import javax.validation.Valid; import com.typesafe.config.Config; import openapitools.OpenAPIUtils.ApiAction; diff --git a/samples/server/petstore/java-play-framework-no-interface/app/controllers/StoreApiControllerImp.java b/samples/server/petstore/java-play-framework-no-interface/app/controllers/StoreApiControllerImp.java index 753d05ad817a..823d2088ccc9 100644 --- a/samples/server/petstore/java-play-framework-no-interface/app/controllers/StoreApiControllerImp.java +++ b/samples/server/petstore/java-play-framework-no-interface/app/controllers/StoreApiControllerImp.java @@ -11,6 +11,7 @@ import java.io.FileInputStream; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaPlayFrameworkCodegen") public class StoreApiControllerImp { diff --git a/samples/server/petstore/java-play-framework-no-interface/app/controllers/UserApiController.java b/samples/server/petstore/java-play-framework-no-interface/app/controllers/UserApiController.java index 2d1381a31491..e2cab0ec0e45 100644 --- a/samples/server/petstore/java-play-framework-no-interface/app/controllers/UserApiController.java +++ b/samples/server/petstore/java-play-framework-no-interface/app/controllers/UserApiController.java @@ -21,6 +21,7 @@ import com.fasterxml.jackson.core.type.TypeReference; import javax.validation.constraints.*; +import javax.validation.Valid; import com.typesafe.config.Config; import openapitools.OpenAPIUtils.ApiAction; @@ -60,9 +61,9 @@ public Result createUser(Http.Request request) throws Exception { @ApiAction public Result createUsersWithArrayInput(Http.Request request) throws Exception { JsonNode nodebody = request.body().asJson(); - List body; + List<@Valid User> body; if (nodebody != null) { - body = mapper.readValue(nodebody.toString(), new TypeReference>(){}); + body = mapper.readValue(nodebody.toString(), new TypeReference>(){}); if (configuration.getBoolean("useInputBeanValidation")) { for (User curItem : body) { OpenAPIUtils.validate(curItem); @@ -79,9 +80,9 @@ public Result createUsersWithArrayInput(Http.Request request) throws Exception { @ApiAction public Result createUsersWithListInput(Http.Request request) throws Exception { JsonNode nodebody = request.body().asJson(); - List body; + List<@Valid User> body; if (nodebody != null) { - body = mapper.readValue(nodebody.toString(), new TypeReference>(){}); + body = mapper.readValue(nodebody.toString(), new TypeReference>(){}); if (configuration.getBoolean("useInputBeanValidation")) { for (User curItem : body) { OpenAPIUtils.validate(curItem); diff --git a/samples/server/petstore/java-play-framework-no-interface/app/controllers/UserApiControllerImp.java b/samples/server/petstore/java-play-framework-no-interface/app/controllers/UserApiControllerImp.java index 870111fdbb88..14c29717b1ee 100644 --- a/samples/server/petstore/java-play-framework-no-interface/app/controllers/UserApiControllerImp.java +++ b/samples/server/petstore/java-play-framework-no-interface/app/controllers/UserApiControllerImp.java @@ -11,6 +11,7 @@ import java.io.FileInputStream; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaPlayFrameworkCodegen") public class UserApiControllerImp { @@ -19,12 +20,12 @@ public void createUser(Http.Request request, User body) throws Exception { } - public void createUsersWithArrayInput(Http.Request request, List body) throws Exception { + public void createUsersWithArrayInput(Http.Request request, List<@Valid User> body) throws Exception { //Do your magic!!! } - public void createUsersWithListInput(Http.Request request, List body) throws Exception { + public void createUsersWithListInput(Http.Request request, List<@Valid User> body) throws Exception { //Do your magic!!! } diff --git a/samples/server/petstore/java-play-framework-no-nullable/app/apimodels/Category.java b/samples/server/petstore/java-play-framework-no-nullable/app/apimodels/Category.java index afed4d545a99..2c2765d9a802 100644 --- a/samples/server/petstore/java-play-framework-no-nullable/app/apimodels/Category.java +++ b/samples/server/petstore/java-play-framework-no-nullable/app/apimodels/Category.java @@ -5,6 +5,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * A category for a pet */ diff --git a/samples/server/petstore/java-play-framework-no-nullable/app/apimodels/ModelApiResponse.java b/samples/server/petstore/java-play-framework-no-nullable/app/apimodels/ModelApiResponse.java index 301968462bb4..883865cd5098 100644 --- a/samples/server/petstore/java-play-framework-no-nullable/app/apimodels/ModelApiResponse.java +++ b/samples/server/petstore/java-play-framework-no-nullable/app/apimodels/ModelApiResponse.java @@ -6,6 +6,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * Describes the result of uploading an image resource */ diff --git a/samples/server/petstore/java-play-framework-no-nullable/app/apimodels/Order.java b/samples/server/petstore/java-play-framework-no-nullable/app/apimodels/Order.java index d54cba148ad3..29b6e3f6b5cb 100644 --- a/samples/server/petstore/java-play-framework-no-nullable/app/apimodels/Order.java +++ b/samples/server/petstore/java-play-framework-no-nullable/app/apimodels/Order.java @@ -6,6 +6,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * An order for a pets from the pet store */ diff --git a/samples/server/petstore/java-play-framework-no-nullable/app/apimodels/Pet.java b/samples/server/petstore/java-play-framework-no-nullable/app/apimodels/Pet.java index 2ea68e667f47..b3bcca614be0 100644 --- a/samples/server/petstore/java-play-framework-no-nullable/app/apimodels/Pet.java +++ b/samples/server/petstore/java-play-framework-no-nullable/app/apimodels/Pet.java @@ -10,6 +10,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * A pet for sale in the pet store */ @@ -38,7 +39,7 @@ public class Pet { @JsonProperty("tags") @Valid - private List tags = null; + private List<@Valid Tag> tags = null; /** * pet status in the store @@ -153,7 +154,7 @@ public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List tags) { + public Pet tags(List<@Valid Tag> tags) { this.tags = tags; return this; } @@ -170,11 +171,11 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags **/ - public List getTags() { + public List<@Valid Tag> getTags() { return tags; } - public void setTags(List tags) { + public void setTags(List<@Valid Tag> tags) { this.tags = tags; } diff --git a/samples/server/petstore/java-play-framework-no-nullable/app/apimodels/Tag.java b/samples/server/petstore/java-play-framework-no-nullable/app/apimodels/Tag.java index adac882cd052..e6019d2887d1 100644 --- a/samples/server/petstore/java-play-framework-no-nullable/app/apimodels/Tag.java +++ b/samples/server/petstore/java-play-framework-no-nullable/app/apimodels/Tag.java @@ -5,6 +5,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * A tag for a pet */ diff --git a/samples/server/petstore/java-play-framework-no-nullable/app/apimodels/User.java b/samples/server/petstore/java-play-framework-no-nullable/app/apimodels/User.java index 4e5d397b990c..1a157887085b 100644 --- a/samples/server/petstore/java-play-framework-no-nullable/app/apimodels/User.java +++ b/samples/server/petstore/java-play-framework-no-nullable/app/apimodels/User.java @@ -5,6 +5,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * A User who is purchasing from the pet store */ diff --git a/samples/server/petstore/java-play-framework-no-nullable/app/controllers/PetApiController.java b/samples/server/petstore/java-play-framework-no-nullable/app/controllers/PetApiController.java index 1ddc6c1eecf9..1cfeaacf882c 100644 --- a/samples/server/petstore/java-play-framework-no-nullable/app/controllers/PetApiController.java +++ b/samples/server/petstore/java-play-framework-no-nullable/app/controllers/PetApiController.java @@ -21,6 +21,7 @@ import com.fasterxml.jackson.core.type.TypeReference; import javax.validation.constraints.*; +import javax.validation.Valid; import com.typesafe.config.Config; import openapitools.OpenAPIUtils.ApiAction; diff --git a/samples/server/petstore/java-play-framework-no-nullable/app/controllers/PetApiControllerImp.java b/samples/server/petstore/java-play-framework-no-nullable/app/controllers/PetApiControllerImp.java index dc95e25205a7..cf5da3401f4c 100644 --- a/samples/server/petstore/java-play-framework-no-nullable/app/controllers/PetApiControllerImp.java +++ b/samples/server/petstore/java-play-framework-no-nullable/app/controllers/PetApiControllerImp.java @@ -12,6 +12,7 @@ import java.io.FileInputStream; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaPlayFrameworkCodegen") public class PetApiControllerImp extends PetApiControllerImpInterface { @Override diff --git a/samples/server/petstore/java-play-framework-no-nullable/app/controllers/PetApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-no-nullable/app/controllers/PetApiControllerImpInterface.java index 1173b55dbb78..82bc4782ec0c 100644 --- a/samples/server/petstore/java-play-framework-no-nullable/app/controllers/PetApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-no-nullable/app/controllers/PetApiControllerImpInterface.java @@ -21,6 +21,7 @@ import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @SuppressWarnings("RedundantThrows") public abstract class PetApiControllerImpInterface { diff --git a/samples/server/petstore/java-play-framework-no-nullable/app/controllers/StoreApiController.java b/samples/server/petstore/java-play-framework-no-nullable/app/controllers/StoreApiController.java index 29596d15fb1e..ba0449715144 100644 --- a/samples/server/petstore/java-play-framework-no-nullable/app/controllers/StoreApiController.java +++ b/samples/server/petstore/java-play-framework-no-nullable/app/controllers/StoreApiController.java @@ -20,6 +20,7 @@ import com.fasterxml.jackson.core.type.TypeReference; import javax.validation.constraints.*; +import javax.validation.Valid; import com.typesafe.config.Config; import openapitools.OpenAPIUtils.ApiAction; diff --git a/samples/server/petstore/java-play-framework-no-nullable/app/controllers/StoreApiControllerImp.java b/samples/server/petstore/java-play-framework-no-nullable/app/controllers/StoreApiControllerImp.java index 0d10b230b617..c42de86818b9 100644 --- a/samples/server/petstore/java-play-framework-no-nullable/app/controllers/StoreApiControllerImp.java +++ b/samples/server/petstore/java-play-framework-no-nullable/app/controllers/StoreApiControllerImp.java @@ -11,6 +11,7 @@ import java.io.FileInputStream; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaPlayFrameworkCodegen") public class StoreApiControllerImp extends StoreApiControllerImpInterface { @Override diff --git a/samples/server/petstore/java-play-framework-no-nullable/app/controllers/StoreApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-no-nullable/app/controllers/StoreApiControllerImpInterface.java index 67780d39c1cf..3111fd7b6c4c 100644 --- a/samples/server/petstore/java-play-framework-no-nullable/app/controllers/StoreApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-no-nullable/app/controllers/StoreApiControllerImpInterface.java @@ -20,6 +20,7 @@ import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @SuppressWarnings("RedundantThrows") public abstract class StoreApiControllerImpInterface { diff --git a/samples/server/petstore/java-play-framework-no-nullable/app/controllers/UserApiController.java b/samples/server/petstore/java-play-framework-no-nullable/app/controllers/UserApiController.java index 240f87644886..33d172d7c431 100644 --- a/samples/server/petstore/java-play-framework-no-nullable/app/controllers/UserApiController.java +++ b/samples/server/petstore/java-play-framework-no-nullable/app/controllers/UserApiController.java @@ -20,6 +20,7 @@ import com.fasterxml.jackson.core.type.TypeReference; import javax.validation.constraints.*; +import javax.validation.Valid; import com.typesafe.config.Config; import openapitools.OpenAPIUtils.ApiAction; @@ -55,9 +56,9 @@ public Result createUser(Http.Request request) throws Exception { @ApiAction public Result createUsersWithArrayInput(Http.Request request) throws Exception { JsonNode nodebody = request.body().asJson(); - List body; + List<@Valid User> body; if (nodebody != null) { - body = mapper.readValue(nodebody.toString(), new TypeReference>(){}); + body = mapper.readValue(nodebody.toString(), new TypeReference>(){}); if (configuration.getBoolean("useInputBeanValidation")) { for (User curItem : body) { OpenAPIUtils.validate(curItem); @@ -72,9 +73,9 @@ public Result createUsersWithArrayInput(Http.Request request) throws Exception { @ApiAction public Result createUsersWithListInput(Http.Request request) throws Exception { JsonNode nodebody = request.body().asJson(); - List body; + List<@Valid User> body; if (nodebody != null) { - body = mapper.readValue(nodebody.toString(), new TypeReference>(){}); + body = mapper.readValue(nodebody.toString(), new TypeReference>(){}); if (configuration.getBoolean("useInputBeanValidation")) { for (User curItem : body) { OpenAPIUtils.validate(curItem); diff --git a/samples/server/petstore/java-play-framework-no-nullable/app/controllers/UserApiControllerImp.java b/samples/server/petstore/java-play-framework-no-nullable/app/controllers/UserApiControllerImp.java index 941e5d9f6ce2..284f8c7f950d 100644 --- a/samples/server/petstore/java-play-framework-no-nullable/app/controllers/UserApiControllerImp.java +++ b/samples/server/petstore/java-play-framework-no-nullable/app/controllers/UserApiControllerImp.java @@ -11,6 +11,7 @@ import java.io.FileInputStream; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaPlayFrameworkCodegen") public class UserApiControllerImp extends UserApiControllerImpInterface { @Override @@ -19,12 +20,12 @@ public void createUser(Http.Request request, User body) throws Exception { } @Override - public void createUsersWithArrayInput(Http.Request request, List body) throws Exception { + public void createUsersWithArrayInput(Http.Request request, List<@Valid User> body) throws Exception { //Do your magic!!! } @Override - public void createUsersWithListInput(Http.Request request, List body) throws Exception { + public void createUsersWithListInput(Http.Request request, List<@Valid User> body) throws Exception { //Do your magic!!! } diff --git a/samples/server/petstore/java-play-framework-no-nullable/app/controllers/UserApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-no-nullable/app/controllers/UserApiControllerImpInterface.java index 9737f817f0e2..083eb4d7d02e 100644 --- a/samples/server/petstore/java-play-framework-no-nullable/app/controllers/UserApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-no-nullable/app/controllers/UserApiControllerImpInterface.java @@ -20,6 +20,7 @@ import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @SuppressWarnings("RedundantThrows") public abstract class UserApiControllerImpInterface { @@ -35,21 +36,21 @@ public Result createUserHttp(Http.Request request, User body) throws Exception { public abstract void createUser(Http.Request request, User body) throws Exception; - public Result createUsersWithArrayInputHttp(Http.Request request, List body) throws Exception { + public Result createUsersWithArrayInputHttp(Http.Request request, List<@Valid User> body) throws Exception { createUsersWithArrayInput(request, body); return ok(); } - public abstract void createUsersWithArrayInput(Http.Request request, List body) throws Exception; + public abstract void createUsersWithArrayInput(Http.Request request, List<@Valid User> body) throws Exception; - public Result createUsersWithListInputHttp(Http.Request request, List body) throws Exception { + public Result createUsersWithListInputHttp(Http.Request request, List<@Valid User> body) throws Exception { createUsersWithListInput(request, body); return ok(); } - public abstract void createUsersWithListInput(Http.Request request, List body) throws Exception; + public abstract void createUsersWithListInput(Http.Request request, List<@Valid User> body) throws Exception; public Result deleteUserHttp(Http.Request request, String username) throws Exception { deleteUser(request, username); diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/Category.java b/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/Category.java index afed4d545a99..2c2765d9a802 100644 --- a/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/Category.java +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/Category.java @@ -5,6 +5,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * A category for a pet */ diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/ModelApiResponse.java b/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/ModelApiResponse.java index 301968462bb4..883865cd5098 100644 --- a/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/ModelApiResponse.java +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/ModelApiResponse.java @@ -6,6 +6,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * Describes the result of uploading an image resource */ diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/Order.java b/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/Order.java index d54cba148ad3..29b6e3f6b5cb 100644 --- a/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/Order.java +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/Order.java @@ -6,6 +6,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * An order for a pets from the pet store */ diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/Pet.java b/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/Pet.java index 2ea68e667f47..b3bcca614be0 100644 --- a/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/Pet.java +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/Pet.java @@ -10,6 +10,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * A pet for sale in the pet store */ @@ -38,7 +39,7 @@ public class Pet { @JsonProperty("tags") @Valid - private List tags = null; + private List<@Valid Tag> tags = null; /** * pet status in the store @@ -153,7 +154,7 @@ public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List tags) { + public Pet tags(List<@Valid Tag> tags) { this.tags = tags; return this; } @@ -170,11 +171,11 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags **/ - public List getTags() { + public List<@Valid Tag> getTags() { return tags; } - public void setTags(List tags) { + public void setTags(List<@Valid Tag> tags) { this.tags = tags; } diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/Tag.java b/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/Tag.java index adac882cd052..e6019d2887d1 100644 --- a/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/Tag.java +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/Tag.java @@ -5,6 +5,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * A tag for a pet */ diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/User.java b/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/User.java index 4e5d397b990c..1a157887085b 100644 --- a/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/User.java +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/User.java @@ -5,6 +5,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * A User who is purchasing from the pet store */ diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/PetApiController.java b/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/PetApiController.java index 1ddc6c1eecf9..1cfeaacf882c 100644 --- a/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/PetApiController.java +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/PetApiController.java @@ -21,6 +21,7 @@ import com.fasterxml.jackson.core.type.TypeReference; import javax.validation.constraints.*; +import javax.validation.Valid; import com.typesafe.config.Config; import openapitools.OpenAPIUtils.ApiAction; diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/PetApiControllerImp.java b/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/PetApiControllerImp.java index dc95e25205a7..cf5da3401f4c 100644 --- a/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/PetApiControllerImp.java +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/PetApiControllerImp.java @@ -12,6 +12,7 @@ import java.io.FileInputStream; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaPlayFrameworkCodegen") public class PetApiControllerImp extends PetApiControllerImpInterface { @Override diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/PetApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/PetApiControllerImpInterface.java index 1173b55dbb78..82bc4782ec0c 100644 --- a/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/PetApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/PetApiControllerImpInterface.java @@ -21,6 +21,7 @@ import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @SuppressWarnings("RedundantThrows") public abstract class PetApiControllerImpInterface { diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/StoreApiController.java b/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/StoreApiController.java index 29596d15fb1e..ba0449715144 100644 --- a/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/StoreApiController.java +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/StoreApiController.java @@ -20,6 +20,7 @@ import com.fasterxml.jackson.core.type.TypeReference; import javax.validation.constraints.*; +import javax.validation.Valid; import com.typesafe.config.Config; import openapitools.OpenAPIUtils.ApiAction; diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/StoreApiControllerImp.java b/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/StoreApiControllerImp.java index 0d10b230b617..c42de86818b9 100644 --- a/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/StoreApiControllerImp.java +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/StoreApiControllerImp.java @@ -11,6 +11,7 @@ import java.io.FileInputStream; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaPlayFrameworkCodegen") public class StoreApiControllerImp extends StoreApiControllerImpInterface { @Override diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/StoreApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/StoreApiControllerImpInterface.java index 67780d39c1cf..3111fd7b6c4c 100644 --- a/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/StoreApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/StoreApiControllerImpInterface.java @@ -20,6 +20,7 @@ import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @SuppressWarnings("RedundantThrows") public abstract class StoreApiControllerImpInterface { diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/UserApiController.java b/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/UserApiController.java index 240f87644886..33d172d7c431 100644 --- a/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/UserApiController.java +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/UserApiController.java @@ -20,6 +20,7 @@ import com.fasterxml.jackson.core.type.TypeReference; import javax.validation.constraints.*; +import javax.validation.Valid; import com.typesafe.config.Config; import openapitools.OpenAPIUtils.ApiAction; @@ -55,9 +56,9 @@ public Result createUser(Http.Request request) throws Exception { @ApiAction public Result createUsersWithArrayInput(Http.Request request) throws Exception { JsonNode nodebody = request.body().asJson(); - List body; + List<@Valid User> body; if (nodebody != null) { - body = mapper.readValue(nodebody.toString(), new TypeReference>(){}); + body = mapper.readValue(nodebody.toString(), new TypeReference>(){}); if (configuration.getBoolean("useInputBeanValidation")) { for (User curItem : body) { OpenAPIUtils.validate(curItem); @@ -72,9 +73,9 @@ public Result createUsersWithArrayInput(Http.Request request) throws Exception { @ApiAction public Result createUsersWithListInput(Http.Request request) throws Exception { JsonNode nodebody = request.body().asJson(); - List body; + List<@Valid User> body; if (nodebody != null) { - body = mapper.readValue(nodebody.toString(), new TypeReference>(){}); + body = mapper.readValue(nodebody.toString(), new TypeReference>(){}); if (configuration.getBoolean("useInputBeanValidation")) { for (User curItem : body) { OpenAPIUtils.validate(curItem); diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/UserApiControllerImp.java b/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/UserApiControllerImp.java index 941e5d9f6ce2..284f8c7f950d 100644 --- a/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/UserApiControllerImp.java +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/UserApiControllerImp.java @@ -11,6 +11,7 @@ import java.io.FileInputStream; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaPlayFrameworkCodegen") public class UserApiControllerImp extends UserApiControllerImpInterface { @Override @@ -19,12 +20,12 @@ public void createUser(Http.Request request, User body) throws Exception { } @Override - public void createUsersWithArrayInput(Http.Request request, List body) throws Exception { + public void createUsersWithArrayInput(Http.Request request, List<@Valid User> body) throws Exception { //Do your magic!!! } @Override - public void createUsersWithListInput(Http.Request request, List body) throws Exception { + public void createUsersWithListInput(Http.Request request, List<@Valid User> body) throws Exception { //Do your magic!!! } diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/UserApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/UserApiControllerImpInterface.java index 9737f817f0e2..083eb4d7d02e 100644 --- a/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/UserApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/UserApiControllerImpInterface.java @@ -20,6 +20,7 @@ import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @SuppressWarnings("RedundantThrows") public abstract class UserApiControllerImpInterface { @@ -35,21 +36,21 @@ public Result createUserHttp(Http.Request request, User body) throws Exception { public abstract void createUser(Http.Request request, User body) throws Exception; - public Result createUsersWithArrayInputHttp(Http.Request request, List body) throws Exception { + public Result createUsersWithArrayInputHttp(Http.Request request, List<@Valid User> body) throws Exception { createUsersWithArrayInput(request, body); return ok(); } - public abstract void createUsersWithArrayInput(Http.Request request, List body) throws Exception; + public abstract void createUsersWithArrayInput(Http.Request request, List<@Valid User> body) throws Exception; - public Result createUsersWithListInputHttp(Http.Request request, List body) throws Exception { + public Result createUsersWithListInputHttp(Http.Request request, List<@Valid User> body) throws Exception { createUsersWithListInput(request, body); return ok(); } - public abstract void createUsersWithListInput(Http.Request request, List body) throws Exception; + public abstract void createUsersWithListInput(Http.Request request, List<@Valid User> body) throws Exception; public Result deleteUserHttp(Http.Request request, String username) throws Exception { deleteUser(request, username); diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/Category.java b/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/Category.java index afed4d545a99..2c2765d9a802 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/Category.java +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/Category.java @@ -5,6 +5,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * A category for a pet */ diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/ModelApiResponse.java b/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/ModelApiResponse.java index 301968462bb4..883865cd5098 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/ModelApiResponse.java +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/ModelApiResponse.java @@ -6,6 +6,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * Describes the result of uploading an image resource */ diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/Order.java b/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/Order.java index d54cba148ad3..29b6e3f6b5cb 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/Order.java +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/Order.java @@ -6,6 +6,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * An order for a pets from the pet store */ diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/Pet.java b/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/Pet.java index 2ea68e667f47..b3bcca614be0 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/Pet.java +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/Pet.java @@ -10,6 +10,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * A pet for sale in the pet store */ @@ -38,7 +39,7 @@ public class Pet { @JsonProperty("tags") @Valid - private List tags = null; + private List<@Valid Tag> tags = null; /** * pet status in the store @@ -153,7 +154,7 @@ public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List tags) { + public Pet tags(List<@Valid Tag> tags) { this.tags = tags; return this; } @@ -170,11 +171,11 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags **/ - public List getTags() { + public List<@Valid Tag> getTags() { return tags; } - public void setTags(List tags) { + public void setTags(List<@Valid Tag> tags) { this.tags = tags; } diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/Tag.java b/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/Tag.java index adac882cd052..e6019d2887d1 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/Tag.java +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/Tag.java @@ -5,6 +5,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * A tag for a pet */ diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/User.java b/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/User.java index 4e5d397b990c..1a157887085b 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/User.java +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/User.java @@ -5,6 +5,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * A User who is purchasing from the pet store */ diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/PetApiController.java b/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/PetApiController.java index 617a9ad9571e..82a0c8974b94 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/PetApiController.java +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/PetApiController.java @@ -21,6 +21,7 @@ import com.fasterxml.jackson.core.type.TypeReference; import javax.validation.constraints.*; +import javax.validation.Valid; import com.typesafe.config.Config; diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/PetApiControllerImp.java b/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/PetApiControllerImp.java index dc95e25205a7..cf5da3401f4c 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/PetApiControllerImp.java +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/PetApiControllerImp.java @@ -12,6 +12,7 @@ import java.io.FileInputStream; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaPlayFrameworkCodegen") public class PetApiControllerImp extends PetApiControllerImpInterface { @Override diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/PetApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/PetApiControllerImpInterface.java index 1173b55dbb78..82bc4782ec0c 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/PetApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/PetApiControllerImpInterface.java @@ -21,6 +21,7 @@ import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @SuppressWarnings("RedundantThrows") public abstract class PetApiControllerImpInterface { diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/StoreApiController.java b/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/StoreApiController.java index 1b9df86ea06e..bcd6693da91c 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/StoreApiController.java +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/StoreApiController.java @@ -20,6 +20,7 @@ import com.fasterxml.jackson.core.type.TypeReference; import javax.validation.constraints.*; +import javax.validation.Valid; import com.typesafe.config.Config; diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/StoreApiControllerImp.java b/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/StoreApiControllerImp.java index 0d10b230b617..c42de86818b9 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/StoreApiControllerImp.java +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/StoreApiControllerImp.java @@ -11,6 +11,7 @@ import java.io.FileInputStream; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaPlayFrameworkCodegen") public class StoreApiControllerImp extends StoreApiControllerImpInterface { @Override diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/StoreApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/StoreApiControllerImpInterface.java index 67780d39c1cf..3111fd7b6c4c 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/StoreApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/StoreApiControllerImpInterface.java @@ -20,6 +20,7 @@ import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @SuppressWarnings("RedundantThrows") public abstract class StoreApiControllerImpInterface { diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/UserApiController.java b/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/UserApiController.java index 75cb3377a176..6ddf0cb13776 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/UserApiController.java +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/UserApiController.java @@ -20,6 +20,7 @@ import com.fasterxml.jackson.core.type.TypeReference; import javax.validation.constraints.*; +import javax.validation.Valid; import com.typesafe.config.Config; @@ -54,9 +55,9 @@ public Result createUser(Http.Request request) throws Exception { public Result createUsersWithArrayInput(Http.Request request) throws Exception { JsonNode nodebody = request.body().asJson(); - List body; + List<@Valid User> body; if (nodebody != null) { - body = mapper.readValue(nodebody.toString(), new TypeReference>(){}); + body = mapper.readValue(nodebody.toString(), new TypeReference>(){}); if (configuration.getBoolean("useInputBeanValidation")) { for (User curItem : body) { OpenAPIUtils.validate(curItem); @@ -71,9 +72,9 @@ public Result createUsersWithArrayInput(Http.Request request) throws Exception { public Result createUsersWithListInput(Http.Request request) throws Exception { JsonNode nodebody = request.body().asJson(); - List body; + List<@Valid User> body; if (nodebody != null) { - body = mapper.readValue(nodebody.toString(), new TypeReference>(){}); + body = mapper.readValue(nodebody.toString(), new TypeReference>(){}); if (configuration.getBoolean("useInputBeanValidation")) { for (User curItem : body) { OpenAPIUtils.validate(curItem); diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/UserApiControllerImp.java b/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/UserApiControllerImp.java index 941e5d9f6ce2..284f8c7f950d 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/UserApiControllerImp.java +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/UserApiControllerImp.java @@ -11,6 +11,7 @@ import java.io.FileInputStream; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaPlayFrameworkCodegen") public class UserApiControllerImp extends UserApiControllerImpInterface { @Override @@ -19,12 +20,12 @@ public void createUser(Http.Request request, User body) throws Exception { } @Override - public void createUsersWithArrayInput(Http.Request request, List body) throws Exception { + public void createUsersWithArrayInput(Http.Request request, List<@Valid User> body) throws Exception { //Do your magic!!! } @Override - public void createUsersWithListInput(Http.Request request, List body) throws Exception { + public void createUsersWithListInput(Http.Request request, List<@Valid User> body) throws Exception { //Do your magic!!! } diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/UserApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/UserApiControllerImpInterface.java index 9737f817f0e2..083eb4d7d02e 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/UserApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/UserApiControllerImpInterface.java @@ -20,6 +20,7 @@ import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @SuppressWarnings("RedundantThrows") public abstract class UserApiControllerImpInterface { @@ -35,21 +36,21 @@ public Result createUserHttp(Http.Request request, User body) throws Exception { public abstract void createUser(Http.Request request, User body) throws Exception; - public Result createUsersWithArrayInputHttp(Http.Request request, List body) throws Exception { + public Result createUsersWithArrayInputHttp(Http.Request request, List<@Valid User> body) throws Exception { createUsersWithArrayInput(request, body); return ok(); } - public abstract void createUsersWithArrayInput(Http.Request request, List body) throws Exception; + public abstract void createUsersWithArrayInput(Http.Request request, List<@Valid User> body) throws Exception; - public Result createUsersWithListInputHttp(Http.Request request, List body) throws Exception { + public Result createUsersWithListInputHttp(Http.Request request, List<@Valid User> body) throws Exception { createUsersWithListInput(request, body); return ok(); } - public abstract void createUsersWithListInput(Http.Request request, List body) throws Exception; + public abstract void createUsersWithListInput(Http.Request request, List<@Valid User> body) throws Exception; public Result deleteUserHttp(Http.Request request, String username) throws Exception { deleteUser(request, username); diff --git a/samples/server/petstore/java-play-framework/app/apimodels/Category.java b/samples/server/petstore/java-play-framework/app/apimodels/Category.java index afed4d545a99..2c2765d9a802 100644 --- a/samples/server/petstore/java-play-framework/app/apimodels/Category.java +++ b/samples/server/petstore/java-play-framework/app/apimodels/Category.java @@ -5,6 +5,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * A category for a pet */ diff --git a/samples/server/petstore/java-play-framework/app/apimodels/ModelApiResponse.java b/samples/server/petstore/java-play-framework/app/apimodels/ModelApiResponse.java index 301968462bb4..883865cd5098 100644 --- a/samples/server/petstore/java-play-framework/app/apimodels/ModelApiResponse.java +++ b/samples/server/petstore/java-play-framework/app/apimodels/ModelApiResponse.java @@ -6,6 +6,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * Describes the result of uploading an image resource */ diff --git a/samples/server/petstore/java-play-framework/app/apimodels/Order.java b/samples/server/petstore/java-play-framework/app/apimodels/Order.java index d54cba148ad3..29b6e3f6b5cb 100644 --- a/samples/server/petstore/java-play-framework/app/apimodels/Order.java +++ b/samples/server/petstore/java-play-framework/app/apimodels/Order.java @@ -6,6 +6,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * An order for a pets from the pet store */ diff --git a/samples/server/petstore/java-play-framework/app/apimodels/Pet.java b/samples/server/petstore/java-play-framework/app/apimodels/Pet.java index 2ea68e667f47..b3bcca614be0 100644 --- a/samples/server/petstore/java-play-framework/app/apimodels/Pet.java +++ b/samples/server/petstore/java-play-framework/app/apimodels/Pet.java @@ -10,6 +10,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * A pet for sale in the pet store */ @@ -38,7 +39,7 @@ public class Pet { @JsonProperty("tags") @Valid - private List tags = null; + private List<@Valid Tag> tags = null; /** * pet status in the store @@ -153,7 +154,7 @@ public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List tags) { + public Pet tags(List<@Valid Tag> tags) { this.tags = tags; return this; } @@ -170,11 +171,11 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags **/ - public List getTags() { + public List<@Valid Tag> getTags() { return tags; } - public void setTags(List tags) { + public void setTags(List<@Valid Tag> tags) { this.tags = tags; } diff --git a/samples/server/petstore/java-play-framework/app/apimodels/Tag.java b/samples/server/petstore/java-play-framework/app/apimodels/Tag.java index adac882cd052..e6019d2887d1 100644 --- a/samples/server/petstore/java-play-framework/app/apimodels/Tag.java +++ b/samples/server/petstore/java-play-framework/app/apimodels/Tag.java @@ -5,6 +5,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * A tag for a pet */ diff --git a/samples/server/petstore/java-play-framework/app/apimodels/User.java b/samples/server/petstore/java-play-framework/app/apimodels/User.java index 4e5d397b990c..1a157887085b 100644 --- a/samples/server/petstore/java-play-framework/app/apimodels/User.java +++ b/samples/server/petstore/java-play-framework/app/apimodels/User.java @@ -5,6 +5,7 @@ import javax.validation.*; import java.util.Objects; import javax.validation.constraints.*; +import javax.validation.Valid; /** * A User who is purchasing from the pet store */ diff --git a/samples/server/petstore/java-play-framework/app/controllers/PetApiController.java b/samples/server/petstore/java-play-framework/app/controllers/PetApiController.java index 1ddc6c1eecf9..1cfeaacf882c 100644 --- a/samples/server/petstore/java-play-framework/app/controllers/PetApiController.java +++ b/samples/server/petstore/java-play-framework/app/controllers/PetApiController.java @@ -21,6 +21,7 @@ import com.fasterxml.jackson.core.type.TypeReference; import javax.validation.constraints.*; +import javax.validation.Valid; import com.typesafe.config.Config; import openapitools.OpenAPIUtils.ApiAction; diff --git a/samples/server/petstore/java-play-framework/app/controllers/PetApiControllerImp.java b/samples/server/petstore/java-play-framework/app/controllers/PetApiControllerImp.java index dc95e25205a7..cf5da3401f4c 100644 --- a/samples/server/petstore/java-play-framework/app/controllers/PetApiControllerImp.java +++ b/samples/server/petstore/java-play-framework/app/controllers/PetApiControllerImp.java @@ -12,6 +12,7 @@ import java.io.FileInputStream; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaPlayFrameworkCodegen") public class PetApiControllerImp extends PetApiControllerImpInterface { @Override diff --git a/samples/server/petstore/java-play-framework/app/controllers/PetApiControllerImpInterface.java b/samples/server/petstore/java-play-framework/app/controllers/PetApiControllerImpInterface.java index 1173b55dbb78..82bc4782ec0c 100644 --- a/samples/server/petstore/java-play-framework/app/controllers/PetApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework/app/controllers/PetApiControllerImpInterface.java @@ -21,6 +21,7 @@ import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @SuppressWarnings("RedundantThrows") public abstract class PetApiControllerImpInterface { diff --git a/samples/server/petstore/java-play-framework/app/controllers/StoreApiController.java b/samples/server/petstore/java-play-framework/app/controllers/StoreApiController.java index 29596d15fb1e..ba0449715144 100644 --- a/samples/server/petstore/java-play-framework/app/controllers/StoreApiController.java +++ b/samples/server/petstore/java-play-framework/app/controllers/StoreApiController.java @@ -20,6 +20,7 @@ import com.fasterxml.jackson.core.type.TypeReference; import javax.validation.constraints.*; +import javax.validation.Valid; import com.typesafe.config.Config; import openapitools.OpenAPIUtils.ApiAction; diff --git a/samples/server/petstore/java-play-framework/app/controllers/StoreApiControllerImp.java b/samples/server/petstore/java-play-framework/app/controllers/StoreApiControllerImp.java index 0d10b230b617..c42de86818b9 100644 --- a/samples/server/petstore/java-play-framework/app/controllers/StoreApiControllerImp.java +++ b/samples/server/petstore/java-play-framework/app/controllers/StoreApiControllerImp.java @@ -11,6 +11,7 @@ import java.io.FileInputStream; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaPlayFrameworkCodegen") public class StoreApiControllerImp extends StoreApiControllerImpInterface { @Override diff --git a/samples/server/petstore/java-play-framework/app/controllers/StoreApiControllerImpInterface.java b/samples/server/petstore/java-play-framework/app/controllers/StoreApiControllerImpInterface.java index 67780d39c1cf..3111fd7b6c4c 100644 --- a/samples/server/petstore/java-play-framework/app/controllers/StoreApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework/app/controllers/StoreApiControllerImpInterface.java @@ -20,6 +20,7 @@ import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @SuppressWarnings("RedundantThrows") public abstract class StoreApiControllerImpInterface { diff --git a/samples/server/petstore/java-play-framework/app/controllers/UserApiController.java b/samples/server/petstore/java-play-framework/app/controllers/UserApiController.java index 240f87644886..33d172d7c431 100644 --- a/samples/server/petstore/java-play-framework/app/controllers/UserApiController.java +++ b/samples/server/petstore/java-play-framework/app/controllers/UserApiController.java @@ -20,6 +20,7 @@ import com.fasterxml.jackson.core.type.TypeReference; import javax.validation.constraints.*; +import javax.validation.Valid; import com.typesafe.config.Config; import openapitools.OpenAPIUtils.ApiAction; @@ -55,9 +56,9 @@ public Result createUser(Http.Request request) throws Exception { @ApiAction public Result createUsersWithArrayInput(Http.Request request) throws Exception { JsonNode nodebody = request.body().asJson(); - List body; + List<@Valid User> body; if (nodebody != null) { - body = mapper.readValue(nodebody.toString(), new TypeReference>(){}); + body = mapper.readValue(nodebody.toString(), new TypeReference>(){}); if (configuration.getBoolean("useInputBeanValidation")) { for (User curItem : body) { OpenAPIUtils.validate(curItem); @@ -72,9 +73,9 @@ public Result createUsersWithArrayInput(Http.Request request) throws Exception { @ApiAction public Result createUsersWithListInput(Http.Request request) throws Exception { JsonNode nodebody = request.body().asJson(); - List body; + List<@Valid User> body; if (nodebody != null) { - body = mapper.readValue(nodebody.toString(), new TypeReference>(){}); + body = mapper.readValue(nodebody.toString(), new TypeReference>(){}); if (configuration.getBoolean("useInputBeanValidation")) { for (User curItem : body) { OpenAPIUtils.validate(curItem); diff --git a/samples/server/petstore/java-play-framework/app/controllers/UserApiControllerImp.java b/samples/server/petstore/java-play-framework/app/controllers/UserApiControllerImp.java index 941e5d9f6ce2..284f8c7f950d 100644 --- a/samples/server/petstore/java-play-framework/app/controllers/UserApiControllerImp.java +++ b/samples/server/petstore/java-play-framework/app/controllers/UserApiControllerImp.java @@ -11,6 +11,7 @@ import java.io.FileInputStream; import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaPlayFrameworkCodegen") public class UserApiControllerImp extends UserApiControllerImpInterface { @Override @@ -19,12 +20,12 @@ public void createUser(Http.Request request, User body) throws Exception { } @Override - public void createUsersWithArrayInput(Http.Request request, List body) throws Exception { + public void createUsersWithArrayInput(Http.Request request, List<@Valid User> body) throws Exception { //Do your magic!!! } @Override - public void createUsersWithListInput(Http.Request request, List body) throws Exception { + public void createUsersWithListInput(Http.Request request, List<@Valid User> body) throws Exception { //Do your magic!!! } diff --git a/samples/server/petstore/java-play-framework/app/controllers/UserApiControllerImpInterface.java b/samples/server/petstore/java-play-framework/app/controllers/UserApiControllerImpInterface.java index 9737f817f0e2..083eb4d7d02e 100644 --- a/samples/server/petstore/java-play-framework/app/controllers/UserApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework/app/controllers/UserApiControllerImpInterface.java @@ -20,6 +20,7 @@ import play.libs.Files.TemporaryFile; import javax.validation.constraints.*; +import javax.validation.Valid; @SuppressWarnings("RedundantThrows") public abstract class UserApiControllerImpInterface { @@ -35,21 +36,21 @@ public Result createUserHttp(Http.Request request, User body) throws Exception { public abstract void createUser(Http.Request request, User body) throws Exception; - public Result createUsersWithArrayInputHttp(Http.Request request, List body) throws Exception { + public Result createUsersWithArrayInputHttp(Http.Request request, List<@Valid User> body) throws Exception { createUsersWithArrayInput(request, body); return ok(); } - public abstract void createUsersWithArrayInput(Http.Request request, List body) throws Exception; + public abstract void createUsersWithArrayInput(Http.Request request, List<@Valid User> body) throws Exception; - public Result createUsersWithListInputHttp(Http.Request request, List body) throws Exception { + public Result createUsersWithListInputHttp(Http.Request request, List<@Valid User> body) throws Exception { createUsersWithListInput(request, body); return ok(); } - public abstract void createUsersWithListInput(Http.Request request, List body) throws Exception; + public abstract void createUsersWithListInput(Http.Request request, List<@Valid User> body) throws Exception; public Result deleteUserHttp(Http.Request request, String username) throws Exception { deleteUser(request, username); diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/api/UserApi.java index 35c4e018117b..f6adeea7ab07 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/api/UserApi.java @@ -52,7 +52,7 @@ public interface UserApi { @ApiOperation(value = "Creates list of users with given input array", tags={ "user" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation") }) - public void createUsersWithArrayInput(@Valid @NotNull List body); + public void createUsersWithArrayInput(@Valid @NotNull List<@Valid User> body); /** * Creates list of users with given input array @@ -63,7 +63,7 @@ public interface UserApi { @ApiOperation(value = "Creates list of users with given input array", tags={ "user" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation") }) - public void createUsersWithListInput(@Valid @NotNull List body); + public void createUsersWithListInput(@Valid @NotNull List<@Valid User> body); /** * Delete user diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/model/Pet.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/model/Pet.java index 56bd1910d8eb..975f7c260678 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/model/Pet.java @@ -37,7 +37,7 @@ public class Pet { @ApiModelProperty(value = "") @Valid - private List tags; + private List<@Valid Tag> tags; public enum StatusEnum { @@ -160,15 +160,15 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * @return tags **/ @JsonProperty("tags") - public List getTags() { + public List<@Valid Tag> getTags() { return tags; } - public void setTags(List tags) { + public void setTags(List<@Valid Tag> tags) { this.tags = tags; } - public Pet tags(List tags) { + public Pet tags(List<@Valid Tag> tags) { this.tags = tags; return this; } diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/api/PetApi.java index 879c2f794317..5046e290cdbe 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/api/PetApi.java @@ -21,6 +21,7 @@ import java.util.Map; import java.util.List; import javax.validation.constraints.*; +import javax.validation.Valid; @Path("/pet") @RequestScoped diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/api/StoreApi.java index ea889006e69f..b18ecac10f75 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/api/StoreApi.java @@ -21,6 +21,7 @@ import java.util.Map; import java.util.List; import javax.validation.constraints.*; +import javax.validation.Valid; @Path("/store") @RequestScoped diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/api/TestApi.java b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/api/TestApi.java index be772166c1cb..b3d89a5b5e03 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/api/TestApi.java +++ b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/api/TestApi.java @@ -19,6 +19,7 @@ import java.util.Map; import java.util.List; import javax.validation.constraints.*; +import javax.validation.Valid; @Path("/test/upload") @RequestScoped diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/api/UserApi.java index f90f34580e88..57c44827453f 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/api/UserApi.java @@ -20,6 +20,7 @@ import java.util.Map; import java.util.List; import javax.validation.constraints.*; +import javax.validation.Valid; @Path("/user") @RequestScoped @@ -59,7 +60,7 @@ public Response createUser(@ApiParam(value = "Created user object" ,required=tru }, tags={ "user" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true) List user) { + public Response createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true) List<@Valid User> user) { return delegate.createUsersWithArrayInput(user, securityContext); } @@ -73,7 +74,7 @@ public Response createUsersWithArrayInput(@ApiParam(value = "List of user object }, tags={ "user" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true) List user) { + public Response createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true) List<@Valid User> user) { return delegate.createUsersWithListInput(user, securityContext); } diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/api/UserApiService.java b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/api/UserApiService.java index 2d99b1eecfc9..6050a39251b3 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/api/UserApiService.java +++ b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/api/UserApiService.java @@ -18,8 +18,8 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSCXFCDIServerCodegen") public interface UserApiService { public Response createUser(User user, SecurityContext securityContext); - public Response createUsersWithArrayInput(List user, SecurityContext securityContext); - public Response createUsersWithListInput(List user, SecurityContext securityContext); + public Response createUsersWithArrayInput(List<@Valid User> user, SecurityContext securityContext); + public Response createUsersWithListInput(List<@Valid User> user, SecurityContext securityContext); public Response deleteUser(String username, SecurityContext securityContext); public Response getUserByName(String username, SecurityContext securityContext); public Response loginUser(String username, String password, SecurityContext securityContext); diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/model/Category.java b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/model/Category.java index 752df95b6578..e5c469622cb9 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/model/Category.java @@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import javax.validation.constraints.*; +import javax.validation.Valid; /** * A category for a pet diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/model/ModelApiResponse.java index 697741620fd6..602230e5c498 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/model/ModelApiResponse.java @@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import javax.validation.constraints.*; +import javax.validation.Valid; /** * Describes the result of uploading an image resource diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/model/Order.java b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/model/Order.java index 37bd6dcf3493..e0266c9b45a0 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/model/Order.java @@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import javax.validation.constraints.*; +import javax.validation.Valid; /** * An order for a pets from the pet store diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/model/Pet.java b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/model/Pet.java index e53c72149284..c5e3b0e64e70 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/model/Pet.java @@ -10,6 +10,7 @@ import org.openapitools.model.Category; import org.openapitools.model.Tag; import javax.validation.constraints.*; +import javax.validation.Valid; /** * A pet for sale in the pet store @@ -30,7 +31,7 @@ public class Pet { private List photoUrls = new ArrayList<>(); - private List tags; + private List<@Valid Tag> tags; public enum StatusEnum { @@ -149,7 +150,7 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { /** **/ - public Pet tags(List tags) { + public Pet tags(List<@Valid Tag> tags) { this.tags = tags; return this; } @@ -157,10 +158,10 @@ public Pet tags(List tags) { @ApiModelProperty(value = "") @JsonProperty("tags") - public List getTags() { + public List<@Valid Tag> getTags() { return tags; } - public void setTags(List tags) { + public void setTags(List<@Valid Tag> tags) { this.tags = tags; } diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/model/Tag.java b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/model/Tag.java index d5c0ffcc1351..6e92c8c37563 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/model/Tag.java @@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import javax.validation.constraints.*; +import javax.validation.Valid; /** * A tag for a pet diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/model/User.java b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/model/User.java index 2c527c2f733e..e94e9506f468 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/model/User.java +++ b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/model/User.java @@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import javax.validation.constraints.*; +import javax.validation.Valid; /** * A User who is purchasing from the pet store diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java b/samples/server/petstore/jaxrs-cxf-cdi/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java index 53c6d6384d81..18cead47b769 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-cxf-cdi/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java @@ -24,12 +24,12 @@ public Response createUser(User user, SecurityContext securityContext) { return Response.ok().entity("magic!").build(); } @Override - public Response createUsersWithArrayInput(List user, SecurityContext securityContext) { + public Response createUsersWithArrayInput(List<@Valid User> user, SecurityContext securityContext) { // do some magic! return Response.ok().entity("magic!").build(); } @Override - public Response createUsersWithListInput(List user, SecurityContext securityContext) { + public Response createUsersWithListInput(List<@Valid User> user, SecurityContext securityContext) { // do some magic! return Response.ok().entity("magic!").build(); } diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/api/UserApi.java index 7076d234ffec..654b752edcf2 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/api/UserApi.java @@ -52,7 +52,7 @@ public interface UserApi { @ApiOperation(value = "Creates list of users with given input array", tags={ "user" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation") }) - public void createUsersWithArrayInput(@Valid @NotNull List body); + public void createUsersWithArrayInput(@Valid @NotNull List<@Valid User> body); /** * Creates list of users with given input array @@ -63,7 +63,7 @@ public interface UserApi { @ApiOperation(value = "Creates list of users with given input array", tags={ "user" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation") }) - public void createUsersWithListInput(@Valid @NotNull List body); + public void createUsersWithListInput(@Valid @NotNull List<@Valid User> body); /** * Delete user diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/model/Pet.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/model/Pet.java index 56bd1910d8eb..975f7c260678 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/model/Pet.java @@ -37,7 +37,7 @@ public class Pet { @ApiModelProperty(value = "") @Valid - private List tags; + private List<@Valid Tag> tags; public enum StatusEnum { @@ -160,15 +160,15 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * @return tags **/ @JsonProperty("tags") - public List getTags() { + public List<@Valid Tag> getTags() { return tags; } - public void setTags(List tags) { + public void setTags(List<@Valid Tag> tags) { this.tags = tags; } - public Pet tags(List tags) { + public Pet tags(List<@Valid Tag> tags) { this.tags = tags; return this; } diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/UserApi.java index 4af8b1db4fb2..6485b2345f41 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/UserApi.java @@ -52,7 +52,7 @@ public interface UserApi { @ApiOperation(value = "Creates list of users with given input array", tags={ "user" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation") }) - public void createUsersWithArrayInput(@Valid @NotNull List body); + public void createUsersWithArrayInput(@Valid @NotNull List<@Valid User> body); /** * Creates list of users with given input array @@ -63,7 +63,7 @@ public interface UserApi { @ApiOperation(value = "Creates list of users with given input array", tags={ "user" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation") }) - public void createUsersWithListInput(@Valid @NotNull List body); + public void createUsersWithListInput(@Valid @NotNull List<@Valid User> body); /** * Delete user diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/ArrayTest.java index c30cf9634080..a74d46e40cd8 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/ArrayTest.java @@ -23,7 +23,7 @@ public class ArrayTest { @ApiModelProperty(value = "") @Valid - private List> arrayArrayOfModel; + private List> arrayArrayOfModel; /** * Get arrayOfString * @return arrayOfString @@ -75,20 +75,20 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * @return arrayArrayOfModel **/ @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; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } - public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { + public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) { this.arrayArrayOfModel.add(arrayArrayOfModelItem); return this; } diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/FileSchemaTestClass.java index d86de866b0a3..e222732f7335 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/FileSchemaTestClass.java @@ -20,7 +20,7 @@ public class FileSchemaTestClass { @ApiModelProperty(value = "") @Valid - private List files; + private List<@Valid ModelFile> files; /** * Get _file * @return _file @@ -44,15 +44,15 @@ public FileSchemaTestClass _file(ModelFile _file) { * @return files **/ @JsonProperty("files") - public List getFiles() { + public List<@Valid ModelFile> getFiles() { return files; } - public void setFiles(List files) { + public void setFiles(List<@Valid ModelFile> files) { this.files = files; } - public FileSchemaTestClass files(List files) { + public FileSchemaTestClass files(List<@Valid ModelFile> files) { this.files = files; return this; } diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Pet.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Pet.java index d094965a17c4..05c8a71f69b2 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Pet.java @@ -35,7 +35,7 @@ public class Pet { @ApiModelProperty(value = "") @Valid - private List tags; + private List<@Valid Tag> tags; public enum StatusEnum { @@ -159,15 +159,15 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * @return tags **/ @JsonProperty("tags") - public List getTags() { + public List<@Valid Tag> getTags() { return tags; } - public void setTags(List tags) { + public void setTags(List<@Valid Tag> tags) { this.tags = tags; } - public Pet tags(List tags) { + public Pet tags(List<@Valid Tag> tags) { this.tags = tags; return this; } diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/AnotherFakeApiService.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/AnotherFakeApiService.java index 3991f29fa8a7..c678cc557a24 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/AnotherFakeApiService.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/AnotherFakeApiService.java @@ -15,6 +15,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public abstract class AnotherFakeApiService { public abstract Response call123testSpecialTags( @NotNull UUID uuidTest,Client body,SecurityContext securityContext) throws NotFoundException; diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeApiService.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeApiService.java index 3cc65be92b99..164d95a75b9a 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeApiService.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeApiService.java @@ -24,6 +24,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public abstract class FakeApiService { public abstract Response createXmlItem(XmlItem xmlItem,SecurityContext securityContext) throws NotFoundException; diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeClassnameTestApiService.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeClassnameTestApiService.java index 9b9724797dfc..a155a1ae0351 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeClassnameTestApiService.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeClassnameTestApiService.java @@ -14,6 +14,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public abstract class FakeClassnameTestApiService { public abstract Response testClassname(Client body,SecurityContext securityContext) throws NotFoundException; diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/PetApiService.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/PetApiService.java index 5a082c27fd48..a82fd652bc3f 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/PetApiService.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/PetApiService.java @@ -17,6 +17,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public abstract class PetApiService { public abstract Response addPet(Pet body,SecurityContext securityContext) throws NotFoundException; diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/StoreApiService.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/StoreApiService.java index 679dae579bf0..ba613f2eb7a2 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/StoreApiService.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/StoreApiService.java @@ -15,6 +15,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public abstract class StoreApiService { public abstract Response deleteOrder(String orderId,SecurityContext securityContext) throws NotFoundException; diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/UserApi.java index 7e617b8d5c7f..ea55ad81c44f 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/UserApi.java @@ -75,7 +75,7 @@ public Response createUser(@ApiParam(value = "Created user object", required = t @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUsersWithArrayInput(@ApiParam(value = "List of user object", required = true) @NotNull @Valid List body,@Context SecurityContext securityContext) + public Response createUsersWithArrayInput(@ApiParam(value = "List of user object", required = true) @NotNull @Valid List<@Valid User> body,@Context SecurityContext securityContext) throws NotFoundException { return delegate.createUsersWithArrayInput(body, securityContext); } @@ -87,7 +87,7 @@ public Response createUsersWithArrayInput(@ApiParam(value = "List of user object @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUsersWithListInput(@ApiParam(value = "List of user object", required = true) @NotNull @Valid List body,@Context SecurityContext securityContext) + public Response createUsersWithListInput(@ApiParam(value = "List of user object", required = true) @NotNull @Valid List<@Valid User> body,@Context SecurityContext securityContext) throws NotFoundException { return delegate.createUsersWithListInput(body, securityContext); } diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/UserApiService.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/UserApiService.java index e77f749c52c7..46e99f6e59b3 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/UserApiService.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/UserApiService.java @@ -15,11 +15,12 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public abstract class UserApiService { public abstract Response createUser(User body,SecurityContext securityContext) throws NotFoundException; - public abstract Response createUsersWithArrayInput(List body,SecurityContext securityContext) throws NotFoundException; - public abstract Response createUsersWithListInput(List body,SecurityContext securityContext) throws NotFoundException; + public abstract Response createUsersWithArrayInput(List<@Valid User> body,SecurityContext securityContext) throws NotFoundException; + public abstract Response createUsersWithListInput(List<@Valid User> body,SecurityContext securityContext) throws NotFoundException; public abstract Response deleteUser(String username,SecurityContext securityContext) throws NotFoundException; public abstract Response getUserByName(String username,SecurityContext securityContext) throws NotFoundException; public abstract Response loginUser( @NotNull String username, @NotNull String password,SecurityContext securityContext) throws NotFoundException; diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/ArrayTest.java index 11909ea810d9..34c3c30a5918 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/ArrayTest.java @@ -47,7 +47,7 @@ public class ArrayTest implements Serializable { public static final String JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL = "array_array_of_model"; @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL) - private List> arrayArrayOfModel; + private List> arrayArrayOfModel; public ArrayTest arrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; @@ -105,12 +105,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 arrayArrayOfModelItem) { + public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) { if (this.arrayArrayOfModel == null) { this.arrayArrayOfModel = new ArrayList<>(); } @@ -125,11 +125,11 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI @JsonProperty(value = "array_array_of_model") @ApiModelProperty(value = "") @Valid - public List> getArrayArrayOfModel() { + public List> getArrayArrayOfModel() { return arrayArrayOfModel; } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { + public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/FileSchemaTestClass.java index b1fadf19faca..74bef07b2129 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/FileSchemaTestClass.java @@ -42,7 +42,7 @@ public class FileSchemaTestClass implements Serializable { public static final String JSON_PROPERTY_FILES = "files"; @JsonProperty(JSON_PROPERTY_FILES) - private List files; + private List<@Valid ModelFile> files; public FileSchemaTestClass _file(ModelFile _file) { this._file = _file; @@ -64,7 +64,7 @@ public void setFile(ModelFile _file) { this._file = _file; } - public FileSchemaTestClass files(List files) { + public FileSchemaTestClass files(List<@Valid ModelFile> files) { this.files = files; return this; } @@ -84,11 +84,11 @@ public FileSchemaTestClass addFilesItem(ModelFile filesItem) { @JsonProperty(value = "files") @ApiModelProperty(value = "") @Valid - public List getFiles() { + public List<@Valid ModelFile> getFiles() { return files; } - public void setFiles(List files) { + public void setFiles(List<@Valid ModelFile> files) { this.files = files; } diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Pet.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Pet.java index 375ef27db712..0984459c72c9 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Pet.java @@ -63,7 +63,7 @@ public class Pet implements Serializable { public static final String JSON_PROPERTY_TAGS = "tags"; @JsonProperty(JSON_PROPERTY_TAGS) - private List tags; + private List<@Valid Tag> tags; /** * pet status in the store @@ -191,7 +191,7 @@ public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List tags) { + public Pet tags(List<@Valid Tag> tags) { this.tags = tags; return this; } @@ -211,11 +211,11 @@ public Pet addTagsItem(Tag tagsItem) { @JsonProperty(value = "tags") @ApiModelProperty(value = "") @Valid - public List getTags() { + public List<@Valid Tag> getTags() { return tags; } - public void setTags(List tags) { + public void setTags(List<@Valid Tag> tags) { this.tags = tags; } diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java index 361e57e8167b..edbc664b7303 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java @@ -14,6 +14,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public class AnotherFakeApiServiceImpl extends AnotherFakeApiService { @Override diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java index a0e15051506b..e414cfb1d116 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java @@ -23,6 +23,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public class FakeApiServiceImpl extends FakeApiService { @Override diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/FakeClassnameTestApiServiceImpl.java b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/FakeClassnameTestApiServiceImpl.java index 6f681177cb18..7356876a4518 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/FakeClassnameTestApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/FakeClassnameTestApiServiceImpl.java @@ -13,6 +13,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public class FakeClassnameTestApiServiceImpl extends FakeClassnameTestApiService { @Override diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java index 628d5183e765..7b45a0fd7239 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java @@ -16,6 +16,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public class PetApiServiceImpl extends PetApiService { @Override diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java index b4ec457464ff..c06c4da6d465 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java @@ -14,6 +14,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public class StoreApiServiceImpl extends StoreApiService { @Override diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java index fd5803901752..28dc27736a46 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java @@ -14,6 +14,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public class UserApiServiceImpl extends UserApiService { @Override @@ -22,12 +23,12 @@ public Response createUser(User body, SecurityContext securityContext) throws No return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } @Override - public Response createUsersWithArrayInput(List body, SecurityContext securityContext) throws NotFoundException { + public Response createUsersWithArrayInput(List<@Valid User> body, SecurityContext securityContext) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } @Override - public Response createUsersWithListInput(List body, SecurityContext securityContext) throws NotFoundException { + public Response createUsersWithListInput(List<@Valid User> body, SecurityContext securityContext) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/AnotherFakeApiService.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/AnotherFakeApiService.java index ac73af977cfa..4d8fad35e097 100644 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/AnotherFakeApiService.java +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/AnotherFakeApiService.java @@ -14,6 +14,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public abstract class AnotherFakeApiService { public abstract Response call123testSpecialTags(Client client,SecurityContext securityContext) throws NotFoundException; diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApi.java index 32c652a19ee8..6f54b8252610 100644 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApi.java @@ -240,7 +240,7 @@ public Response testEndpointParameters(@ApiParam(value = "None", required=true) @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid request", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "Not found", response = Void.class) }) - public Response testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $")@HeaderParam("enum_header_string_array") List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg")@HeaderParam("enum_header_string") String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)") @QueryParam("enum_query_string_array") @Valid List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue = "-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1, -2") @QueryParam("enum_query_integer") Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @QueryParam("enum_query_double") Double enumQueryDouble,@ApiParam(value = "") @QueryParam("enum_query_model_array") @Valid List enumQueryModelArray,@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="$") @DefaultValue("$") @FormParam("enum_form_string_array") List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString,@Context SecurityContext securityContext) + public Response testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $")@HeaderParam("enum_header_string_array") List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg")@HeaderParam("enum_header_string") String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)") @QueryParam("enum_query_string_array") @Valid List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue = "-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1, -2") @QueryParam("enum_query_integer") Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @QueryParam("enum_query_double") Double enumQueryDouble,@ApiParam(value = "") @QueryParam("enum_query_model_array") @Valid List<@Valid EnumClass> enumQueryModelArray,@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="$") @DefaultValue("$") @FormParam("enum_form_string_array") List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString,@Context SecurityContext securityContext) throws NotFoundException { return delegate.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString, securityContext); } diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApiService.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApiService.java index d42edf03a9a0..0da19567ccfc 100644 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApiService.java +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApiService.java @@ -29,6 +29,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public abstract class FakeApiService { public abstract Response fakeBigDecimalMap(SecurityContext securityContext) throws NotFoundException; @@ -44,7 +45,7 @@ public abstract class FakeApiService { public abstract Response testBodyWithQueryParams( @NotNull String query,User user,SecurityContext securityContext) throws NotFoundException; public abstract Response testClientModel(Client client,SecurityContext securityContext) throws NotFoundException; public abstract Response testEndpointParameters(BigDecimal number,Double _double,String patternWithoutDelimiter,byte[] _byte,Integer integer,Integer int32,Long int64,Float _float,String string,FormDataBodyPart binaryBodypart,Date date,Date dateTime,String password,String paramCallback,SecurityContext securityContext) throws NotFoundException; - public abstract Response testEnumParameters(List enumHeaderStringArray,String enumHeaderString,List enumQueryStringArray,String enumQueryString,Integer enumQueryInteger,Double enumQueryDouble,List enumQueryModelArray,List enumFormStringArray,String enumFormString,SecurityContext securityContext) throws NotFoundException; + public abstract Response testEnumParameters(List enumHeaderStringArray,String enumHeaderString,List enumQueryStringArray,String enumQueryString,Integer enumQueryInteger,Double enumQueryDouble,List<@Valid EnumClass> enumQueryModelArray,List enumFormStringArray,String enumFormString,SecurityContext securityContext) throws NotFoundException; public abstract Response testGroupParameters( @NotNull Integer requiredStringGroup, @NotNull Boolean requiredBooleanGroup, @NotNull Long requiredInt64Group,Integer stringGroup,Boolean booleanGroup,Long int64Group,SecurityContext securityContext) throws NotFoundException; public abstract Response testInlineAdditionalProperties(Map requestBody,SecurityContext securityContext) throws NotFoundException; public abstract Response testInlineFreeformAdditionalProperties(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest,SecurityContext securityContext) throws NotFoundException; diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeClassnameTestApiService.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeClassnameTestApiService.java index cb5c11254d42..1b8ecd85a062 100644 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeClassnameTestApiService.java +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeClassnameTestApiService.java @@ -14,6 +14,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public abstract class FakeClassnameTestApiService { public abstract Response testClassname(Client client,SecurityContext securityContext) throws NotFoundException; diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FooApiService.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FooApiService.java index dc51a2311da2..c8a56925d0b1 100644 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FooApiService.java +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FooApiService.java @@ -14,6 +14,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public abstract class FooApiService { public abstract Response fooGet(SecurityContext securityContext) throws NotFoundException; diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/PetApiService.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/PetApiService.java index c62ed0509980..67234c2527c4 100644 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/PetApiService.java +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/PetApiService.java @@ -17,6 +17,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public abstract class PetApiService { public abstract Response addPet(Pet pet,SecurityContext securityContext) throws NotFoundException; diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/StoreApiService.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/StoreApiService.java index 371e9de5d7b3..dbb4c174f45b 100644 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/StoreApiService.java +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/StoreApiService.java @@ -15,6 +15,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public abstract class StoreApiService { public abstract Response deleteOrder(String orderId,SecurityContext securityContext) throws NotFoundException; diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/UserApi.java index ebdd9cabe7f7..a2e5f17da34c 100644 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/UserApi.java @@ -75,7 +75,7 @@ public Response createUser(@ApiParam(value = "Created user object", required = t @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUsersWithArrayInput(@ApiParam(value = "List of user object", required = true) @NotNull @Valid List user,@Context SecurityContext securityContext) + public Response createUsersWithArrayInput(@ApiParam(value = "List of user object", required = true) @NotNull @Valid List<@Valid User> user,@Context SecurityContext securityContext) throws NotFoundException { return delegate.createUsersWithArrayInput(user, securityContext); } @@ -87,7 +87,7 @@ public Response createUsersWithArrayInput(@ApiParam(value = "List of user object @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUsersWithListInput(@ApiParam(value = "List of user object", required = true) @NotNull @Valid List user,@Context SecurityContext securityContext) + public Response createUsersWithListInput(@ApiParam(value = "List of user object", required = true) @NotNull @Valid List<@Valid User> user,@Context SecurityContext securityContext) throws NotFoundException { return delegate.createUsersWithListInput(user, securityContext); } diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/UserApiService.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/UserApiService.java index 5f9b2873f79b..23feffb5feca 100644 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/UserApiService.java +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/UserApiService.java @@ -15,11 +15,12 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public abstract class UserApiService { public abstract Response createUser(User user,SecurityContext securityContext) throws NotFoundException; - public abstract Response createUsersWithArrayInput(List user,SecurityContext securityContext) throws NotFoundException; - public abstract Response createUsersWithListInput(List user,SecurityContext securityContext) throws NotFoundException; + public abstract Response createUsersWithArrayInput(List<@Valid User> user,SecurityContext securityContext) throws NotFoundException; + public abstract Response createUsersWithListInput(List<@Valid User> user,SecurityContext securityContext) throws NotFoundException; public abstract Response deleteUser(String username,SecurityContext securityContext) throws NotFoundException; public abstract Response getUserByName(String username,SecurityContext securityContext) throws NotFoundException; public abstract Response loginUser( @NotNull String username, @NotNull String password,SecurityContext securityContext) throws NotFoundException; diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/ArrayTest.java index 103024acb719..aa4e1edf6463 100644 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/ArrayTest.java @@ -46,7 +46,7 @@ public class ArrayTest { public static final String JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL = "array_array_of_model"; @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL) - private List> arrayArrayOfModel; + private List> arrayArrayOfModel; public ArrayTest arrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; @@ -104,12 +104,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 arrayArrayOfModelItem) { + public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) { if (this.arrayArrayOfModel == null) { this.arrayArrayOfModel = new ArrayList<>(); } @@ -124,11 +124,11 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI @JsonProperty(value = "array_array_of_model") @ApiModelProperty(value = "") @Valid - public List> getArrayArrayOfModel() { + public List> getArrayArrayOfModel() { return arrayArrayOfModel; } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { + public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/FileSchemaTestClass.java index 365006936e34..6450dfae9b2f 100644 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/FileSchemaTestClass.java @@ -41,7 +41,7 @@ public class FileSchemaTestClass { public static final String JSON_PROPERTY_FILES = "files"; @JsonProperty(JSON_PROPERTY_FILES) - private List files; + private List<@Valid ModelFile> files; public FileSchemaTestClass _file(ModelFile _file) { this._file = _file; @@ -63,7 +63,7 @@ public void setFile(ModelFile _file) { this._file = _file; } - public FileSchemaTestClass files(List files) { + public FileSchemaTestClass files(List<@Valid ModelFile> files) { this.files = files; return this; } @@ -83,11 +83,11 @@ public FileSchemaTestClass addFilesItem(ModelFile filesItem) { @JsonProperty(value = "files") @ApiModelProperty(value = "") @Valid - public List getFiles() { + public List<@Valid ModelFile> getFiles() { return files; } - public void setFiles(List files) { + public void setFiles(List<@Valid ModelFile> files) { this.files = files; } diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/ObjectWithDeprecatedFields.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/ObjectWithDeprecatedFields.java index 456badd43a57..2aca0d973ca8 100644 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/ObjectWithDeprecatedFields.java +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/ObjectWithDeprecatedFields.java @@ -52,7 +52,7 @@ public class ObjectWithDeprecatedFields { public static final String JSON_PROPERTY_BARS = "bars"; @JsonProperty(JSON_PROPERTY_BARS) - private List bars; + private List<@Valid String> bars; public ObjectWithDeprecatedFields uuid(String uuid) { this.uuid = uuid; @@ -114,7 +114,7 @@ public void setDeprecatedRef(DeprecatedObject deprecatedRef) { this.deprecatedRef = deprecatedRef; } - public ObjectWithDeprecatedFields bars(List bars) { + public ObjectWithDeprecatedFields bars(List<@Valid String> bars) { this.bars = bars; return this; } @@ -134,11 +134,11 @@ public ObjectWithDeprecatedFields addBarsItem(String barsItem) { @JsonProperty(value = "bars") @ApiModelProperty(value = "") - public List getBars() { + public List<@Valid String> getBars() { return bars; } - public void setBars(List bars) { + public void setBars(List<@Valid String> bars) { this.bars = bars; } diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/Pet.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/Pet.java index 0de0618f5e99..0226a9e38b34 100644 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/Pet.java @@ -62,7 +62,7 @@ public class Pet { public static final String JSON_PROPERTY_TAGS = "tags"; @JsonProperty(JSON_PROPERTY_TAGS) - private List tags; + private List<@Valid Tag> tags; /** * pet status in the store @@ -190,7 +190,7 @@ public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List tags) { + public Pet tags(List<@Valid Tag> tags) { this.tags = tags; return this; } @@ -210,11 +210,11 @@ public Pet addTagsItem(Tag tagsItem) { @JsonProperty(value = "tags") @ApiModelProperty(value = "") @Valid - public List getTags() { + public List<@Valid Tag> getTags() { return tags; } - public void setTags(List tags) { + public void setTags(List<@Valid Tag> tags) { this.tags = tags; } diff --git a/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java b/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java index 840de7f0c320..c730c58f33d6 100644 --- a/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java @@ -13,6 +13,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public class AnotherFakeApiServiceImpl extends AnotherFakeApiService { @Override diff --git a/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java b/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java index 4490e6fe4213..d04b4ddd0185 100644 --- a/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java @@ -28,6 +28,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public class FakeApiServiceImpl extends FakeApiService { @Override @@ -96,7 +97,7 @@ public Response testEndpointParameters(BigDecimal number, Double _double, String return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } @Override - public Response testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumQueryModelArray, List enumFormStringArray, String enumFormString, SecurityContext securityContext) throws NotFoundException { + public Response testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List<@Valid EnumClass> enumQueryModelArray, List enumFormStringArray, String enumFormString, SecurityContext securityContext) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } diff --git a/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/FakeClassnameTestApiServiceImpl.java b/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/FakeClassnameTestApiServiceImpl.java index 8dae1b59a76a..4b5971a2bf68 100644 --- a/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/FakeClassnameTestApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/FakeClassnameTestApiServiceImpl.java @@ -13,6 +13,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public class FakeClassnameTestApiServiceImpl extends FakeClassnameTestApiService { @Override diff --git a/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/FooApiServiceImpl.java b/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/FooApiServiceImpl.java index 344f74d8e830..cf0d9e2fb623 100644 --- a/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/FooApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/FooApiServiceImpl.java @@ -13,6 +13,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public class FooApiServiceImpl extends FooApiService { @Override diff --git a/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java b/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java index f7e82817f399..49b1ada77706 100644 --- a/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java @@ -16,6 +16,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public class PetApiServiceImpl extends PetApiService { @Override diff --git a/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java b/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java index 536e5779d00d..733e474ece9f 100644 --- a/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java @@ -14,6 +14,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public class StoreApiServiceImpl extends StoreApiService { @Override diff --git a/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java b/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java index 941d4b82ab0e..e40c07966a77 100644 --- a/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java @@ -14,6 +14,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public class UserApiServiceImpl extends UserApiService { @Override @@ -22,12 +23,12 @@ public Response createUser(User user, SecurityContext securityContext) throws No return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } @Override - public Response createUsersWithArrayInput(List user, SecurityContext securityContext) throws NotFoundException { + public Response createUsersWithArrayInput(List<@Valid User> user, SecurityContext securityContext) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } @Override - public Response createUsersWithListInput(List user, SecurityContext securityContext) throws NotFoundException { + public Response createUsersWithListInput(List<@Valid User> user, SecurityContext securityContext) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/UserApi.java index 8ae5e1891d6d..3529dd0c2885 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/UserApi.java @@ -51,7 +51,7 @@ public Response createUser(@ApiParam(value = "Created user object" ,required=tru @io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true) @NotNull @Valid List body,@Context SecurityContext securityContext) + public Response createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true) @NotNull @Valid List<@Valid User> body,@Context SecurityContext securityContext) throws NotFoundException { return service.createUsersWithArrayInput(body,securityContext); } @@ -62,7 +62,7 @@ public Response createUsersWithArrayInput(@ApiParam(value = "List of user object @io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true) @NotNull @Valid List body,@Context SecurityContext securityContext) + public Response createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true) @NotNull @Valid List<@Valid User> body,@Context SecurityContext securityContext) throws NotFoundException { return service.createUsersWithListInput(body,securityContext); } diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/UserApiService.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/UserApiService.java index 2ab01f3452ed..cdb7f934f647 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/UserApiService.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/UserApiService.java @@ -19,9 +19,9 @@ public interface UserApiService { Response createUser(User body,SecurityContext securityContext) throws NotFoundException; - Response createUsersWithArrayInput(List body,SecurityContext securityContext) + Response createUsersWithArrayInput(List<@Valid User> body,SecurityContext securityContext) throws NotFoundException; - Response createUsersWithListInput(List body,SecurityContext securityContext) + Response createUsersWithListInput(List<@Valid User> body,SecurityContext securityContext) throws NotFoundException; Response deleteUser(String username,SecurityContext securityContext) throws NotFoundException; diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/model/Category.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/model/Category.java index d2566a81692d..a8d332914ee8 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/model/Category.java @@ -7,6 +7,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import javax.validation.constraints.*; +import javax.validation.Valid; import io.swagger.annotations.*; import javax.validation.Valid; diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/model/ModelApiResponse.java index c1a1f5741043..27ad93f876e6 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/model/ModelApiResponse.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import javax.validation.constraints.*; +import javax.validation.Valid; import io.swagger.annotations.*; import javax.validation.Valid; diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/model/Order.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/model/Order.java index 96e47d3b3ba7..18f7372d6ec1 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/model/Order.java @@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.Date; import javax.validation.constraints.*; +import javax.validation.Valid; import io.swagger.annotations.*; import javax.validation.Valid; diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/model/Pet.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/model/Pet.java index 86e6c57ff162..09b09a74a6bd 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/model/Pet.java @@ -13,6 +13,7 @@ import org.openapitools.model.Category; import org.openapitools.model.Tag; import javax.validation.constraints.*; +import javax.validation.Valid; import io.swagger.annotations.*; import javax.validation.Valid; @@ -23,7 +24,7 @@ public class Pet { private Category category; private String name; private List photoUrls = new ArrayList<>(); - private List tags; + private List<@Valid Tag> tags; /** * pet status in the store @@ -106,10 +107,10 @@ public void setPhotoUrls(List photoUrls) { @ApiModelProperty(value = "") @JsonProperty("tags") @Valid - public List getTags() { + public List<@Valid Tag> getTags() { return tags; } - public void setTags(List tags) { + public void setTags(List<@Valid Tag> tags) { this.tags = tags; } diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/model/Tag.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/model/Tag.java index 1375bf209496..628b4c93fcae 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/model/Tag.java @@ -7,6 +7,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import javax.validation.constraints.*; +import javax.validation.Valid; import io.swagger.annotations.*; import javax.validation.Valid; diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/model/User.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/model/User.java index 330a25d8a4a4..56ce6b13b26c 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/model/User.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/model/User.java @@ -7,6 +7,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import javax.validation.constraints.*; +import javax.validation.Valid; import io.swagger.annotations.*; import javax.validation.Valid; diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java b/samples/server/petstore/jaxrs-resteasy/default/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java index 9b62bb6feb6b..8934773bf509 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java @@ -14,6 +14,8 @@ import java.io.InputStream; +import javax.validation.constraints.*; +import javax.validation.Valid; import javax.enterprise.context.RequestScoped; import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java b/samples/server/petstore/jaxrs-resteasy/default/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java index 4669635c2590..e0b0ab58cfd8 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java @@ -12,6 +12,8 @@ import java.io.InputStream; +import javax.validation.constraints.*; +import javax.validation.Valid; import javax.enterprise.context.RequestScoped; import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java b/samples/server/petstore/jaxrs-resteasy/default/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java index 554c147c99f8..9c48ef0c3083 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java @@ -12,6 +12,8 @@ import java.io.InputStream; +import javax.validation.constraints.*; +import javax.validation.Valid; import javax.enterprise.context.RequestScoped; import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; @@ -24,12 +26,12 @@ public Response createUser(User body,SecurityContext securityContext) // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } - public Response createUsersWithArrayInput(List body,SecurityContext securityContext) + public Response createUsersWithArrayInput(List<@Valid User> body,SecurityContext securityContext) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } - public Response createUsersWithListInput(List body,SecurityContext securityContext) + public Response createUsersWithListInput(List<@Valid User> body,SecurityContext securityContext) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/api/UserApi.java index 38de4d3547a5..f38af3de1755 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/api/UserApi.java @@ -42,7 +42,7 @@ public interface UserApi { @io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true) @NotNull @Valid List body,@Context SecurityContext securityContext); + public Response createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true) @NotNull @Valid List<@Valid User> body,@Context SecurityContext securityContext); @POST @Path("/createWithList") @@ -50,7 +50,7 @@ public interface UserApi { @io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true) @NotNull @Valid List body,@Context SecurityContext securityContext); + public Response createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true) @NotNull @Valid List<@Valid User> body,@Context SecurityContext securityContext); @DELETE @Path("/{username}") diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/Category.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/Category.java index f5391a0860cc..d1af6f3f01ad 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/Category.java @@ -7,6 +7,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import javax.validation.constraints.*; +import javax.validation.Valid; import io.swagger.annotations.*; @ApiModel(description="A category for a pet")@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyEapServerCodegen") diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/ModelApiResponse.java index b878faeea22b..4e384c075268 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/ModelApiResponse.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import javax.validation.constraints.*; +import javax.validation.Valid; import io.swagger.annotations.*; @ApiModel(description="Describes the result of uploading an image resource")@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyEapServerCodegen") diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/Order.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/Order.java index d1fe5c4e8108..420e5e1fa794 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/Order.java @@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; import javax.validation.constraints.*; +import javax.validation.Valid; import io.swagger.annotations.*; @ApiModel(description="An order for a pets from the pet store")@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyEapServerCodegen") diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/Pet.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/Pet.java index 496e43976f09..c95c6f7b0e34 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/Pet.java @@ -13,6 +13,7 @@ import org.openapitools.model.Category; import org.openapitools.model.Tag; import javax.validation.constraints.*; +import javax.validation.Valid; import io.swagger.annotations.*; @ApiModel(description="A pet for sale in the pet store")@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyEapServerCodegen") @@ -22,7 +23,7 @@ public class Pet { private Category category; private String name; private List photoUrls = new ArrayList<>(); - private List tags; + private List<@Valid Tag> tags; /** * pet status in the store @@ -103,10 +104,10 @@ public void setPhotoUrls(List photoUrls) { @ApiModelProperty(value = "") @JsonProperty("tags") - public List getTags() { + public List<@Valid Tag> getTags() { return tags; } - public void setTags(List tags) { + public void setTags(List<@Valid Tag> tags) { this.tags = tags; } diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/Tag.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/Tag.java index b2b4142e27e6..b7baea16264b 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/Tag.java @@ -7,6 +7,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import javax.validation.constraints.*; +import javax.validation.Valid; import io.swagger.annotations.*; @ApiModel(description="A tag for a pet")@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyEapServerCodegen") diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/User.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/User.java index cc1cc0d24227..a56c2ec14b84 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/User.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/model/User.java @@ -7,6 +7,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import javax.validation.constraints.*; +import javax.validation.Valid; import io.swagger.annotations.*; @ApiModel(description="A User who is purchasing from the pet store")@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyEapServerCodegen") diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java index 7ae1b892f0aa..1db117876a3b 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java @@ -13,6 +13,8 @@ import java.io.InputStream; +import javax.validation.constraints.*; +import javax.validation.Valid; import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java index 262a0fb0005a..8d3ccdd65a08 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java @@ -11,6 +11,8 @@ import java.io.InputStream; +import javax.validation.constraints.*; +import javax.validation.Valid; import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java index fd3958dae712..82ad2f15c023 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java @@ -11,6 +11,8 @@ import java.io.InputStream; +import javax.validation.constraints.*; +import javax.validation.Valid; import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; @@ -20,11 +22,11 @@ public Response createUser(User body,SecurityContext securityContext) { // do some magic! return Response.ok().build(); } - public Response createUsersWithArrayInput(List body,SecurityContext securityContext) { + public Response createUsersWithArrayInput(List<@Valid User> body,SecurityContext securityContext) { // do some magic! return Response.ok().build(); } - public Response createUsersWithListInput(List body,SecurityContext securityContext) { + public Response createUsersWithListInput(List<@Valid User> body,SecurityContext securityContext) { // do some magic! return Response.ok().build(); } diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/api/UserApi.java index 4b127c222850..a3844ba088ba 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/api/UserApi.java @@ -42,7 +42,7 @@ public interface UserApi { @io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true) @NotNull @Valid List body,@Context SecurityContext securityContext); + public Response createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true) @NotNull @Valid List<@Valid User> body,@Context SecurityContext securityContext); @POST @Path("/createWithList") @@ -50,7 +50,7 @@ public interface UserApi { @io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true) @NotNull @Valid List body,@Context SecurityContext securityContext); + public Response createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true) @NotNull @Valid List<@Valid User> body,@Context SecurityContext securityContext); @DELETE @Path("/{username}") diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/Category.java b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/Category.java index f5391a0860cc..d1af6f3f01ad 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/Category.java @@ -7,6 +7,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import javax.validation.constraints.*; +import javax.validation.Valid; import io.swagger.annotations.*; @ApiModel(description="A category for a pet")@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyEapServerCodegen") diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/ModelApiResponse.java index b878faeea22b..4e384c075268 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/ModelApiResponse.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import javax.validation.constraints.*; +import javax.validation.Valid; import io.swagger.annotations.*; @ApiModel(description="Describes the result of uploading an image resource")@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyEapServerCodegen") diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/Order.java b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/Order.java index c488917d2b39..594c7c050bf8 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/Order.java @@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty; import org.joda.time.DateTime; import javax.validation.constraints.*; +import javax.validation.Valid; import io.swagger.annotations.*; @ApiModel(description="An order for a pets from the pet store")@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyEapServerCodegen") diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/Pet.java b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/Pet.java index 496e43976f09..c95c6f7b0e34 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/Pet.java @@ -13,6 +13,7 @@ import org.openapitools.model.Category; import org.openapitools.model.Tag; import javax.validation.constraints.*; +import javax.validation.Valid; import io.swagger.annotations.*; @ApiModel(description="A pet for sale in the pet store")@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyEapServerCodegen") @@ -22,7 +23,7 @@ public class Pet { private Category category; private String name; private List photoUrls = new ArrayList<>(); - private List tags; + private List<@Valid Tag> tags; /** * pet status in the store @@ -103,10 +104,10 @@ public void setPhotoUrls(List photoUrls) { @ApiModelProperty(value = "") @JsonProperty("tags") - public List getTags() { + public List<@Valid Tag> getTags() { return tags; } - public void setTags(List tags) { + public void setTags(List<@Valid Tag> tags) { this.tags = tags; } diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/Tag.java b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/Tag.java index b2b4142e27e6..b7baea16264b 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/Tag.java @@ -7,6 +7,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import javax.validation.constraints.*; +import javax.validation.Valid; import io.swagger.annotations.*; @ApiModel(description="A tag for a pet")@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyEapServerCodegen") diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/User.java b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/User.java index cc1cc0d24227..a56c2ec14b84 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/User.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/model/User.java @@ -7,6 +7,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import javax.validation.constraints.*; +import javax.validation.Valid; import io.swagger.annotations.*; @ApiModel(description="A User who is purchasing from the pet store")@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyEapServerCodegen") diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java index 50a3d2f99c38..3de5b828e5b9 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java @@ -13,6 +13,8 @@ import java.io.InputStream; +import javax.validation.constraints.*; +import javax.validation.Valid; import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java index 262a0fb0005a..8d3ccdd65a08 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java @@ -11,6 +11,8 @@ import java.io.InputStream; +import javax.validation.constraints.*; +import javax.validation.Valid; import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java index 2806a00e6766..7c29df217c11 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java @@ -11,6 +11,8 @@ import java.io.InputStream; +import javax.validation.constraints.*; +import javax.validation.Valid; import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; @@ -20,11 +22,11 @@ public Response createUser(User body,SecurityContext securityContext) { // do some magic! return Response.ok().build(); } - public Response createUsersWithArrayInput(List body,SecurityContext securityContext) { + public Response createUsersWithArrayInput(List<@Valid User> body,SecurityContext securityContext) { // do some magic! return Response.ok().build(); } - public Response createUsersWithListInput(List body,SecurityContext securityContext) { + public Response createUsersWithListInput(List<@Valid User> body,SecurityContext securityContext) { // do some magic! return Response.ok().build(); } diff --git a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/api/UserApi.java index a8f524e85942..03400141792a 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/api/UserApi.java @@ -42,7 +42,7 @@ public interface UserApi { @io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true) @NotNull @Valid List body,@Context SecurityContext securityContext); + public Response createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true) @NotNull @Valid List<@Valid User> body,@Context SecurityContext securityContext); @POST @Path("/createWithList") @@ -50,7 +50,7 @@ public interface UserApi { @io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true) @NotNull @Valid List body,@Context SecurityContext securityContext); + public Response createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true) @NotNull @Valid List<@Valid User> body,@Context SecurityContext securityContext); @DELETE @Path("/{username}") diff --git a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/Category.java b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/Category.java index f5391a0860cc..d1af6f3f01ad 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/Category.java @@ -7,6 +7,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import javax.validation.constraints.*; +import javax.validation.Valid; import io.swagger.annotations.*; @ApiModel(description="A category for a pet")@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyEapServerCodegen") diff --git a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/ModelApiResponse.java index b878faeea22b..4e384c075268 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/ModelApiResponse.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import javax.validation.constraints.*; +import javax.validation.Valid; import io.swagger.annotations.*; @ApiModel(description="Describes the result of uploading an image resource")@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyEapServerCodegen") diff --git a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/Order.java b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/Order.java index 6129e7561528..7514eedff542 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/Order.java @@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.Date; import javax.validation.constraints.*; +import javax.validation.Valid; import io.swagger.annotations.*; @ApiModel(description="An order for a pets from the pet store")@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyEapServerCodegen") diff --git a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/Pet.java b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/Pet.java index 496e43976f09..c95c6f7b0e34 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/Pet.java @@ -13,6 +13,7 @@ import org.openapitools.model.Category; import org.openapitools.model.Tag; import javax.validation.constraints.*; +import javax.validation.Valid; import io.swagger.annotations.*; @ApiModel(description="A pet for sale in the pet store")@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyEapServerCodegen") @@ -22,7 +23,7 @@ public class Pet { private Category category; private String name; private List photoUrls = new ArrayList<>(); - private List tags; + private List<@Valid Tag> tags; /** * pet status in the store @@ -103,10 +104,10 @@ public void setPhotoUrls(List photoUrls) { @ApiModelProperty(value = "") @JsonProperty("tags") - public List getTags() { + public List<@Valid Tag> getTags() { return tags; } - public void setTags(List tags) { + public void setTags(List<@Valid Tag> tags) { this.tags = tags; } diff --git a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/Tag.java b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/Tag.java index b2b4142e27e6..b7baea16264b 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/Tag.java @@ -7,6 +7,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import javax.validation.constraints.*; +import javax.validation.Valid; import io.swagger.annotations.*; @ApiModel(description="A tag for a pet")@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyEapServerCodegen") diff --git a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/User.java b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/User.java index cc1cc0d24227..a56c2ec14b84 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/User.java +++ b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/model/User.java @@ -7,6 +7,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import javax.validation.constraints.*; +import javax.validation.Valid; import io.swagger.annotations.*; @ApiModel(description="A User who is purchasing from the pet store")@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyEapServerCodegen") diff --git a/samples/server/petstore/jaxrs-resteasy/eap/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java b/samples/server/petstore/jaxrs-resteasy/eap/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java index 50a3d2f99c38..3de5b828e5b9 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-resteasy/eap/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java @@ -13,6 +13,8 @@ import java.io.InputStream; +import javax.validation.constraints.*; +import javax.validation.Valid; import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; diff --git a/samples/server/petstore/jaxrs-resteasy/eap/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java b/samples/server/petstore/jaxrs-resteasy/eap/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java index 262a0fb0005a..8d3ccdd65a08 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-resteasy/eap/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java @@ -11,6 +11,8 @@ import java.io.InputStream; +import javax.validation.constraints.*; +import javax.validation.Valid; import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; diff --git a/samples/server/petstore/jaxrs-resteasy/eap/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java b/samples/server/petstore/jaxrs-resteasy/eap/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java index d250cf5c6a2e..cab308b7da84 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-resteasy/eap/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java @@ -11,6 +11,8 @@ import java.io.InputStream; +import javax.validation.constraints.*; +import javax.validation.Valid; import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; @@ -20,11 +22,11 @@ public Response createUser(User body,SecurityContext securityContext) { // do some magic! return Response.ok().build(); } - public Response createUsersWithArrayInput(List body,SecurityContext securityContext) { + public Response createUsersWithArrayInput(List<@Valid User> body,SecurityContext securityContext) { // do some magic! return Response.ok().build(); } - public Response createUsersWithListInput(List body,SecurityContext securityContext) { + public Response createUsersWithListInput(List<@Valid User> body,SecurityContext securityContext) { // do some magic! return Response.ok().build(); } diff --git a/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/api/UserApi.java index 70a8bc1cf46c..c453e39b9923 100644 --- a/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/api/UserApi.java @@ -51,7 +51,7 @@ public Response createUser(@ApiParam(value = "Created user object" ,required=tru @io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true) @NotNull @Valid List body,@Context SecurityContext securityContext) + public Response createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true) @NotNull @Valid List<@Valid User> body,@Context SecurityContext securityContext) throws NotFoundException { return service.createUsersWithArrayInput(body,securityContext); } @@ -62,7 +62,7 @@ public Response createUsersWithArrayInput(@ApiParam(value = "List of user object @io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true) @NotNull @Valid List body,@Context SecurityContext securityContext) + public Response createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true) @NotNull @Valid List<@Valid User> body,@Context SecurityContext securityContext) throws NotFoundException { return service.createUsersWithListInput(body,securityContext); } diff --git a/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/api/UserApiService.java b/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/api/UserApiService.java index 5da85d24212c..0c46a13e06a1 100644 --- a/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/api/UserApiService.java +++ b/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/api/UserApiService.java @@ -19,9 +19,9 @@ public interface UserApiService { Response createUser(User body,SecurityContext securityContext) throws NotFoundException; - Response createUsersWithArrayInput(List body,SecurityContext securityContext) + Response createUsersWithArrayInput(List<@Valid User> body,SecurityContext securityContext) throws NotFoundException; - Response createUsersWithListInput(List body,SecurityContext securityContext) + Response createUsersWithListInput(List<@Valid User> body,SecurityContext securityContext) throws NotFoundException; Response deleteUser(String username,SecurityContext securityContext) throws NotFoundException; diff --git a/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/model/Category.java b/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/model/Category.java index d2566a81692d..a8d332914ee8 100644 --- a/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/model/Category.java @@ -7,6 +7,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import javax.validation.constraints.*; +import javax.validation.Valid; import io.swagger.annotations.*; import javax.validation.Valid; diff --git a/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/model/ModelApiResponse.java index c1a1f5741043..27ad93f876e6 100644 --- a/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/model/ModelApiResponse.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import javax.validation.constraints.*; +import javax.validation.Valid; import io.swagger.annotations.*; import javax.validation.Valid; diff --git a/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/model/Order.java b/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/model/Order.java index 76fb75a08f96..562ae94649d8 100644 --- a/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/model/Order.java @@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; import javax.validation.constraints.*; +import javax.validation.Valid; import io.swagger.annotations.*; import javax.validation.Valid; diff --git a/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/model/Pet.java b/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/model/Pet.java index 86e6c57ff162..09b09a74a6bd 100644 --- a/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/model/Pet.java @@ -13,6 +13,7 @@ import org.openapitools.model.Category; import org.openapitools.model.Tag; import javax.validation.constraints.*; +import javax.validation.Valid; import io.swagger.annotations.*; import javax.validation.Valid; @@ -23,7 +24,7 @@ public class Pet { private Category category; private String name; private List photoUrls = new ArrayList<>(); - private List tags; + private List<@Valid Tag> tags; /** * pet status in the store @@ -106,10 +107,10 @@ public void setPhotoUrls(List photoUrls) { @ApiModelProperty(value = "") @JsonProperty("tags") @Valid - public List getTags() { + public List<@Valid Tag> getTags() { return tags; } - public void setTags(List tags) { + public void setTags(List<@Valid Tag> tags) { this.tags = tags; } diff --git a/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/model/Tag.java b/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/model/Tag.java index 1375bf209496..628b4c93fcae 100644 --- a/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/model/Tag.java @@ -7,6 +7,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import javax.validation.constraints.*; +import javax.validation.Valid; import io.swagger.annotations.*; import javax.validation.Valid; diff --git a/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/model/User.java b/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/model/User.java index 330a25d8a4a4..56ce6b13b26c 100644 --- a/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/model/User.java +++ b/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/model/User.java @@ -7,6 +7,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import javax.validation.constraints.*; +import javax.validation.Valid; import io.swagger.annotations.*; import javax.validation.Valid; diff --git a/samples/server/petstore/jaxrs-resteasy/java8/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java b/samples/server/petstore/jaxrs-resteasy/java8/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java index 0b264cc92ced..afd3438598a0 100644 --- a/samples/server/petstore/jaxrs-resteasy/java8/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-resteasy/java8/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java @@ -14,6 +14,8 @@ import java.io.InputStream; +import javax.validation.constraints.*; +import javax.validation.Valid; import javax.enterprise.context.RequestScoped; import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; diff --git a/samples/server/petstore/jaxrs-resteasy/java8/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java b/samples/server/petstore/jaxrs-resteasy/java8/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java index 4669635c2590..e0b0ab58cfd8 100644 --- a/samples/server/petstore/jaxrs-resteasy/java8/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-resteasy/java8/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java @@ -12,6 +12,8 @@ import java.io.InputStream; +import javax.validation.constraints.*; +import javax.validation.Valid; import javax.enterprise.context.RequestScoped; import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; diff --git a/samples/server/petstore/jaxrs-resteasy/java8/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java b/samples/server/petstore/jaxrs-resteasy/java8/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java index ecc386ffc05e..7818715c89b4 100644 --- a/samples/server/petstore/jaxrs-resteasy/java8/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-resteasy/java8/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java @@ -12,6 +12,8 @@ import java.io.InputStream; +import javax.validation.constraints.*; +import javax.validation.Valid; import javax.enterprise.context.RequestScoped; import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; @@ -24,12 +26,12 @@ public Response createUser(User body,SecurityContext securityContext) // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } - public Response createUsersWithArrayInput(List body,SecurityContext securityContext) + public Response createUsersWithArrayInput(List<@Valid User> body,SecurityContext securityContext) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } - public Response createUsersWithListInput(List body,SecurityContext securityContext) + public Response createUsersWithListInput(List<@Valid User> body,SecurityContext securityContext) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/api/UserApi.java index 4930059c7878..2f7c40e0403a 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/api/UserApi.java @@ -51,7 +51,7 @@ public Response createUser(@ApiParam(value = "Created user object" ,required=tru @io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true) @NotNull @Valid List body,@Context SecurityContext securityContext) + public Response createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true) @NotNull @Valid List<@Valid User> body,@Context SecurityContext securityContext) throws NotFoundException { return service.createUsersWithArrayInput(body,securityContext); } @@ -62,7 +62,7 @@ public Response createUsersWithArrayInput(@ApiParam(value = "List of user object @io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true) @NotNull @Valid List body,@Context SecurityContext securityContext) + public Response createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true) @NotNull @Valid List<@Valid User> body,@Context SecurityContext securityContext) throws NotFoundException { return service.createUsersWithListInput(body,securityContext); } diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/api/UserApiService.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/api/UserApiService.java index 9c059bf7a871..4efe0e50a617 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/api/UserApiService.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/api/UserApiService.java @@ -19,9 +19,9 @@ public interface UserApiService { Response createUser(User body,SecurityContext securityContext) throws NotFoundException; - Response createUsersWithArrayInput(List body,SecurityContext securityContext) + Response createUsersWithArrayInput(List<@Valid User> body,SecurityContext securityContext) throws NotFoundException; - Response createUsersWithListInput(List body,SecurityContext securityContext) + Response createUsersWithListInput(List<@Valid User> body,SecurityContext securityContext) throws NotFoundException; Response deleteUser(String username,SecurityContext securityContext) throws NotFoundException; diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/model/Category.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/model/Category.java index d2566a81692d..a8d332914ee8 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/model/Category.java @@ -7,6 +7,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import javax.validation.constraints.*; +import javax.validation.Valid; import io.swagger.annotations.*; import javax.validation.Valid; diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/model/ModelApiResponse.java index c1a1f5741043..27ad93f876e6 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/model/ModelApiResponse.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import javax.validation.constraints.*; +import javax.validation.Valid; import io.swagger.annotations.*; import javax.validation.Valid; diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/model/Order.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/model/Order.java index ec015fcacaaf..8b37908711ef 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/model/Order.java @@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty; import org.joda.time.DateTime; import javax.validation.constraints.*; +import javax.validation.Valid; import io.swagger.annotations.*; import javax.validation.Valid; diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/model/Pet.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/model/Pet.java index 86e6c57ff162..09b09a74a6bd 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/model/Pet.java @@ -13,6 +13,7 @@ import org.openapitools.model.Category; import org.openapitools.model.Tag; import javax.validation.constraints.*; +import javax.validation.Valid; import io.swagger.annotations.*; import javax.validation.Valid; @@ -23,7 +24,7 @@ public class Pet { private Category category; private String name; private List photoUrls = new ArrayList<>(); - private List tags; + private List<@Valid Tag> tags; /** * pet status in the store @@ -106,10 +107,10 @@ public void setPhotoUrls(List photoUrls) { @ApiModelProperty(value = "") @JsonProperty("tags") @Valid - public List getTags() { + public List<@Valid Tag> getTags() { return tags; } - public void setTags(List tags) { + public void setTags(List<@Valid Tag> tags) { this.tags = tags; } diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/model/Tag.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/model/Tag.java index 1375bf209496..628b4c93fcae 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/model/Tag.java @@ -7,6 +7,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import javax.validation.constraints.*; +import javax.validation.Valid; import io.swagger.annotations.*; import javax.validation.Valid; diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/model/User.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/model/User.java index 330a25d8a4a4..56ce6b13b26c 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/model/User.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/model/User.java @@ -7,6 +7,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import javax.validation.constraints.*; +import javax.validation.Valid; import io.swagger.annotations.*; import javax.validation.Valid; diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java b/samples/server/petstore/jaxrs-resteasy/joda/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java index 0b264cc92ced..afd3438598a0 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java @@ -14,6 +14,8 @@ import java.io.InputStream; +import javax.validation.constraints.*; +import javax.validation.Valid; import javax.enterprise.context.RequestScoped; import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java b/samples/server/petstore/jaxrs-resteasy/joda/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java index 4669635c2590..e0b0ab58cfd8 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java @@ -12,6 +12,8 @@ import java.io.InputStream; +import javax.validation.constraints.*; +import javax.validation.Valid; import javax.enterprise.context.RequestScoped; import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java b/samples/server/petstore/jaxrs-resteasy/joda/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java index 79b3edebfe71..94be3c2113b0 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java @@ -12,6 +12,8 @@ import java.io.InputStream; +import javax.validation.constraints.*; +import javax.validation.Valid; import javax.enterprise.context.RequestScoped; import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; @@ -24,12 +26,12 @@ public Response createUser(User body,SecurityContext securityContext) // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } - public Response createUsersWithArrayInput(List body,SecurityContext securityContext) + public Response createUsersWithArrayInput(List<@Valid User> body,SecurityContext securityContext) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } - public Response createUsersWithListInput(List body,SecurityContext securityContext) + public Response createUsersWithListInput(List<@Valid User> body,SecurityContext securityContext) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/UserApi.java index 764bd5b81174..72d9f7adcaaa 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/UserApi.java @@ -31,7 +31,7 @@ public interface UserApi { @ApiOperation(value = "Creates list of users with given input array", notes = "", tags={ "user" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - Response createUsersWithArrayInput(@Valid @NotNull List body); + Response createUsersWithArrayInput(@Valid @NotNull List<@Valid User> body); @POST @@ -39,7 +39,7 @@ public interface UserApi { @ApiOperation(value = "Creates list of users with given input array", notes = "", tags={ "user" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - Response createUsersWithListInput(@Valid @NotNull List body); + Response createUsersWithListInput(@Valid @NotNull List<@Valid User> body); @DELETE diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ArrayTest.java index bb2bfe7261eb..f7900caba932 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ArrayTest.java @@ -24,7 +24,7 @@ public class ArrayTest implements Serializable { private @Valid List arrayOfString; private @Valid List> arrayArrayOfInteger; - private @Valid List> arrayArrayOfModel; + private @Valid List> arrayArrayOfModel; /** **/ @@ -98,7 +98,7 @@ public ArrayTest removeArrayArrayOfIntegerItem(List arrayArrayOfIntegerIte } /** **/ - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } @@ -111,11 +111,11 @@ public List> getArrayArrayOfModel() { } @JsonProperty("array_array_of_model") - public void setArrayArrayOfModel(List> arrayArrayOfModel) { + public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { + public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) { if (this.arrayArrayOfModel == null) { this.arrayArrayOfModel = new ArrayList<>(); } @@ -124,7 +124,7 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI return this; } - public ArrayTest removeArrayArrayOfModelItem(List arrayArrayOfModelItem) { + public ArrayTest removeArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) { if (arrayArrayOfModelItem != null && this.arrayArrayOfModel != null) { this.arrayArrayOfModel.remove(arrayArrayOfModelItem); } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/FileSchemaTestClass.java index 40bc01d32c7e..b038edffbbad 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/FileSchemaTestClass.java @@ -23,7 +23,7 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class FileSchemaTestClass implements Serializable { private @Valid ModelFile _file; - private @Valid List files; + private @Valid List<@Valid ModelFile> files; /** **/ @@ -46,7 +46,7 @@ public void setFile(ModelFile _file) { /** **/ - public FileSchemaTestClass files(List files) { + public FileSchemaTestClass files(List<@Valid ModelFile> files) { this.files = files; return this; } @@ -59,7 +59,7 @@ public List getFiles() { } @JsonProperty("files") - public void setFiles(List files) { + public void setFiles(List<@Valid ModelFile> files) { this.files = files; } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Pet.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Pet.java index 894b5632247e..353e952bbbd0 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Pet.java @@ -30,7 +30,7 @@ public class Pet implements Serializable { private @Valid Category category; private @Valid String name; private @Valid Set photoUrls = new LinkedHashSet<>(); - private @Valid List tags; + private @Valid List<@Valid Tag> tags; public enum StatusEnum { AVAILABLE(String.valueOf("available")), PENDING(String.valueOf("pending")), SOLD(String.valueOf("sold")); @@ -177,7 +177,7 @@ public Pet removePhotoUrlsItem(String photoUrlsItem) { } /** **/ - public Pet tags(List tags) { + public Pet tags(List<@Valid Tag> tags) { this.tags = tags; return this; } @@ -190,7 +190,7 @@ public List getTags() { } @JsonProperty("tags") - public void setTags(List tags) { + public void setTags(List<@Valid Tag> tags) { this.tags = tags; } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/UserApi.java index ad65de6d7442..79ee197c7440 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/UserApi.java @@ -31,7 +31,7 @@ public interface UserApi { @ApiOperation(value = "Creates list of users with given input array", notes = "", tags={ "user" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - void createUsersWithArrayInput(@Valid @NotNull List body); + void createUsersWithArrayInput(@Valid @NotNull List<@Valid User> body); @POST @@ -39,7 +39,7 @@ public interface UserApi { @ApiOperation(value = "Creates list of users with given input array", notes = "", tags={ "user" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - void createUsersWithListInput(@Valid @NotNull List body); + void createUsersWithListInput(@Valid @NotNull List<@Valid User> body); @DELETE diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayTest.java index bb2bfe7261eb..f7900caba932 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayTest.java @@ -24,7 +24,7 @@ public class ArrayTest implements Serializable { private @Valid List arrayOfString; private @Valid List> arrayArrayOfInteger; - private @Valid List> arrayArrayOfModel; + private @Valid List> arrayArrayOfModel; /** **/ @@ -98,7 +98,7 @@ public ArrayTest removeArrayArrayOfIntegerItem(List arrayArrayOfIntegerIte } /** **/ - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } @@ -111,11 +111,11 @@ public List> getArrayArrayOfModel() { } @JsonProperty("array_array_of_model") - public void setArrayArrayOfModel(List> arrayArrayOfModel) { + public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { + public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) { if (this.arrayArrayOfModel == null) { this.arrayArrayOfModel = new ArrayList<>(); } @@ -124,7 +124,7 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI return this; } - public ArrayTest removeArrayArrayOfModelItem(List arrayArrayOfModelItem) { + public ArrayTest removeArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) { if (arrayArrayOfModelItem != null && this.arrayArrayOfModel != null) { this.arrayArrayOfModel.remove(arrayArrayOfModelItem); } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/FileSchemaTestClass.java index 40bc01d32c7e..b038edffbbad 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/FileSchemaTestClass.java @@ -23,7 +23,7 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class FileSchemaTestClass implements Serializable { private @Valid ModelFile _file; - private @Valid List files; + private @Valid List<@Valid ModelFile> files; /** **/ @@ -46,7 +46,7 @@ public void setFile(ModelFile _file) { /** **/ - public FileSchemaTestClass files(List files) { + public FileSchemaTestClass files(List<@Valid ModelFile> files) { this.files = files; return this; } @@ -59,7 +59,7 @@ public List getFiles() { } @JsonProperty("files") - public void setFiles(List files) { + public void setFiles(List<@Valid ModelFile> files) { this.files = files; } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Pet.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Pet.java index 894b5632247e..353e952bbbd0 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Pet.java @@ -30,7 +30,7 @@ public class Pet implements Serializable { private @Valid Category category; private @Valid String name; private @Valid Set photoUrls = new LinkedHashSet<>(); - private @Valid List tags; + private @Valid List<@Valid Tag> tags; public enum StatusEnum { AVAILABLE(String.valueOf("available")), PENDING(String.valueOf("pending")), SOLD(String.valueOf("sold")); @@ -177,7 +177,7 @@ public Pet removePhotoUrlsItem(String photoUrlsItem) { } /** **/ - public Pet tags(List tags) { + public Pet tags(List<@Valid Tag> tags) { this.tags = tags; return this; } @@ -190,7 +190,7 @@ public List getTags() { } @JsonProperty("tags") - public void setTags(List tags) { + public void setTags(List<@Valid Tag> tags) { this.tags = tags; } diff --git a/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/api/UserApi.java index 91d89f433d8e..25b6530270d4 100644 --- a/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/api/UserApi.java @@ -34,7 +34,7 @@ public Response createUser(@Valid @NotNull User body) { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUsersWithArrayInput(@Valid @NotNull List body) { + public Response createUsersWithArrayInput(@Valid @NotNull List<@Valid User> body) { return Response.ok().entity("magic!").build(); } @@ -44,7 +44,7 @@ public Response createUsersWithArrayInput(@Valid @NotNull List body) { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUsersWithListInput(@Valid @NotNull List body) { + public Response createUsersWithListInput(@Valid @NotNull List<@Valid User> body) { return Response.ok().entity("magic!").build(); } diff --git a/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/ArrayTest.java index 215c289e57eb..50eed4ef013a 100644 --- a/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/ArrayTest.java @@ -24,7 +24,7 @@ public class ArrayTest implements Serializable { private @Valid List arrayOfString; private @Valid List> arrayArrayOfInteger; - private @Valid List> arrayArrayOfModel; + private @Valid List> arrayArrayOfModel; protected ArrayTest(ArrayTestBuilder b) { this.arrayOfString = b.arrayOfString; @@ -107,7 +107,7 @@ public ArrayTest removeArrayArrayOfIntegerItem(List arrayArrayOfIntegerIte } /** **/ - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } @@ -120,11 +120,11 @@ public List> getArrayArrayOfModel() { } @JsonProperty("array_array_of_model") - public void setArrayArrayOfModel(List> arrayArrayOfModel) { + public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { + public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) { if (this.arrayArrayOfModel == null) { this.arrayArrayOfModel = new ArrayList<>(); } @@ -133,7 +133,7 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI return this; } - public ArrayTest removeArrayArrayOfModelItem(List arrayArrayOfModelItem) { + public ArrayTest removeArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) { if (arrayArrayOfModelItem != null && this.arrayArrayOfModel != null) { this.arrayArrayOfModel.remove(arrayArrayOfModelItem); } @@ -204,7 +204,7 @@ public ArrayTest build() { public static abstract class ArrayTestBuilder> { private List arrayOfString; private List> arrayArrayOfInteger; - private List> arrayArrayOfModel; + private List> arrayArrayOfModel; protected abstract B self(); public abstract C build(); @@ -217,7 +217,7 @@ public B arrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; return self(); } - public B arrayArrayOfModel(List> arrayArrayOfModel) { + public B arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return self(); } diff --git a/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/FileSchemaTestClass.java index 5eb4437f8ddf..5056d5b341de 100644 --- a/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/FileSchemaTestClass.java @@ -23,7 +23,7 @@ @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class FileSchemaTestClass implements Serializable { private @Valid ModelFile _file; - private @Valid List files; + private @Valid List<@Valid ModelFile> files; protected FileSchemaTestClass(FileSchemaTestClassBuilder b) { this._file = b._file; @@ -54,7 +54,7 @@ public void setFile(ModelFile _file) { /** **/ - public FileSchemaTestClass files(List files) { + public FileSchemaTestClass files(List<@Valid ModelFile> files) { this.files = files; return this; } @@ -67,7 +67,7 @@ public List getFiles() { } @JsonProperty("files") - public void setFiles(List files) { + public void setFiles(List<@Valid ModelFile> files) { this.files = files; } @@ -148,7 +148,7 @@ public FileSchemaTestClass build() { public static abstract class FileSchemaTestClassBuilder> { private ModelFile _file; - private List files; + private List<@Valid ModelFile> files; protected abstract B self(); public abstract C build(); @@ -157,7 +157,7 @@ public B _file(ModelFile _file) { this._file = _file; return self(); } - public B files(List files) { + public B files(List<@Valid ModelFile> files) { this.files = files; return self(); } diff --git a/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/Pet.java b/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/Pet.java index df3c21582221..fd9f1aa9f1eb 100644 --- a/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/Pet.java @@ -30,7 +30,7 @@ public class Pet implements Serializable { private @Valid Category category; private @Valid String name; private @Valid Set photoUrls = new LinkedHashSet<>(); - private @Valid List tags; + private @Valid List<@Valid Tag> tags; public enum StatusEnum { AVAILABLE(String.valueOf("available")), PENDING(String.valueOf("pending")), SOLD(String.valueOf("sold")); @@ -189,7 +189,7 @@ public Pet removePhotoUrlsItem(String photoUrlsItem) { } /** **/ - public Pet tags(List tags) { + public Pet tags(List<@Valid Tag> tags) { this.tags = tags; return this; } @@ -202,7 +202,7 @@ public List getTags() { } @JsonProperty("tags") - public void setTags(List tags) { + public void setTags(List<@Valid Tag> tags) { this.tags = tags; } @@ -314,7 +314,7 @@ public static abstract class PetBuilder photoUrls = new LinkedHashSet<>(); - private List tags; + private List<@Valid Tag> tags; private StatusEnum status; protected abstract B self(); @@ -336,7 +336,7 @@ public B photoUrls(Set photoUrls) { this.photoUrls = photoUrls; return self(); } - public B tags(List tags) { + public B tags(List<@Valid Tag> tags) { this.tags = tags; return self(); } diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/UserApi.java index cf63562ad52d..b26523f57740 100644 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/UserApi.java @@ -82,7 +82,7 @@ public Response createUser(@Valid @NotNull User body) { }) }) - public Response createUsersWithArrayInput(@Valid @NotNull List body) { + public Response createUsersWithArrayInput(@Valid @NotNull List<@Valid User> body) { return Response.ok().entity("magic!").build(); } @@ -96,7 +96,7 @@ public Response createUsersWithArrayInput(@Valid @NotNull List body) { }) }) - public Response createUsersWithListInput(@Valid @NotNull List body) { + public Response createUsersWithListInput(@Valid @NotNull List<@Valid User> body) { return Response.ok().entity("magic!").build(); } diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/ArrayTest.java index d8b7ce08af1b..f8e695b0e815 100644 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/ArrayTest.java @@ -22,7 +22,7 @@ public class ArrayTest implements Serializable { private @Valid List arrayOfString; private @Valid List> arrayArrayOfInteger; - private @Valid List> arrayArrayOfModel; + private @Valid List> arrayArrayOfModel; protected ArrayTest(ArrayTestBuilder b) { this.arrayOfString = b.arrayOfString; @@ -105,7 +105,7 @@ public ArrayTest removeArrayArrayOfIntegerItem(List arrayArrayOfIntegerIte } /** **/ - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } @@ -118,11 +118,11 @@ public List> getArrayArrayOfModel() { } @JsonProperty("array_array_of_model") - public void setArrayArrayOfModel(List> arrayArrayOfModel) { + public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { + public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) { if (this.arrayArrayOfModel == null) { this.arrayArrayOfModel = new ArrayList<>(); } @@ -131,7 +131,7 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI return this; } - public ArrayTest removeArrayArrayOfModelItem(List arrayArrayOfModelItem) { + public ArrayTest removeArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) { if (arrayArrayOfModelItem != null && this.arrayArrayOfModel != null) { this.arrayArrayOfModel.remove(arrayArrayOfModelItem); } @@ -202,7 +202,7 @@ public ArrayTest build() { public static abstract class ArrayTestBuilder> { private List arrayOfString; private List> arrayArrayOfInteger; - private List> arrayArrayOfModel; + private List> arrayArrayOfModel; protected abstract B self(); public abstract C build(); @@ -215,7 +215,7 @@ public B arrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; return self(); } - public B arrayArrayOfModel(List> arrayArrayOfModel) { + public B arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return self(); } diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/FileSchemaTestClass.java index ee28ea1b3654..851b6ae0b00b 100644 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/FileSchemaTestClass.java @@ -21,7 +21,7 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class FileSchemaTestClass implements Serializable { private @Valid ModelFile _file; - private @Valid List files; + private @Valid List<@Valid ModelFile> files; protected FileSchemaTestClass(FileSchemaTestClassBuilder b) { this._file = b._file; @@ -52,7 +52,7 @@ public void setFile(ModelFile _file) { /** **/ - public FileSchemaTestClass files(List files) { + public FileSchemaTestClass files(List<@Valid ModelFile> files) { this.files = files; return this; } @@ -65,7 +65,7 @@ public List getFiles() { } @JsonProperty("files") - public void setFiles(List files) { + public void setFiles(List<@Valid ModelFile> files) { this.files = files; } @@ -146,7 +146,7 @@ public FileSchemaTestClass build() { public static abstract class FileSchemaTestClassBuilder> { private ModelFile _file; - private List files; + private List<@Valid ModelFile> files; protected abstract B self(); public abstract C build(); @@ -155,7 +155,7 @@ public B _file(ModelFile _file) { this._file = _file; return self(); } - public B files(List files) { + public B files(List<@Valid ModelFile> files) { this.files = files; return self(); } diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/Pet.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/Pet.java index 5437669767de..bad9f6f2258f 100644 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/Pet.java @@ -28,7 +28,7 @@ public class Pet implements Serializable { private @Valid Category category; private @Valid String name; private @Valid Set photoUrls = new LinkedHashSet<>(); - private @Valid List tags; + private @Valid List<@Valid Tag> tags; public enum StatusEnum { AVAILABLE(String.valueOf("available")), PENDING(String.valueOf("pending")), SOLD(String.valueOf("sold")); @@ -187,7 +187,7 @@ public Pet removePhotoUrlsItem(String photoUrlsItem) { } /** **/ - public Pet tags(List tags) { + public Pet tags(List<@Valid Tag> tags) { this.tags = tags; return this; } @@ -200,7 +200,7 @@ public List getTags() { } @JsonProperty("tags") - public void setTags(List tags) { + public void setTags(List<@Valid Tag> tags) { this.tags = tags; } @@ -312,7 +312,7 @@ public static abstract class PetBuilder photoUrls = new LinkedHashSet<>(); - private List tags; + private List<@Valid Tag> tags; private StatusEnum status; protected abstract B self(); @@ -334,7 +334,7 @@ public B photoUrls(Set photoUrls) { this.photoUrls = photoUrls; return self(); } - public B tags(List tags) { + public B tags(List<@Valid Tag> tags) { this.tags = tags; return self(); } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/UserApi.java index 89238abb07f4..0bbd6d9f6cfd 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/UserApi.java @@ -34,7 +34,7 @@ public Response createUser(@Valid @NotNull User body) { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUsersWithArrayInput(@Valid @NotNull List body) { + public Response createUsersWithArrayInput(@Valid @NotNull List<@Valid User> body) { return Response.ok().entity("magic!").build(); } @@ -44,7 +44,7 @@ public Response createUsersWithArrayInput(@Valid @NotNull List body) { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUsersWithListInput(@Valid @NotNull List body) { + public Response createUsersWithListInput(@Valid @NotNull List<@Valid User> body) { return Response.ok().entity("magic!").build(); } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayTest.java index 63e560ec3436..552d26e4628a 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayTest.java @@ -24,7 +24,7 @@ public class ArrayTest implements Serializable { private @Valid List arrayOfString; private @Valid List> arrayArrayOfInteger; - private @Valid List> arrayArrayOfModel; + private @Valid List> arrayArrayOfModel; protected ArrayTest(ArrayTestBuilder b) { this.arrayOfString = b.arrayOfString; @@ -107,7 +107,7 @@ public ArrayTest removeArrayArrayOfIntegerItem(List arrayArrayOfIntegerIte } /** **/ - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } @@ -120,11 +120,11 @@ public List> getArrayArrayOfModel() { } @JsonProperty("array_array_of_model") - public void setArrayArrayOfModel(List> arrayArrayOfModel) { + public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { + public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) { if (this.arrayArrayOfModel == null) { this.arrayArrayOfModel = new ArrayList<>(); } @@ -133,7 +133,7 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI return this; } - public ArrayTest removeArrayArrayOfModelItem(List arrayArrayOfModelItem) { + public ArrayTest removeArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) { if (arrayArrayOfModelItem != null && this.arrayArrayOfModel != null) { this.arrayArrayOfModel.remove(arrayArrayOfModelItem); } @@ -204,7 +204,7 @@ public ArrayTest build() { public static abstract class ArrayTestBuilder> { private List arrayOfString; private List> arrayArrayOfInteger; - private List> arrayArrayOfModel; + private List> arrayArrayOfModel; protected abstract B self(); public abstract C build(); @@ -217,7 +217,7 @@ public B arrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; return self(); } - public B arrayArrayOfModel(List> arrayArrayOfModel) { + public B arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return self(); } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/FileSchemaTestClass.java index 167bd8acdbf3..fec6ea060efc 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/FileSchemaTestClass.java @@ -23,7 +23,7 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class FileSchemaTestClass implements Serializable { private @Valid ModelFile _file; - private @Valid List files; + private @Valid List<@Valid ModelFile> files; protected FileSchemaTestClass(FileSchemaTestClassBuilder b) { this._file = b._file; @@ -54,7 +54,7 @@ public void setFile(ModelFile _file) { /** **/ - public FileSchemaTestClass files(List files) { + public FileSchemaTestClass files(List<@Valid ModelFile> files) { this.files = files; return this; } @@ -67,7 +67,7 @@ public List getFiles() { } @JsonProperty("files") - public void setFiles(List files) { + public void setFiles(List<@Valid ModelFile> files) { this.files = files; } @@ -148,7 +148,7 @@ public FileSchemaTestClass build() { public static abstract class FileSchemaTestClassBuilder> { private ModelFile _file; - private List files; + private List<@Valid ModelFile> files; protected abstract B self(); public abstract C build(); @@ -157,7 +157,7 @@ public B _file(ModelFile _file) { this._file = _file; return self(); } - public B files(List files) { + public B files(List<@Valid ModelFile> files) { this.files = files; return self(); } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Pet.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Pet.java index 2b3afab4afb4..6318ca6cc029 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Pet.java @@ -30,7 +30,7 @@ public class Pet implements Serializable { private @Valid Category category; private @Valid String name; private @Valid Set photoUrls = new LinkedHashSet<>(); - private @Valid List tags; + private @Valid List<@Valid Tag> tags; public enum StatusEnum { AVAILABLE(String.valueOf("available")), PENDING(String.valueOf("pending")), SOLD(String.valueOf("sold")); @@ -189,7 +189,7 @@ public Pet removePhotoUrlsItem(String photoUrlsItem) { } /** **/ - public Pet tags(List tags) { + public Pet tags(List<@Valid Tag> tags) { this.tags = tags; return this; } @@ -202,7 +202,7 @@ public List getTags() { } @JsonProperty("tags") - public void setTags(List tags) { + public void setTags(List<@Valid Tag> tags) { this.tags = tags; } @@ -314,7 +314,7 @@ public static abstract class PetBuilder photoUrls = new LinkedHashSet<>(); - private List tags; + private List<@Valid Tag> tags; private StatusEnum status; protected abstract B self(); @@ -336,7 +336,7 @@ public B photoUrls(Set photoUrls) { this.photoUrls = photoUrls; return self(); } - public B tags(List tags) { + public B tags(List<@Valid Tag> tags) { this.tags = tags; return self(); } diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/AnotherFakeApiService.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/AnotherFakeApiService.java index 3991f29fa8a7..c678cc557a24 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/AnotherFakeApiService.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/AnotherFakeApiService.java @@ -15,6 +15,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public abstract class AnotherFakeApiService { public abstract Response call123testSpecialTags( @NotNull UUID uuidTest,Client body,SecurityContext securityContext) throws NotFoundException; diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/FakeApiService.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/FakeApiService.java index 119c6a70f68f..6ef9633ac4fd 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/FakeApiService.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/FakeApiService.java @@ -22,6 +22,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public abstract class FakeApiService { public abstract Response createXmlItem(XmlItem xmlItem,SecurityContext securityContext) throws NotFoundException; diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/FakeClassnameTags123ApiService.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/FakeClassnameTags123ApiService.java index e0d896f73c8a..1969974563d7 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/FakeClassnameTags123ApiService.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/FakeClassnameTags123ApiService.java @@ -14,6 +14,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public abstract class FakeClassnameTags123ApiService { public abstract Response testClassname(Client body,SecurityContext securityContext) throws NotFoundException; diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/PetApiService.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/PetApiService.java index d4b7f595e625..8796ef203573 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/PetApiService.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/PetApiService.java @@ -17,6 +17,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public abstract class PetApiService { public abstract Response addPet(Pet body,SecurityContext securityContext) throws NotFoundException; diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/StoreApiService.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/StoreApiService.java index 679dae579bf0..ba613f2eb7a2 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/StoreApiService.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/StoreApiService.java @@ -15,6 +15,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public abstract class StoreApiService { public abstract Response deleteOrder(String orderId,SecurityContext securityContext) throws NotFoundException; diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/UserApi.java index bbee29b94add..33d87832a625 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/UserApi.java @@ -75,7 +75,7 @@ public Response createUser(@ApiParam(value = "Created user object", required = t @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUsersWithArrayInput(@ApiParam(value = "List of user object", required = true) @NotNull @Valid List body,@Context SecurityContext securityContext) + public Response createUsersWithArrayInput(@ApiParam(value = "List of user object", required = true) @NotNull @Valid List<@Valid User> body,@Context SecurityContext securityContext) throws NotFoundException { return delegate.createUsersWithArrayInput(body, securityContext); } @@ -87,7 +87,7 @@ public Response createUsersWithArrayInput(@ApiParam(value = "List of user object @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUsersWithListInput(@ApiParam(value = "List of user object", required = true) @NotNull @Valid List body,@Context SecurityContext securityContext) + public Response createUsersWithListInput(@ApiParam(value = "List of user object", required = true) @NotNull @Valid List<@Valid User> body,@Context SecurityContext securityContext) throws NotFoundException { return delegate.createUsersWithListInput(body, securityContext); } diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/UserApiService.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/UserApiService.java index f555584d0d69..2de8377d5f78 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/UserApiService.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/UserApiService.java @@ -15,11 +15,12 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public abstract class UserApiService { public abstract Response createUser(User body,SecurityContext securityContext) throws NotFoundException; - public abstract Response createUsersWithArrayInput(List body,SecurityContext securityContext) throws NotFoundException; - public abstract Response createUsersWithListInput(List body,SecurityContext securityContext) throws NotFoundException; + public abstract Response createUsersWithArrayInput(List<@Valid User> body,SecurityContext securityContext) throws NotFoundException; + public abstract Response createUsersWithListInput(List<@Valid User> body,SecurityContext securityContext) throws NotFoundException; public abstract Response deleteUser(String username,SecurityContext securityContext) throws NotFoundException; public abstract Response getUserByName(String username,SecurityContext securityContext) throws NotFoundException; public abstract Response loginUser( @NotNull String username, @NotNull String password,SecurityContext securityContext) throws NotFoundException; diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/ArrayTest.java index 99c4a0f5e81b..1f110e8b84d6 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/ArrayTest.java @@ -46,7 +46,7 @@ public class ArrayTest { public static final String JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL = "array_array_of_model"; @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL) - private List> arrayArrayOfModel; + private List> arrayArrayOfModel; public ArrayTest arrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; @@ -104,12 +104,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 arrayArrayOfModelItem) { + public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) { if (this.arrayArrayOfModel == null) { this.arrayArrayOfModel = new ArrayList<>(); } @@ -124,11 +124,11 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI @JsonProperty(value = "array_array_of_model") @ApiModelProperty(value = "") @Valid - public List> getArrayArrayOfModel() { + public List> getArrayArrayOfModel() { return arrayArrayOfModel; } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { + public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/FileSchemaTestClass.java index 365006936e34..6450dfae9b2f 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/FileSchemaTestClass.java @@ -41,7 +41,7 @@ public class FileSchemaTestClass { public static final String JSON_PROPERTY_FILES = "files"; @JsonProperty(JSON_PROPERTY_FILES) - private List files; + private List<@Valid ModelFile> files; public FileSchemaTestClass _file(ModelFile _file) { this._file = _file; @@ -63,7 +63,7 @@ public void setFile(ModelFile _file) { this._file = _file; } - public FileSchemaTestClass files(List files) { + public FileSchemaTestClass files(List<@Valid ModelFile> files) { this.files = files; return this; } @@ -83,11 +83,11 @@ public FileSchemaTestClass addFilesItem(ModelFile filesItem) { @JsonProperty(value = "files") @ApiModelProperty(value = "") @Valid - public List getFiles() { + public List<@Valid ModelFile> getFiles() { return files; } - public void setFiles(List files) { + public void setFiles(List<@Valid ModelFile> files) { this.files = files; } diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/Pet.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/Pet.java index 0de0618f5e99..0226a9e38b34 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/Pet.java @@ -62,7 +62,7 @@ public class Pet { public static final String JSON_PROPERTY_TAGS = "tags"; @JsonProperty(JSON_PROPERTY_TAGS) - private List tags; + private List<@Valid Tag> tags; /** * pet status in the store @@ -190,7 +190,7 @@ public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List tags) { + public Pet tags(List<@Valid Tag> tags) { this.tags = tags; return this; } @@ -210,11 +210,11 @@ public Pet addTagsItem(Tag tagsItem) { @JsonProperty(value = "tags") @ApiModelProperty(value = "") @Valid - public List getTags() { + public List<@Valid Tag> getTags() { return tags; } - public void setTags(List tags) { + public void setTags(List<@Valid Tag> tags) { this.tags = tags; } diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java index 361e57e8167b..edbc664b7303 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java @@ -14,6 +14,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public class AnotherFakeApiServiceImpl extends AnotherFakeApiService { @Override diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java index aa26da980b8a..195b51a46ec7 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java @@ -21,6 +21,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public class FakeApiServiceImpl extends FakeApiService { @Override diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/impl/FakeClassnameTags123ApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/impl/FakeClassnameTags123ApiServiceImpl.java index 27c7eb541a75..6e3f0c93e9b2 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/impl/FakeClassnameTags123ApiServiceImpl.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/impl/FakeClassnameTags123ApiServiceImpl.java @@ -13,6 +13,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public class FakeClassnameTags123ApiServiceImpl extends FakeClassnameTags123ApiService { @Override diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java index e2f96dc0f947..bf998e921d7f 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java @@ -16,6 +16,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public class PetApiServiceImpl extends PetApiService { @Override diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java index b4ec457464ff..c06c4da6d465 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java @@ -14,6 +14,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public class StoreApiServiceImpl extends StoreApiService { @Override diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java index c6018c40f96a..33f057ca766f 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java @@ -14,6 +14,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public class UserApiServiceImpl extends UserApiService { @Override @@ -22,12 +23,12 @@ public Response createUser(User body, SecurityContext securityContext) throws No return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } @Override - public Response createUsersWithArrayInput(List body, SecurityContext securityContext) throws NotFoundException { + public Response createUsersWithArrayInput(List<@Valid User> body, SecurityContext securityContext) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } @Override - public Response createUsersWithListInput(List body, SecurityContext securityContext) throws NotFoundException { + public Response createUsersWithListInput(List<@Valid User> body, SecurityContext securityContext) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/AnotherFakeApiService.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/AnotherFakeApiService.java index 3991f29fa8a7..c678cc557a24 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/AnotherFakeApiService.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/AnotherFakeApiService.java @@ -15,6 +15,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public abstract class AnotherFakeApiService { public abstract Response call123testSpecialTags( @NotNull UUID uuidTest,Client body,SecurityContext securityContext) throws NotFoundException; diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeApiService.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeApiService.java index c46e98aebc47..d42b6887aea8 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeApiService.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeApiService.java @@ -23,6 +23,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public abstract class FakeApiService { public abstract Response createXmlItem(XmlItem xmlItem,SecurityContext securityContext) throws NotFoundException; diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeClassnameTestApiService.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeClassnameTestApiService.java index 9b9724797dfc..a155a1ae0351 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeClassnameTestApiService.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeClassnameTestApiService.java @@ -14,6 +14,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public abstract class FakeClassnameTestApiService { public abstract Response testClassname(Client body,SecurityContext securityContext) throws NotFoundException; diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/PetApiService.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/PetApiService.java index 5a082c27fd48..a82fd652bc3f 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/PetApiService.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/PetApiService.java @@ -17,6 +17,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public abstract class PetApiService { public abstract Response addPet(Pet body,SecurityContext securityContext) throws NotFoundException; diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/StoreApiService.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/StoreApiService.java index 679dae579bf0..ba613f2eb7a2 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/StoreApiService.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/StoreApiService.java @@ -15,6 +15,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public abstract class StoreApiService { public abstract Response deleteOrder(String orderId,SecurityContext securityContext) throws NotFoundException; diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/UserApi.java index 1e162536427e..7adca8b9709c 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/UserApi.java @@ -75,7 +75,7 @@ public Response createUser(@ApiParam(value = "Created user object", required = t @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUsersWithArrayInput(@ApiParam(value = "List of user object", required = true) @NotNull @Valid List body,@Context SecurityContext securityContext) + public Response createUsersWithArrayInput(@ApiParam(value = "List of user object", required = true) @NotNull @Valid List<@Valid User> body,@Context SecurityContext securityContext) throws NotFoundException { return delegate.createUsersWithArrayInput(body, securityContext); } @@ -87,7 +87,7 @@ public Response createUsersWithArrayInput(@ApiParam(value = "List of user object @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUsersWithListInput(@ApiParam(value = "List of user object", required = true) @NotNull @Valid List body,@Context SecurityContext securityContext) + public Response createUsersWithListInput(@ApiParam(value = "List of user object", required = true) @NotNull @Valid List<@Valid User> body,@Context SecurityContext securityContext) throws NotFoundException { return delegate.createUsersWithListInput(body, securityContext); } diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/UserApiService.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/UserApiService.java index f555584d0d69..2de8377d5f78 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/UserApiService.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/UserApiService.java @@ -15,11 +15,12 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public abstract class UserApiService { public abstract Response createUser(User body,SecurityContext securityContext) throws NotFoundException; - public abstract Response createUsersWithArrayInput(List body,SecurityContext securityContext) throws NotFoundException; - public abstract Response createUsersWithListInput(List body,SecurityContext securityContext) throws NotFoundException; + public abstract Response createUsersWithArrayInput(List<@Valid User> body,SecurityContext securityContext) throws NotFoundException; + public abstract Response createUsersWithListInput(List<@Valid User> body,SecurityContext securityContext) throws NotFoundException; public abstract Response deleteUser(String username,SecurityContext securityContext) throws NotFoundException; public abstract Response getUserByName(String username,SecurityContext securityContext) throws NotFoundException; public abstract Response loginUser( @NotNull String username, @NotNull String password,SecurityContext securityContext) throws NotFoundException; diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/ArrayTest.java index 99c4a0f5e81b..1f110e8b84d6 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/ArrayTest.java @@ -46,7 +46,7 @@ public class ArrayTest { public static final String JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL = "array_array_of_model"; @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL) - private List> arrayArrayOfModel; + private List> arrayArrayOfModel; public ArrayTest arrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; @@ -104,12 +104,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 arrayArrayOfModelItem) { + public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) { if (this.arrayArrayOfModel == null) { this.arrayArrayOfModel = new ArrayList<>(); } @@ -124,11 +124,11 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI @JsonProperty(value = "array_array_of_model") @ApiModelProperty(value = "") @Valid - public List> getArrayArrayOfModel() { + public List> getArrayArrayOfModel() { return arrayArrayOfModel; } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { + public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/FileSchemaTestClass.java index 365006936e34..6450dfae9b2f 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/FileSchemaTestClass.java @@ -41,7 +41,7 @@ public class FileSchemaTestClass { public static final String JSON_PROPERTY_FILES = "files"; @JsonProperty(JSON_PROPERTY_FILES) - private List files; + private List<@Valid ModelFile> files; public FileSchemaTestClass _file(ModelFile _file) { this._file = _file; @@ -63,7 +63,7 @@ public void setFile(ModelFile _file) { this._file = _file; } - public FileSchemaTestClass files(List files) { + public FileSchemaTestClass files(List<@Valid ModelFile> files) { this.files = files; return this; } @@ -83,11 +83,11 @@ public FileSchemaTestClass addFilesItem(ModelFile filesItem) { @JsonProperty(value = "files") @ApiModelProperty(value = "") @Valid - public List getFiles() { + public List<@Valid ModelFile> getFiles() { return files; } - public void setFiles(List files) { + public void setFiles(List<@Valid ModelFile> files) { this.files = files; } diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/Pet.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/Pet.java index 0de0618f5e99..0226a9e38b34 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/Pet.java @@ -62,7 +62,7 @@ public class Pet { public static final String JSON_PROPERTY_TAGS = "tags"; @JsonProperty(JSON_PROPERTY_TAGS) - private List tags; + private List<@Valid Tag> tags; /** * pet status in the store @@ -190,7 +190,7 @@ public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List tags) { + public Pet tags(List<@Valid Tag> tags) { this.tags = tags; return this; } @@ -210,11 +210,11 @@ public Pet addTagsItem(Tag tagsItem) { @JsonProperty(value = "tags") @ApiModelProperty(value = "") @Valid - public List getTags() { + public List<@Valid Tag> getTags() { return tags; } - public void setTags(List tags) { + public void setTags(List<@Valid Tag> tags) { this.tags = tags; } diff --git a/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java index 361e57e8167b..edbc664b7303 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java +++ b/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java @@ -14,6 +14,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public class AnotherFakeApiServiceImpl extends AnotherFakeApiService { @Override diff --git a/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java index c73b41f74224..f4dc88c44b73 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java +++ b/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java @@ -22,6 +22,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public class FakeApiServiceImpl extends FakeApiService { @Override diff --git a/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/FakeClassnameTestApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/FakeClassnameTestApiServiceImpl.java index 6f681177cb18..7356876a4518 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/FakeClassnameTestApiServiceImpl.java +++ b/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/FakeClassnameTestApiServiceImpl.java @@ -13,6 +13,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public class FakeClassnameTestApiServiceImpl extends FakeClassnameTestApiService { @Override diff --git a/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java index 628d5183e765..7b45a0fd7239 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java +++ b/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java @@ -16,6 +16,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public class PetApiServiceImpl extends PetApiService { @Override diff --git a/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java index b4ec457464ff..c06c4da6d465 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java +++ b/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java @@ -14,6 +14,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public class StoreApiServiceImpl extends StoreApiService { @Override diff --git a/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java index c6018c40f96a..33f057ca766f 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java +++ b/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java @@ -14,6 +14,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; +import javax.validation.Valid; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public class UserApiServiceImpl extends UserApiService { @Override @@ -22,12 +23,12 @@ public Response createUser(User body, SecurityContext securityContext) throws No return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } @Override - public Response createUsersWithArrayInput(List body, SecurityContext securityContext) throws NotFoundException { + public Response createUsersWithArrayInput(List<@Valid User> body, SecurityContext securityContext) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } @Override - public Response createUsersWithListInput(List body, SecurityContext securityContext) throws NotFoundException { + public Response createUsersWithListInput(List<@Valid User> body, SecurityContext securityContext) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } diff --git a/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/api/AnotherFakeApiService.java b/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/api/AnotherFakeApiService.java index 26d97a10d9b9..333a0a836175 100644 --- a/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/api/AnotherFakeApiService.java +++ b/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/api/AnotherFakeApiService.java @@ -14,6 +14,7 @@ import jakarta.ws.rs.core.Response; import jakarta.ws.rs.core.SecurityContext; import jakarta.validation.constraints.*; +import jakarta.validation.Valid; @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public abstract class AnotherFakeApiService { public abstract Response call123testSpecialTags(Client client,SecurityContext securityContext) throws NotFoundException; diff --git a/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/api/FakeApi.java index 74445e793666..53a95a9931ba 100644 --- a/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/api/FakeApi.java @@ -244,7 +244,7 @@ public Response testEndpointParameters(@Schema(description = "None") @QueryParam @ApiResponse(responseCode = "404", description = "Not found", content = @Content(schema = @Schema(implementation = Void.class))), }, tags={ "fake", }) - public Response testEnumParameters(@Schema(description = "Header parameter enum test (string array)" , allowableValues=">, $")@HeaderParam("enum_header_string_array") List enumHeaderStringArray,@Schema(description = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg")@HeaderParam("enum_header_string") String enumHeaderString,@Schema(description = "Query parameter enum test (string array)") @QueryParam("enum_query_string_array") @Valid List enumQueryStringArray,@Schema(description = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue = "-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString,@Schema(description = "Query parameter enum test (double)", allowableValues="1, -2") @QueryParam("enum_query_integer") Integer enumQueryInteger,@Schema(description = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @QueryParam("enum_query_double") Double enumQueryDouble,@Schema(description = "") @QueryParam("enum_query_model_array") @Valid List enumQueryModelArray,@Schema(description = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="$") @DefaultValue("$") @QueryParam("enum_form_string_array") List enumFormStringArray,@Schema(description = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @QueryParam("enum_form_string") String enumFormString,@Context SecurityContext securityContext) + public Response testEnumParameters(@Schema(description = "Header parameter enum test (string array)" , allowableValues=">, $")@HeaderParam("enum_header_string_array") List enumHeaderStringArray,@Schema(description = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg")@HeaderParam("enum_header_string") String enumHeaderString,@Schema(description = "Query parameter enum test (string array)") @QueryParam("enum_query_string_array") @Valid List enumQueryStringArray,@Schema(description = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue = "-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString,@Schema(description = "Query parameter enum test (double)", allowableValues="1, -2") @QueryParam("enum_query_integer") Integer enumQueryInteger,@Schema(description = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @QueryParam("enum_query_double") Double enumQueryDouble,@Schema(description = "") @QueryParam("enum_query_model_array") @Valid List<@Valid EnumClass> enumQueryModelArray,@Schema(description = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="$") @DefaultValue("$") @QueryParam("enum_form_string_array") List enumFormStringArray,@Schema(description = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @QueryParam("enum_form_string") String enumFormString,@Context SecurityContext securityContext) throws NotFoundException { return delegate.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString, securityContext); } diff --git a/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/api/FakeApiService.java b/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/api/FakeApiService.java index 6d30dde0220d..e7e7016bf65a 100644 --- a/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/api/FakeApiService.java +++ b/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/api/FakeApiService.java @@ -29,6 +29,7 @@ import jakarta.ws.rs.core.Response; import jakarta.ws.rs.core.SecurityContext; import jakarta.validation.constraints.*; +import jakarta.validation.Valid; @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public abstract class FakeApiService { public abstract Response fakeBigDecimalMap(SecurityContext securityContext) throws NotFoundException; @@ -44,7 +45,7 @@ public abstract class FakeApiService { public abstract Response testBodyWithQueryParams( @NotNull String query,User user,SecurityContext securityContext) throws NotFoundException; public abstract Response testClientModel(Client client,SecurityContext securityContext) throws NotFoundException; public abstract Response testEndpointParameters(BigDecimal number,Double _double,String patternWithoutDelimiter,byte[] _byte,Integer integer,Integer int32,Long int64,Float _float,String string,FormDataBodyPart binaryBodypart,Date date,Date dateTime,String password,String paramCallback,SecurityContext securityContext) throws NotFoundException; - public abstract Response testEnumParameters(List enumHeaderStringArray,String enumHeaderString,List enumQueryStringArray,String enumQueryString,Integer enumQueryInteger,Double enumQueryDouble,List enumQueryModelArray,List enumFormStringArray,String enumFormString,SecurityContext securityContext) throws NotFoundException; + public abstract Response testEnumParameters(List enumHeaderStringArray,String enumHeaderString,List enumQueryStringArray,String enumQueryString,Integer enumQueryInteger,Double enumQueryDouble,List<@Valid EnumClass> enumQueryModelArray,List enumFormStringArray,String enumFormString,SecurityContext securityContext) throws NotFoundException; public abstract Response testGroupParameters( @NotNull Integer requiredStringGroup, @NotNull Boolean requiredBooleanGroup, @NotNull Long requiredInt64Group,Integer stringGroup,Boolean booleanGroup,Long int64Group,SecurityContext securityContext) throws NotFoundException; public abstract Response testInlineAdditionalProperties(Map requestBody,SecurityContext securityContext) throws NotFoundException; public abstract Response testInlineFreeformAdditionalProperties(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest,SecurityContext securityContext) throws NotFoundException; diff --git a/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/api/FakeClassnameTestApiService.java b/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/api/FakeClassnameTestApiService.java index e975f1f4cf45..a4aae0efb0c3 100644 --- a/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/api/FakeClassnameTestApiService.java +++ b/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/api/FakeClassnameTestApiService.java @@ -14,6 +14,7 @@ import jakarta.ws.rs.core.Response; import jakarta.ws.rs.core.SecurityContext; import jakarta.validation.constraints.*; +import jakarta.validation.Valid; @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public abstract class FakeClassnameTestApiService { public abstract Response testClassname(Client client,SecurityContext securityContext) throws NotFoundException; diff --git a/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/api/FooApiService.java b/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/api/FooApiService.java index 8f877f49ac0b..7d573009d175 100644 --- a/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/api/FooApiService.java +++ b/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/api/FooApiService.java @@ -14,6 +14,7 @@ import jakarta.ws.rs.core.Response; import jakarta.ws.rs.core.SecurityContext; import jakarta.validation.constraints.*; +import jakarta.validation.Valid; @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public abstract class FooApiService { public abstract Response fooGet(SecurityContext securityContext) throws NotFoundException; diff --git a/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/api/PetApiService.java b/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/api/PetApiService.java index ea6f8dcda048..a30bb5ed9d47 100644 --- a/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/api/PetApiService.java +++ b/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/api/PetApiService.java @@ -17,6 +17,7 @@ import jakarta.ws.rs.core.Response; import jakarta.ws.rs.core.SecurityContext; import jakarta.validation.constraints.*; +import jakarta.validation.Valid; @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public abstract class PetApiService { public abstract Response addPet(Pet pet,SecurityContext securityContext) throws NotFoundException; diff --git a/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/api/StoreApiService.java b/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/api/StoreApiService.java index a16b9a9248ec..21a17c14aeb0 100644 --- a/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/api/StoreApiService.java +++ b/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/api/StoreApiService.java @@ -15,6 +15,7 @@ import jakarta.ws.rs.core.Response; import jakarta.ws.rs.core.SecurityContext; import jakarta.validation.constraints.*; +import jakarta.validation.Valid; @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public abstract class StoreApiService { public abstract Response deleteOrder(String orderId,SecurityContext securityContext) throws NotFoundException; diff --git a/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/api/UserApi.java index 66b00e1337da..667958ad9c0e 100644 --- a/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/api/UserApi.java @@ -78,7 +78,7 @@ public Response createUser(@Schema(description = "Created user object", required @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Void.class))), }, tags={ "user", }) - public Response createUsersWithArrayInput(@Schema(description = "List of user object", required = true) @NotNull @Valid List user,@Context SecurityContext securityContext) + public Response createUsersWithArrayInput(@Schema(description = "List of user object", required = true) @NotNull @Valid List<@Valid User> user,@Context SecurityContext securityContext) throws NotFoundException { return delegate.createUsersWithArrayInput(user, securityContext); } @@ -90,7 +90,7 @@ public Response createUsersWithArrayInput(@Schema(description = "List of user ob @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Void.class))), }, tags={ "user", }) - public Response createUsersWithListInput(@Schema(description = "List of user object", required = true) @NotNull @Valid List user,@Context SecurityContext securityContext) + public Response createUsersWithListInput(@Schema(description = "List of user object", required = true) @NotNull @Valid List<@Valid User> user,@Context SecurityContext securityContext) throws NotFoundException { return delegate.createUsersWithListInput(user, securityContext); } diff --git a/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/api/UserApiService.java b/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/api/UserApiService.java index 4f965efa40ab..cf0b1c0b0b4e 100644 --- a/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/api/UserApiService.java +++ b/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/api/UserApiService.java @@ -15,11 +15,12 @@ import jakarta.ws.rs.core.Response; import jakarta.ws.rs.core.SecurityContext; import jakarta.validation.constraints.*; +import jakarta.validation.Valid; @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public abstract class UserApiService { public abstract Response createUser(User user,SecurityContext securityContext) throws NotFoundException; - public abstract Response createUsersWithArrayInput(List user,SecurityContext securityContext) throws NotFoundException; - public abstract Response createUsersWithListInput(List user,SecurityContext securityContext) throws NotFoundException; + public abstract Response createUsersWithArrayInput(List<@Valid User> user,SecurityContext securityContext) throws NotFoundException; + public abstract Response createUsersWithListInput(List<@Valid User> user,SecurityContext securityContext) throws NotFoundException; public abstract Response deleteUser(String username,SecurityContext securityContext) throws NotFoundException; public abstract Response getUserByName(String username,SecurityContext securityContext) throws NotFoundException; public abstract Response loginUser( @NotNull String username, @NotNull String password,SecurityContext securityContext) throws NotFoundException; diff --git a/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/model/ArrayTest.java index 8ee21a1fa73d..b29a85da67ab 100644 --- a/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/model/ArrayTest.java @@ -45,7 +45,7 @@ public class ArrayTest { public static final String JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL = "array_array_of_model"; @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL) - private List> arrayArrayOfModel; + private List> arrayArrayOfModel; public ArrayTest arrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; @@ -103,12 +103,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 arrayArrayOfModelItem) { + public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) { if (this.arrayArrayOfModel == null) { this.arrayArrayOfModel = new ArrayList<>(); } @@ -123,11 +123,11 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI @JsonProperty(value = "array_array_of_model") @Schema(description = "") @Valid - public List> getArrayArrayOfModel() { + public List> getArrayArrayOfModel() { return arrayArrayOfModel; } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { + public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } diff --git a/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/model/FileSchemaTestClass.java index 0353d0ca69bf..55071dcb029d 100644 --- a/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/model/FileSchemaTestClass.java @@ -40,7 +40,7 @@ public class FileSchemaTestClass { public static final String JSON_PROPERTY_FILES = "files"; @JsonProperty(JSON_PROPERTY_FILES) - private List files; + private List<@Valid ModelFile> files; public FileSchemaTestClass _file(ModelFile _file) { this._file = _file; @@ -62,7 +62,7 @@ public void setFile(ModelFile _file) { this._file = _file; } - public FileSchemaTestClass files(List files) { + public FileSchemaTestClass files(List<@Valid ModelFile> files) { this.files = files; return this; } @@ -82,11 +82,11 @@ public FileSchemaTestClass addFilesItem(ModelFile filesItem) { @JsonProperty(value = "files") @Schema(description = "") @Valid - public List getFiles() { + public List<@Valid ModelFile> getFiles() { return files; } - public void setFiles(List files) { + public void setFiles(List<@Valid ModelFile> files) { this.files = files; } diff --git a/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/model/ObjectWithDeprecatedFields.java b/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/model/ObjectWithDeprecatedFields.java index 601f0ea4b0c3..84c49b03a0b5 100644 --- a/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/model/ObjectWithDeprecatedFields.java +++ b/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/model/ObjectWithDeprecatedFields.java @@ -51,7 +51,7 @@ public class ObjectWithDeprecatedFields { public static final String JSON_PROPERTY_BARS = "bars"; @JsonProperty(JSON_PROPERTY_BARS) - private List bars; + private List<@Valid String> bars; public ObjectWithDeprecatedFields uuid(String uuid) { this.uuid = uuid; @@ -113,7 +113,7 @@ public void setDeprecatedRef(DeprecatedObject deprecatedRef) { this.deprecatedRef = deprecatedRef; } - public ObjectWithDeprecatedFields bars(List bars) { + public ObjectWithDeprecatedFields bars(List<@Valid String> bars) { this.bars = bars; return this; } @@ -133,11 +133,11 @@ public ObjectWithDeprecatedFields addBarsItem(String barsItem) { @JsonProperty(value = "bars") @Schema(description = "") - public List getBars() { + public List<@Valid String> getBars() { return bars; } - public void setBars(List bars) { + public void setBars(List<@Valid String> bars) { this.bars = bars; } diff --git a/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/model/Pet.java b/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/model/Pet.java index 725761d7d040..f1ee2486f275 100644 --- a/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/model/Pet.java @@ -61,7 +61,7 @@ public class Pet { public static final String JSON_PROPERTY_TAGS = "tags"; @JsonProperty(JSON_PROPERTY_TAGS) - private List tags; + private List<@Valid Tag> tags; /** * pet status in the store @@ -189,7 +189,7 @@ public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List tags) { + public Pet tags(List<@Valid Tag> tags) { this.tags = tags; return this; } @@ -209,11 +209,11 @@ public Pet addTagsItem(Tag tagsItem) { @JsonProperty(value = "tags") @Schema(description = "") @Valid - public List getTags() { + public List<@Valid Tag> getTags() { return tags; } - public void setTags(List tags) { + public void setTags(List<@Valid Tag> tags) { this.tags = tags; } diff --git a/samples/server/petstore/jaxrs/jersey3/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey3/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java index b16c7a4d1bd3..d607a42ef085 100644 --- a/samples/server/petstore/jaxrs/jersey3/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java +++ b/samples/server/petstore/jaxrs/jersey3/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java @@ -13,6 +13,7 @@ import jakarta.ws.rs.core.Response; import jakarta.ws.rs.core.SecurityContext; import jakarta.validation.constraints.*; +import jakarta.validation.Valid; @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public class AnotherFakeApiServiceImpl extends AnotherFakeApiService { @Override diff --git a/samples/server/petstore/jaxrs/jersey3/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey3/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java index 434d5b06e65e..904a1cf03753 100644 --- a/samples/server/petstore/jaxrs/jersey3/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java +++ b/samples/server/petstore/jaxrs/jersey3/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java @@ -28,6 +28,7 @@ import jakarta.ws.rs.core.Response; import jakarta.ws.rs.core.SecurityContext; import jakarta.validation.constraints.*; +import jakarta.validation.Valid; @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public class FakeApiServiceImpl extends FakeApiService { @Override @@ -96,7 +97,7 @@ public Response testEndpointParameters(BigDecimal number, Double _double, String return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } @Override - public Response testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumQueryModelArray, List enumFormStringArray, String enumFormString, SecurityContext securityContext) throws NotFoundException { + public Response testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List<@Valid EnumClass> enumQueryModelArray, List enumFormStringArray, String enumFormString, SecurityContext securityContext) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } diff --git a/samples/server/petstore/jaxrs/jersey3/src/main/java/org/openapitools/api/impl/FakeClassnameTestApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey3/src/main/java/org/openapitools/api/impl/FakeClassnameTestApiServiceImpl.java index 677af0c3a2e0..e8c4367e4fd9 100644 --- a/samples/server/petstore/jaxrs/jersey3/src/main/java/org/openapitools/api/impl/FakeClassnameTestApiServiceImpl.java +++ b/samples/server/petstore/jaxrs/jersey3/src/main/java/org/openapitools/api/impl/FakeClassnameTestApiServiceImpl.java @@ -13,6 +13,7 @@ import jakarta.ws.rs.core.Response; import jakarta.ws.rs.core.SecurityContext; import jakarta.validation.constraints.*; +import jakarta.validation.Valid; @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public class FakeClassnameTestApiServiceImpl extends FakeClassnameTestApiService { @Override diff --git a/samples/server/petstore/jaxrs/jersey3/src/main/java/org/openapitools/api/impl/FooApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey3/src/main/java/org/openapitools/api/impl/FooApiServiceImpl.java index bbf3e3aaf770..30933a3631e8 100644 --- a/samples/server/petstore/jaxrs/jersey3/src/main/java/org/openapitools/api/impl/FooApiServiceImpl.java +++ b/samples/server/petstore/jaxrs/jersey3/src/main/java/org/openapitools/api/impl/FooApiServiceImpl.java @@ -13,6 +13,7 @@ import jakarta.ws.rs.core.Response; import jakarta.ws.rs.core.SecurityContext; import jakarta.validation.constraints.*; +import jakarta.validation.Valid; @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public class FooApiServiceImpl extends FooApiService { @Override diff --git a/samples/server/petstore/jaxrs/jersey3/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey3/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java index a005a2b19922..67496341461d 100644 --- a/samples/server/petstore/jaxrs/jersey3/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java +++ b/samples/server/petstore/jaxrs/jersey3/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java @@ -16,6 +16,7 @@ import jakarta.ws.rs.core.Response; import jakarta.ws.rs.core.SecurityContext; import jakarta.validation.constraints.*; +import jakarta.validation.Valid; @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public class PetApiServiceImpl extends PetApiService { @Override diff --git a/samples/server/petstore/jaxrs/jersey3/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey3/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java index 06db41bac8cf..58eef0046476 100644 --- a/samples/server/petstore/jaxrs/jersey3/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java +++ b/samples/server/petstore/jaxrs/jersey3/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java @@ -14,6 +14,7 @@ import jakarta.ws.rs.core.Response; import jakarta.ws.rs.core.SecurityContext; import jakarta.validation.constraints.*; +import jakarta.validation.Valid; @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public class StoreApiServiceImpl extends StoreApiService { @Override diff --git a/samples/server/petstore/jaxrs/jersey3/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey3/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java index 62e74c356362..db96ab09036b 100644 --- a/samples/server/petstore/jaxrs/jersey3/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java +++ b/samples/server/petstore/jaxrs/jersey3/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java @@ -14,6 +14,7 @@ import jakarta.ws.rs.core.Response; import jakarta.ws.rs.core.SecurityContext; import jakarta.validation.constraints.*; +import jakarta.validation.Valid; @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public class UserApiServiceImpl extends UserApiService { @Override @@ -22,12 +23,12 @@ public Response createUser(User user, SecurityContext securityContext) throws No return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } @Override - public Response createUsersWithArrayInput(List user, SecurityContext securityContext) throws NotFoundException { + public Response createUsersWithArrayInput(List<@Valid User> user, SecurityContext securityContext) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } @Override - public Response createUsersWithListInput(List user, SecurityContext securityContext) throws NotFoundException { + public Response createUsersWithListInput(List<@Valid User> user, SecurityContext securityContext) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } 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 c7c22d218125..9aa4ee394900 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 @@ -88,7 +88,7 @@ ResponseEntity createUser( ) ResponseEntity createUsersWithArrayInput( - @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List user + @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody 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 user + @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user ) throws Exception; 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 9f1e50085dac..32a273fe3286 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 @@ -32,7 +32,7 @@ public class ArrayTest { private List> arrayArrayOfInteger; @Valid - private List> arrayArrayOfModel; + private List> arrayArrayOfModel; public ArrayTest arrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; @@ -90,7 +90,7 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } @@ -110,11 +110,11 @@ public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayO @Valid @Schema(name = "array_array_of_model", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @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; } 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 2173edb3dbfc..df3d8c013d87 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 @@ -85,7 +85,7 @@ default ResponseEntity createUser( ) default ResponseEntity createUsersWithArrayInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List user + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody 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 user + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@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/ArrayTest.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java index d1e1f1dd95db..dae0301137ca 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 @@ -32,7 +32,7 @@ public class ArrayTest { private List> arrayArrayOfInteger; @Valid - private List> arrayArrayOfModel; + private List> arrayArrayOfModel; public ArrayTest arrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; @@ -90,7 +90,7 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } @@ -110,11 +110,11 @@ public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayO @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; } 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 2173edb3dbfc..df3d8c013d87 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 @@ -85,7 +85,7 @@ default ResponseEntity createUser( ) default ResponseEntity createUsersWithArrayInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List user + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody 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 user + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); 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 7d3308d4f7ad..67ca138961c9 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 @@ -33,7 +33,7 @@ public class ArrayTest { private List> arrayArrayOfInteger; @Valid - private List> arrayArrayOfModel; + private List> arrayArrayOfModel; public ArrayTest arrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; @@ -91,7 +91,7 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } @@ -111,11 +111,11 @@ public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayO @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; } 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 21206a3dea51..2a3cf0f6cff7 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 @@ -80,7 +80,7 @@ default ResponseEntity createUser( ) default ResponseEntity createUsersWithArrayInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List user + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody 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 user + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user ) { return getDelegate().createUsersWithListInput(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 8f4502411c53..a67248a54f31 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 user) { + default ResponseEntity createUsersWithArrayInput(List<@Valid User> user) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -60,7 +60,7 @@ default ResponseEntity createUsersWithArrayInput(List user) { * @return successful operation (status code 200) * @see UserApi#createUsersWithListInput */ - default ResponseEntity createUsersWithListInput(List user) { + default ResponseEntity createUsersWithListInput(List<@Valid User> user) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } 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 7d3308d4f7ad..67ca138961c9 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 @@ -33,7 +33,7 @@ public class ArrayTest { private List> arrayArrayOfInteger; @Valid - private List> arrayArrayOfModel; + private List> arrayArrayOfModel; public ArrayTest arrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; @@ -91,7 +91,7 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } @@ -111,11 +111,11 @@ public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayO @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; } 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 2d4fd8cb6ba9..d17762af84c7 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 @@ -88,7 +88,7 @@ default void createUser( @ResponseStatus(HttpStatus.OK) default void createUsersWithArrayInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List user + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody 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 user + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user ) { getDelegate().createUsersWithListInput(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 502ea48610bd..cb52516e68b6 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 user) { + default void createUsersWithArrayInput(List<@Valid User> user) { throw new IllegalArgumentException("Not implemented"); } @@ -59,7 +59,7 @@ default void createUsersWithArrayInput(List user) { * @return successful operation (status code 200) * @see UserApi#createUsersWithListInput */ - default void createUsersWithListInput(List user) { + default void createUsersWithListInput(List<@Valid User> user) { throw new IllegalArgumentException("Not implemented"); } 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 21206a3dea51..2a3cf0f6cff7 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 @@ -80,7 +80,7 @@ default ResponseEntity createUser( ) default ResponseEntity createUsersWithArrayInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List user + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody 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 user + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user ) { return getDelegate().createUsersWithListInput(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 8f4502411c53..a67248a54f31 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 user) { + default ResponseEntity createUsersWithArrayInput(List<@Valid User> user) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -60,7 +60,7 @@ default ResponseEntity createUsersWithArrayInput(List user) { * @return successful operation (status code 200) * @see UserApi#createUsersWithListInput */ - default ResponseEntity createUsersWithListInput(List user) { + default ResponseEntity createUsersWithListInput(List<@Valid User> user) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } 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 7d3308d4f7ad..67ca138961c9 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 @@ -33,7 +33,7 @@ public class ArrayTest { private List> arrayArrayOfInteger; @Valid - private List> arrayArrayOfModel; + private List> arrayArrayOfModel; public ArrayTest arrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; @@ -91,7 +91,7 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } @@ -111,11 +111,11 @@ public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayO @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; } 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 cb87014e41f3..90d2cf53b223 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 @@ -65,7 +65,7 @@ default ResponseEntity createUser( ) default ResponseEntity createUsersWithArrayInput( - @Valid @RequestBody List user + @Valid @RequestBody List<@Valid User> user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -86,7 +86,7 @@ default ResponseEntity createUsersWithArrayInput( ) default ResponseEntity createUsersWithListInput( - @Valid @RequestBody List user + @Valid @RequestBody List<@Valid User> user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); 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 2173edb3dbfc..df3d8c013d87 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 @@ -85,7 +85,7 @@ default ResponseEntity createUser( ) default ResponseEntity createUsersWithArrayInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List user + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody 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 user + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); 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 7d3308d4f7ad..67ca138961c9 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 @@ -33,7 +33,7 @@ public class ArrayTest { private List> arrayArrayOfInteger; @Valid - private List> arrayArrayOfModel; + private List> arrayArrayOfModel; public ArrayTest arrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; @@ -91,7 +91,7 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } @@ -111,11 +111,11 @@ public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayO @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; } 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 7d3308d4f7ad..67ca138961c9 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 @@ -33,7 +33,7 @@ public class ArrayTest { private List> arrayArrayOfInteger; @Valid - private List> arrayArrayOfModel; + private List> arrayArrayOfModel; public ArrayTest arrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; @@ -91,7 +91,7 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } @@ -111,11 +111,11 @@ public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayO @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; } 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 7d3308d4f7ad..67ca138961c9 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 @@ -33,7 +33,7 @@ public class ArrayTest { private List> arrayArrayOfInteger; @Valid - private List> arrayArrayOfModel; + private List> arrayArrayOfModel; public ArrayTest arrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; @@ -91,7 +91,7 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } @@ -111,11 +111,11 @@ public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayO @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; } 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 1af4d0c7d190..ea144f4b5e0e 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 @@ -77,7 +77,7 @@ default ResponseEntity createUser( ) default ResponseEntity createUsersWithArrayInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody 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 body + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@Valid User> body ) { return getDelegate().createUsersWithListInput(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 6bd822603bda..8c1d3425acf0 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 body) { + default ResponseEntity createUsersWithArrayInput(List<@Valid User> body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -58,7 +58,7 @@ default ResponseEntity createUsersWithArrayInput(List body) { * @return successful operation (status code 200) * @see UserApi#createUsersWithListInput */ - default ResponseEntity createUsersWithListInput(List body) { + default ResponseEntity createUsersWithListInput(List<@Valid User> body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } 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 7d3308d4f7ad..67ca138961c9 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 @@ -33,7 +33,7 @@ public class ArrayTest { private List> arrayArrayOfInteger; @Valid - private List> arrayArrayOfModel; + private List> arrayArrayOfModel; public ArrayTest arrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; @@ -91,7 +91,7 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } @@ -111,11 +111,11 @@ public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayO @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; } 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 1af4d0c7d190..ea144f4b5e0e 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 @@ -77,7 +77,7 @@ default ResponseEntity createUser( ) default ResponseEntity createUsersWithArrayInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody 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 body + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@Valid User> body ) { return getDelegate().createUsersWithListInput(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 6bd822603bda..8c1d3425acf0 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 body) { + default ResponseEntity createUsersWithArrayInput(List<@Valid User> body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -58,7 +58,7 @@ default ResponseEntity createUsersWithArrayInput(List body) { * @return successful operation (status code 200) * @see UserApi#createUsersWithListInput */ - default ResponseEntity createUsersWithListInput(List body) { + default ResponseEntity createUsersWithListInput(List<@Valid User> body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } 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 7d3308d4f7ad..67ca138961c9 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 @@ -33,7 +33,7 @@ public class ArrayTest { private List> arrayArrayOfInteger; @Valid - private List> arrayArrayOfModel; + private List> arrayArrayOfModel; public ArrayTest arrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; @@ -91,7 +91,7 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } @@ -111,11 +111,11 @@ public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayO @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; } 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 d2153f59d30b..44cddb8ab677 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 @@ -82,7 +82,7 @@ default ResponseEntity createUser( ) default ResponseEntity createUsersWithArrayInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody 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 body + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@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/model/ArrayTest.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayTest.java index 7d3308d4f7ad..67ca138961c9 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 @@ -33,7 +33,7 @@ public class ArrayTest { private List> arrayArrayOfInteger; @Valid - private List> arrayArrayOfModel; + private List> arrayArrayOfModel; public ArrayTest arrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; @@ -91,7 +91,7 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } @@ -111,11 +111,11 @@ public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayO @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; } 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 d2153f59d30b..44cddb8ab677 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 @@ -82,7 +82,7 @@ default ResponseEntity createUser( ) default ResponseEntity createUsersWithArrayInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody 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 body + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@Valid User> body ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); 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 7d3308d4f7ad..67ca138961c9 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 @@ -33,7 +33,7 @@ public class ArrayTest { private List> arrayArrayOfInteger; @Valid - private List> arrayArrayOfModel; + private List> arrayArrayOfModel; public ArrayTest arrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; @@ -91,7 +91,7 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } @@ -111,11 +111,11 @@ public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayO @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; } 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 2173edb3dbfc..df3d8c013d87 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 @@ -85,7 +85,7 @@ default ResponseEntity createUser( ) default ResponseEntity createUsersWithArrayInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List user + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody 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 user + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); 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 7d3308d4f7ad..67ca138961c9 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 @@ -33,7 +33,7 @@ public class ArrayTest { private List> arrayArrayOfInteger; @Valid - private List> arrayArrayOfModel; + private List> arrayArrayOfModel; public ArrayTest arrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; @@ -91,7 +91,7 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } @@ -111,11 +111,11 @@ public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayO @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; } 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 d49b2a8e42b8..740647710386 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 @@ -100,7 +100,7 @@ default ResponseEntity createUser( ) default ResponseEntity createUsersWithArrayInput( - @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List user + @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody 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 user + @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); 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 8270593e04c8..bc97c662644f 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 @@ -32,7 +32,7 @@ public class ArrayTest { private List> arrayArrayOfInteger; @Valid - private List> arrayArrayOfModel; + private List> arrayArrayOfModel; public ArrayTest arrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; @@ -90,7 +90,7 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } @@ -110,11 +110,11 @@ public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayO @Valid @Schema(name = "array_array_of_model", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @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; } 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 934a4adec1cf..a270c4c76c65 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 @@ -85,7 +85,7 @@ default ResponseEntity createUser( ) default ResponseEntity createUsersWithArrayInput( - @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List userDto + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody 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 userDto + @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@Valid UserDto> userDto ) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); 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 961e58338975..38f4ccc7b193 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 @@ -35,7 +35,7 @@ public class ArrayTestDto { private List> arrayArrayOfInteger; @Valid - private List> arrayArrayOfModel; + private List> arrayArrayOfModel; public ArrayTestDto arrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; @@ -93,7 +93,7 @@ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } - public ArrayTestDto arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTestDto arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; } @@ -113,11 +113,11 @@ public ArrayTestDto addArrayArrayOfModelItem(List<@Valid ReadOnlyFirstDto> array @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; }