From f409fb61848f71cb464f2caa7d15364703d311b7 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sun, 23 Oct 2022 10:52:54 +0800 Subject: [PATCH] various improvements to java okhttp-gson client (#13794) --- .../libraries/okhttp-gson/ApiClient.mustache | 2 - .../additional_properties.mustache | 9 + .../Java/libraries/okhttp-gson/api.mustache | 22 +- .../org/openapitools/client/api/PingApi.java | 10 +- .../client/api/AnotherFakeApi.java | 5 +- .../org/openapitools/client/api/FakeApi.java | 114 ++------ .../client/api/FakeClassnameTags123Api.java | 5 +- .../org/openapitools/client/api/PetApi.java | 70 ++--- .../org/openapitools/client/api/StoreApi.java | 31 +- .../org/openapitools/client/api/UserApi.java | 64 +--- .../org/openapitools/client/api/PetApi.java | 67 ++--- .../openapitools/client/model/Category.java | 9 + .../client/model/ModelApiResponse.java | 9 + .../org/openapitools/client/model/Order.java | 9 + .../org/openapitools/client/model/Pet.java | 9 + .../org/openapitools/client/model/Tag.java | 9 + .../org/openapitools/client/model/User.java | 9 + .../client/api/AnotherFakeApi.java | 5 +- .../org/openapitools/client/api/FakeApi.java | 114 ++------ .../client/api/FakeClassnameTags123Api.java | 5 +- .../org/openapitools/client/api/PetApi.java | 70 ++--- .../org/openapitools/client/api/StoreApi.java | 31 +- .../org/openapitools/client/api/UserApi.java | 64 +--- .../client/api/AnotherFakeApi.java | 5 +- .../openapitools/client/api/DefaultApi.java | 6 +- .../org/openapitools/client/api/FakeApi.java | 109 ++----- .../client/api/FakeClassnameTags123Api.java | 5 +- .../org/openapitools/client/api/PetApi.java | 70 ++--- .../org/openapitools/client/api/StoreApi.java | 30 +- .../org/openapitools/client/api/UserApi.java | 60 +--- .../model/AdditionalPropertiesClass.java | 9 + .../org/openapitools/client/model/Animal.java | 9 + .../org/openapitools/client/model/Apple.java | 9 + .../model/ArrayOfArrayOfNumberOnly.java | 9 + .../client/model/ArrayOfInlineAllOf.java | 9 + ...InlineAllOfArrayAllofDogPropertyInner.java | 9 + ...eAllOfArrayAllofDogPropertyInnerAllOf.java | 9 + ...AllOfArrayAllofDogPropertyInnerAllOf1.java | 9 + ...eAllOfArrayAllofDogPropertyItemsAllOf.java | 273 ----------------- ...AllOfArrayAllofDogPropertyItemsAllOf1.java | 273 ----------------- .../client/model/ArrayOfNumberOnly.java | 9 + .../openapitools/client/model/ArrayTest.java | 9 + .../org/openapitools/client/model/Banana.java | 9 + .../openapitools/client/model/BasquePig.java | 9 + .../client/model/Capitalization.java | 9 + .../org/openapitools/client/model/Cat.java | 9 + .../openapitools/client/model/CatAllOf.java | 9 + .../openapitools/client/model/Category.java | 9 + .../openapitools/client/model/ClassModel.java | 9 + .../org/openapitools/client/model/Client.java | 9 + .../client/model/ComplexQuadrilateral.java | 9 + .../openapitools/client/model/DanishPig.java | 9 + .../client/model/DeprecatedObject.java | 9 + .../org/openapitools/client/model/Dog.java | 9 + .../openapitools/client/model/DogAllOf.java | 9 + .../openapitools/client/model/EnumArrays.java | 9 + .../client/model/EnumStringDiscriminator.java | 9 + .../openapitools/client/model/EnumTest.java | 9 + .../client/model/EquilateralTriangle.java | 9 + .../client/model/FileSchemaTestClass.java | 9 + .../org/openapitools/client/model/Foo.java | 9 + .../client/model/FooGetDefaultResponse.java | 9 + .../openapitools/client/model/FormatTest.java | 9 + .../client/model/GrandparentAnimal.java | 9 + .../client/model/HasOnlyReadOnly.java | 9 + .../client/model/HealthCheckResult.java | 9 + .../client/model/InlineResponseDefault.java | 275 ------------------ .../openapitools/client/model/MapTest.java | 9 + ...ropertiesAndAdditionalPropertiesClass.java | 9 + .../client/model/Model200Response.java | 9 + .../client/model/ModelApiResponse.java | 9 + .../openapitools/client/model/ModelFile.java | 9 + .../openapitools/client/model/ModelList.java | 9 + .../client/model/ModelReturn.java | 9 + .../org/openapitools/client/model/Name.java | 9 + .../openapitools/client/model/NumberOnly.java | 9 + .../model/ObjectWithDeprecatedFields.java | 9 + .../org/openapitools/client/model/Order.java | 9 + .../client/model/OuterComposite.java | 9 + .../openapitools/client/model/ParentPet.java | 9 + .../org/openapitools/client/model/Pet.java | 9 + .../client/model/PetWithRequiredTags.java | 9 + .../client/model/QuadrilateralInterface.java | 9 + .../client/model/ReadOnlyFirst.java | 9 + .../client/model/ScaleneTriangle.java | 9 + .../client/model/ShapeInterface.java | 9 + .../client/model/SimpleQuadrilateral.java | 9 + .../client/model/SpecialModelName.java | 9 + .../org/openapitools/client/model/Tag.java | 9 + .../client/model/TriangleInterface.java | 9 + .../org/openapitools/client/model/User.java | 9 + .../org/openapitools/client/model/Whale.java | 9 + .../org/openapitools/client/model/Zebra.java | 9 + ...neAllOfArrayAllofDogPropertyInnerTest.java | 2 - ...fArrayAllofDogPropertyItemsAllOf1Test.java | 50 ---- ...OfArrayAllofDogPropertyItemsAllOfTest.java | 50 ---- .../model/InlineResponseDefaultTest.java | 52 ---- 97 files changed, 860 insertions(+), 1682 deletions(-) delete mode 100644 samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf.java delete mode 100644 samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf1.java delete mode 100644 samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/InlineResponseDefault.java delete mode 100644 samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf1Test.java delete mode 100644 samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOfTest.java delete mode 100644 samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/InlineResponseDefaultTest.java diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/ApiClient.mustache index 14174bd13a1c..95ac0206d180 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/ApiClient.mustache @@ -179,7 +179,6 @@ public class ApiClient { this.basePath = basePath; } -{{#hasOAuthMethods}} String tokenUrl = "{{{tokenUrl}}}"; if (!"".equals(tokenUrl) && !URI.create(tokenUrl).isAbsolute()) { URI uri = URI.create(getBasePath()); @@ -196,7 +195,6 @@ public class ApiClient { retryingOAuth ); initHttpClient(Collections.singletonList(retryingOAuth)); -{{/hasOAuthMethods}} // Setup authentications (key: authentication name, value: authentication).{{#authMethods}}{{#isBasic}}{{#isBasicBasic}} authentications.put("{{name}}", new HttpBasicAuth());{{/isBasicBasic}}{{^isBasicBasic}} authentications.put("{{name}}", new HttpBearerAuth("{{scheme}}"));{{/isBasicBasic}}{{/isBasic}}{{#isApiKey}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/additional_properties.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/additional_properties.mustache index 96c779fd24a5..bca54f84d575 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/additional_properties.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/additional_properties.mustache @@ -9,6 +9,10 @@ /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the {{classname}} instance itself */ public {{classname}} putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -20,6 +24,8 @@ /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -27,6 +33,9 @@ /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { 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 2008fcbc883d..d39478decb6f 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 @@ -193,7 +193,9 @@ public class {{classname}} { {{/dynamicOperations}} final String[] localVarAccepts = { - {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} + {{#produces}} + "{{{mediaType}}}"{{^-last}},{{/-last}} + {{/produces}} }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -201,7 +203,9 @@ public class {{classname}} { } final String[] localVarContentTypes = { - {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} + {{#consumes}} + "{{{mediaType}}}"{{^-last}},{{/-last}} + {{/consumes}} }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -218,15 +222,16 @@ public class {{classname}} { @SuppressWarnings("rawtypes") private okhttp3.Call {{operationId}}ValidateBeforeCall({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}final ApiCallback _callback) throws ApiException { {{^performBeanValidation}} - {{#allParams}}{{#required}} + {{#allParams}} + {{#required}} // verify the required parameter '{{paramName}}' is set if ({{paramName}} == null) { throw new ApiException("Missing the required parameter '{{paramName}}' when calling {{operationId}}(Async)"); } - {{/required}}{{/allParams}} - okhttp3.Call localVarCall = {{operationId}}Call({{#allParams}}{{paramName}}, {{/allParams}}_callback); - return localVarCall; + {{/required}} + {{/allParams}} + return {{operationId}}Call({{#allParams}}{{paramName}}, {{/allParams}}_callback); {{/performBeanValidation}} {{#performBeanValidation}} @@ -240,9 +245,7 @@ public class {{classname}} { parameterValues); if (violations.size() == 0) { - okhttp3.Call localVarCall = {{operationId}}Call({{#allParams}}{{paramName}}, {{/allParams}}_callback); - return localVarCall; - + return {{operationId}}Call({{#allParams}}{{paramName}}, {{/allParams}}_callback); } else { throw new BeanValidationException((Set) violations); } @@ -253,7 +256,6 @@ public class {{classname}} { e.printStackTrace(); throw new ApiException(e.getMessage()); } - {{/performBeanValidation}} } diff --git a/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/api/PingApi.java b/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/api/PingApi.java index 807f4f240ad0..72a4e7910c96 100644 --- a/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/api/PingApi.java +++ b/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/api/PingApi.java @@ -133,15 +133,12 @@ public class PingApi { @SuppressWarnings("rawtypes") private okhttp3.Call getPingValidateBeforeCall(Long petId, String name, String status, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'petId' is set if (petId == null) { throw new ApiException("Missing the required parameter 'petId' when calling getPing(Async)"); } - - okhttp3.Call localVarCall = getPingCall(petId, name, status, _callback); - return localVarCall; + return getPingCall(petId, name, status, _callback); } @@ -321,10 +318,7 @@ public class PingApi { @SuppressWarnings("rawtypes") private okhttp3.Call postPingValidateBeforeCall(SomeObj someObj, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = postPingCall(someObj, _callback); - return localVarCall; + return postPingCall(someObj, _callback); } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index 5125520afda4..59fedc2a3594 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -143,15 +143,12 @@ public class AnotherFakeApi { @SuppressWarnings("rawtypes") private okhttp3.Call call123testSpecialTagsValidateBeforeCall(Client body, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling call123testSpecialTags(Async)"); } - - okhttp3.Call localVarCall = call123testSpecialTagsCall(body, _callback); - return localVarCall; + return call123testSpecialTagsCall(body, _callback); } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/FakeApi.java index 48d54b5cd8bd..36dc208a26c4 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/FakeApi.java @@ -130,7 +130,6 @@ public class FakeApi { localVarPath = localVarApiClient.fillParametersFromOperation(operation, paramMap, localVarPath, localVarQueryParams, localVarCollectionQueryParams, localVarHeaderParams, localVarCookieParams); final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -138,7 +137,12 @@ public class FakeApi { } final String[] localVarContentTypes = { - "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" + "application/xml", + "application/xml; charset=utf-8", + "application/xml; charset=utf-16", + "text/xml", + "text/xml; charset=utf-8", + "text/xml; charset=utf-16" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -151,15 +155,12 @@ public class FakeApi { @SuppressWarnings("rawtypes") private okhttp3.Call createXmlItemValidateBeforeCall(XmlItem xmlItem, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'xmlItem' is set if (xmlItem == null) { throw new ApiException("Missing the required parameter 'xmlItem' when calling createXmlItem(Async)"); } - - okhttp3.Call localVarCall = createXmlItemCall(xmlItem, _callback); - return localVarCall; + return createXmlItemCall(xmlItem, _callback); } @@ -268,7 +269,6 @@ public class FakeApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -281,10 +281,7 @@ public class FakeApi { @SuppressWarnings("rawtypes") private okhttp3.Call fakeOuterBooleanSerializeValidateBeforeCall(Boolean body, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = fakeOuterBooleanSerializeCall(body, _callback); - return localVarCall; + return fakeOuterBooleanSerializeCall(body, _callback); } @@ -397,7 +394,6 @@ public class FakeApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -410,10 +406,7 @@ public class FakeApi { @SuppressWarnings("rawtypes") private okhttp3.Call fakeOuterCompositeSerializeValidateBeforeCall(OuterComposite body, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = fakeOuterCompositeSerializeCall(body, _callback); - return localVarCall; + return fakeOuterCompositeSerializeCall(body, _callback); } @@ -526,7 +519,6 @@ public class FakeApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -539,10 +531,7 @@ public class FakeApi { @SuppressWarnings("rawtypes") private okhttp3.Call fakeOuterNumberSerializeValidateBeforeCall(BigDecimal body, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = fakeOuterNumberSerializeCall(body, _callback); - return localVarCall; + return fakeOuterNumberSerializeCall(body, _callback); } @@ -655,7 +644,6 @@ public class FakeApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -668,10 +656,7 @@ public class FakeApi { @SuppressWarnings("rawtypes") private okhttp3.Call fakeOuterStringSerializeValidateBeforeCall(String body, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = fakeOuterStringSerializeCall(body, _callback); - return localVarCall; + return fakeOuterStringSerializeCall(body, _callback); } @@ -776,7 +761,6 @@ public class FakeApi { localVarPath = localVarApiClient.fillParametersFromOperation(operation, paramMap, localVarPath, localVarQueryParams, localVarCollectionQueryParams, localVarHeaderParams, localVarCookieParams); final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -797,15 +781,12 @@ public class FakeApi { @SuppressWarnings("rawtypes") private okhttp3.Call testBodyWithFileSchemaValidateBeforeCall(FileSchemaTestClass body, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling testBodyWithFileSchema(Async)"); } - - okhttp3.Call localVarCall = testBodyWithFileSchemaCall(body, _callback); - return localVarCall; + return testBodyWithFileSchemaCall(body, _callback); } @@ -908,7 +889,6 @@ public class FakeApi { localVarPath = localVarApiClient.fillParametersFromOperation(operation, paramMap, localVarPath, localVarQueryParams, localVarCollectionQueryParams, localVarHeaderParams, localVarCookieParams); final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -929,20 +909,17 @@ public class FakeApi { @SuppressWarnings("rawtypes") private okhttp3.Call testBodyWithQueryParamsValidateBeforeCall(String query, User body, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'query' is set if (query == null) { throw new ApiException("Missing the required parameter 'query' when calling testBodyWithQueryParams(Async)"); } - + // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling testBodyWithQueryParams(Async)"); } - - okhttp3.Call localVarCall = testBodyWithQueryParamsCall(query, body, _callback); - return localVarCall; + return testBodyWithQueryParamsCall(query, body, _callback); } @@ -1067,15 +1044,12 @@ public class FakeApi { @SuppressWarnings("rawtypes") private okhttp3.Call testClientModelValidateBeforeCall(Client body, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling testClientModel(Async)"); } - - okhttp3.Call localVarCall = testClientModelCall(body, _callback); - return localVarCall; + return testClientModelCall(body, _callback); } @@ -1250,7 +1224,6 @@ public class FakeApi { localVarPath = localVarApiClient.fillParametersFromOperation(operation, paramMap, localVarPath, localVarQueryParams, localVarCollectionQueryParams, localVarHeaderParams, localVarCookieParams); final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -1271,30 +1244,27 @@ public class FakeApi { @SuppressWarnings("rawtypes") private okhttp3.Call testEndpointParametersValidateBeforeCall(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'number' is set if (number == null) { throw new ApiException("Missing the required parameter 'number' when calling testEndpointParameters(Async)"); } - + // verify the required parameter '_double' is set if (_double == null) { throw new ApiException("Missing the required parameter '_double' when calling testEndpointParameters(Async)"); } - + // verify the required parameter 'patternWithoutDelimiter' is set if (patternWithoutDelimiter == null) { throw new ApiException("Missing the required parameter 'patternWithoutDelimiter' when calling testEndpointParameters(Async)"); } - + // verify the required parameter '_byte' is set if (_byte == null) { throw new ApiException("Missing the required parameter '_byte' when calling testEndpointParameters(Async)"); } - - okhttp3.Call localVarCall = testEndpointParametersCall(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback, _callback); - return localVarCall; + return testEndpointParametersCall(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback, _callback); } @@ -1459,7 +1429,6 @@ public class FakeApi { localVarPath = localVarApiClient.fillParametersFromOperation(operation, paramMap, localVarPath, localVarQueryParams, localVarCollectionQueryParams, localVarHeaderParams, localVarCookieParams); final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -1480,10 +1449,7 @@ public class FakeApi { @SuppressWarnings("rawtypes") private okhttp3.Call testEnumParametersValidateBeforeCall(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = testEnumParametersCall(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, _callback); - return localVarCall; + return testEnumParametersCall(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, _callback); } @@ -1602,7 +1568,6 @@ public class FakeApi { localVarPath = localVarApiClient.fillParametersFromOperation(operation, paramMap, localVarPath, localVarQueryParams, localVarCollectionQueryParams, localVarHeaderParams, localVarCookieParams); final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -1610,7 +1575,6 @@ public class FakeApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -1623,25 +1587,22 @@ public class FakeApi { @SuppressWarnings("rawtypes") private okhttp3.Call testGroupParametersValidateBeforeCall(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'requiredStringGroup' is set if (requiredStringGroup == null) { throw new ApiException("Missing the required parameter 'requiredStringGroup' when calling testGroupParameters(Async)"); } - + // verify the required parameter 'requiredBooleanGroup' is set if (requiredBooleanGroup == null) { throw new ApiException("Missing the required parameter 'requiredBooleanGroup' when calling testGroupParameters(Async)"); } - + // verify the required parameter 'requiredInt64Group' is set if (requiredInt64Group == null) { throw new ApiException("Missing the required parameter 'requiredInt64Group' when calling testGroupParameters(Async)"); } - - okhttp3.Call localVarCall = testGroupParametersCall(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, _callback); - return localVarCall; + return testGroupParametersCall(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, _callback); } @@ -1822,7 +1783,6 @@ public class FakeApi { localVarPath = localVarApiClient.fillParametersFromOperation(operation, paramMap, localVarPath, localVarQueryParams, localVarCollectionQueryParams, localVarHeaderParams, localVarCookieParams); final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -1843,15 +1803,12 @@ public class FakeApi { @SuppressWarnings("rawtypes") private okhttp3.Call testInlineAdditionalPropertiesValidateBeforeCall(Map param, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'param' is set if (param == null) { throw new ApiException("Missing the required parameter 'param' when calling testInlineAdditionalProperties(Async)"); } - - okhttp3.Call localVarCall = testInlineAdditionalPropertiesCall(param, _callback); - return localVarCall; + return testInlineAdditionalPropertiesCall(param, _callback); } @@ -1961,7 +1918,6 @@ public class FakeApi { localVarPath = localVarApiClient.fillParametersFromOperation(operation, paramMap, localVarPath, localVarQueryParams, localVarCollectionQueryParams, localVarHeaderParams, localVarCookieParams); final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -1982,20 +1938,17 @@ public class FakeApi { @SuppressWarnings("rawtypes") private okhttp3.Call testJsonFormDataValidateBeforeCall(String param, String param2, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'param' is set if (param == null) { throw new ApiException("Missing the required parameter 'param' when calling testJsonFormData(Async)"); } - + // verify the required parameter 'param2' is set if (param2 == null) { throw new ApiException("Missing the required parameter 'param2' when calling testJsonFormData(Async)"); } - - okhttp3.Call localVarCall = testJsonFormDataCall(param, param2, _callback); - return localVarCall; + return testJsonFormDataCall(param, param2, _callback); } @@ -2108,7 +2061,6 @@ public class FakeApi { localVarPath = localVarApiClient.fillParametersFromOperation(operation, paramMap, localVarPath, localVarQueryParams, localVarCollectionQueryParams, localVarHeaderParams, localVarCookieParams); final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -2116,7 +2068,6 @@ public class FakeApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -2129,35 +2080,32 @@ public class FakeApi { @SuppressWarnings("rawtypes") private okhttp3.Call testQueryParameterCollectionFormatValidateBeforeCall(List pipe, List ioutil, List http, List url, List context, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'pipe' is set if (pipe == null) { throw new ApiException("Missing the required parameter 'pipe' when calling testQueryParameterCollectionFormat(Async)"); } - + // verify the required parameter 'ioutil' is set if (ioutil == null) { throw new ApiException("Missing the required parameter 'ioutil' when calling testQueryParameterCollectionFormat(Async)"); } - + // verify the required parameter 'http' is set if (http == null) { throw new ApiException("Missing the required parameter 'http' when calling testQueryParameterCollectionFormat(Async)"); } - + // verify the required parameter 'url' is set if (url == null) { throw new ApiException("Missing the required parameter 'url' when calling testQueryParameterCollectionFormat(Async)"); } - + // verify the required parameter 'context' is set if (context == null) { throw new ApiException("Missing the required parameter 'context' when calling testQueryParameterCollectionFormat(Async)"); } - - okhttp3.Call localVarCall = testQueryParameterCollectionFormatCall(pipe, ioutil, http, url, context, _callback); - return localVarCall; + return testQueryParameterCollectionFormatCall(pipe, ioutil, http, url, context, _callback); } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index c7c5ed97a8c9..6d457492a9b5 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -143,15 +143,12 @@ public class FakeClassnameTags123Api { @SuppressWarnings("rawtypes") private okhttp3.Call testClassnameValidateBeforeCall(Client body, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling testClassname(Async)"); } - - okhttp3.Call localVarCall = testClassnameCall(body, _callback); - return localVarCall; + return testClassnameCall(body, _callback); } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/PetApi.java index 2346d1de707e..031970653d1e 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/PetApi.java @@ -126,7 +126,6 @@ public class PetApi { localVarPath = localVarApiClient.fillParametersFromOperation(operation, paramMap, localVarPath, localVarQueryParams, localVarCollectionQueryParams, localVarHeaderParams, localVarCookieParams); final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -134,7 +133,8 @@ public class PetApi { } final String[] localVarContentTypes = { - "application/json", "application/xml" + "application/json", + "application/xml" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -147,15 +147,12 @@ public class PetApi { @SuppressWarnings("rawtypes") private okhttp3.Call addPetValidateBeforeCall(Pet body, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling addPet(Async)"); } - - okhttp3.Call localVarCall = addPetCall(body, _callback); - return localVarCall; + return addPetCall(body, _callback); } @@ -263,7 +260,6 @@ public class PetApi { localVarPath = localVarApiClient.fillParametersFromOperation(operation, paramMap, localVarPath, localVarQueryParams, localVarCollectionQueryParams, localVarHeaderParams, localVarCookieParams); final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -271,7 +267,6 @@ public class PetApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -284,15 +279,12 @@ public class PetApi { @SuppressWarnings("rawtypes") private okhttp3.Call deletePetValidateBeforeCall(Long petId, String apiKey, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'petId' is set if (petId == null) { throw new ApiException("Missing the required parameter 'petId' when calling deletePet(Async)"); } - - okhttp3.Call localVarCall = deletePetCall(petId, apiKey, _callback); - return localVarCall; + return deletePetCall(petId, apiKey, _callback); } @@ -401,7 +393,8 @@ public class PetApi { localVarPath = localVarApiClient.fillParametersFromOperation(operation, paramMap, localVarPath, localVarQueryParams, localVarCollectionQueryParams, localVarHeaderParams, localVarCookieParams); final String[] localVarAccepts = { - "application/xml", "application/json" + "application/xml", + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -409,7 +402,6 @@ public class PetApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -422,15 +414,12 @@ public class PetApi { @SuppressWarnings("rawtypes") private okhttp3.Call findPetsByStatusValidateBeforeCall(List status, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'status' is set if (status == null) { throw new ApiException("Missing the required parameter 'status' when calling findPetsByStatus(Async)"); } - - okhttp3.Call localVarCall = findPetsByStatusCall(status, _callback); - return localVarCall; + return findPetsByStatusCall(status, _callback); } @@ -542,7 +531,8 @@ public class PetApi { localVarPath = localVarApiClient.fillParametersFromOperation(operation, paramMap, localVarPath, localVarQueryParams, localVarCollectionQueryParams, localVarHeaderParams, localVarCookieParams); final String[] localVarAccepts = { - "application/xml", "application/json" + "application/xml", + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -550,7 +540,6 @@ public class PetApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -564,15 +553,12 @@ public class PetApi { @Deprecated @SuppressWarnings("rawtypes") private okhttp3.Call findPetsByTagsValidateBeforeCall(Set tags, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'tags' is set if (tags == null) { throw new ApiException("Missing the required parameter 'tags' when calling findPetsByTags(Async)"); } - - okhttp3.Call localVarCall = findPetsByTagsCall(tags, _callback); - return localVarCall; + return findPetsByTagsCall(tags, _callback); } @@ -689,7 +675,8 @@ public class PetApi { localVarPath = localVarApiClient.fillParametersFromOperation(operation, paramMap, localVarPath, localVarQueryParams, localVarCollectionQueryParams, localVarHeaderParams, localVarCookieParams); final String[] localVarAccepts = { - "application/xml", "application/json" + "application/xml", + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -697,7 +684,6 @@ public class PetApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -710,15 +696,12 @@ public class PetApi { @SuppressWarnings("rawtypes") private okhttp3.Call getPetByIdValidateBeforeCall(Long petId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'petId' is set if (petId == null) { throw new ApiException("Missing the required parameter 'petId' when calling getPetById(Async)"); } - - okhttp3.Call localVarCall = getPetByIdCall(petId, _callback); - return localVarCall; + return getPetByIdCall(petId, _callback); } @@ -832,7 +815,6 @@ public class PetApi { localVarPath = localVarApiClient.fillParametersFromOperation(operation, paramMap, localVarPath, localVarQueryParams, localVarCollectionQueryParams, localVarHeaderParams, localVarCookieParams); final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -840,7 +822,8 @@ public class PetApi { } final String[] localVarContentTypes = { - "application/json", "application/xml" + "application/json", + "application/xml" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -853,15 +836,12 @@ public class PetApi { @SuppressWarnings("rawtypes") private okhttp3.Call updatePetValidateBeforeCall(Pet body, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling updatePet(Async)"); } - - okhttp3.Call localVarCall = updatePetCall(body, _callback); - return localVarCall; + return updatePetCall(body, _callback); } @@ -982,7 +962,6 @@ public class PetApi { localVarPath = localVarApiClient.fillParametersFromOperation(operation, paramMap, localVarPath, localVarQueryParams, localVarCollectionQueryParams, localVarHeaderParams, localVarCookieParams); final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -1003,15 +982,12 @@ public class PetApi { @SuppressWarnings("rawtypes") private okhttp3.Call updatePetWithFormValidateBeforeCall(Long petId, String name, String status, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'petId' is set if (petId == null) { throw new ApiException("Missing the required parameter 'petId' when calling updatePetWithForm(Async)"); } - - okhttp3.Call localVarCall = updatePetWithFormCall(petId, name, status, _callback); - return localVarCall; + return updatePetWithFormCall(petId, name, status, _callback); } @@ -1150,15 +1126,12 @@ public class PetApi { @SuppressWarnings("rawtypes") private okhttp3.Call uploadFileValidateBeforeCall(Long petId, String additionalMetadata, File _file, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'petId' is set if (petId == null) { throw new ApiException("Missing the required parameter 'petId' when calling uploadFile(Async)"); } - - okhttp3.Call localVarCall = uploadFileCall(petId, additionalMetadata, _file, _callback); - return localVarCall; + return uploadFileCall(petId, additionalMetadata, _file, _callback); } @@ -1301,20 +1274,17 @@ public class PetApi { @SuppressWarnings("rawtypes") private okhttp3.Call uploadFileWithRequiredFileValidateBeforeCall(Long petId, File requiredFile, String additionalMetadata, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'petId' is set if (petId == null) { throw new ApiException("Missing the required parameter 'petId' when calling uploadFileWithRequiredFile(Async)"); } - + // verify the required parameter 'requiredFile' is set if (requiredFile == null) { throw new ApiException("Missing the required parameter 'requiredFile' when calling uploadFileWithRequiredFile(Async)"); } - - okhttp3.Call localVarCall = uploadFileWithRequiredFileCall(petId, requiredFile, additionalMetadata, _callback); - return localVarCall; + return uploadFileWithRequiredFileCall(petId, requiredFile, additionalMetadata, _callback); } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/StoreApi.java index dea0a6e4aafb..e329b7008062 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/StoreApi.java @@ -124,7 +124,6 @@ public class StoreApi { localVarPath = localVarApiClient.fillParametersFromOperation(operation, paramMap, localVarPath, localVarQueryParams, localVarCollectionQueryParams, localVarHeaderParams, localVarCookieParams); final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -132,7 +131,6 @@ public class StoreApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -145,15 +143,12 @@ public class StoreApi { @SuppressWarnings("rawtypes") private okhttp3.Call deleteOrderValidateBeforeCall(String orderId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'orderId' is set if (orderId == null) { throw new ApiException("Missing the required parameter 'orderId' when calling deleteOrder(Async)"); } - - okhttp3.Call localVarCall = deleteOrderCall(orderId, _callback); - return localVarCall; + return deleteOrderCall(orderId, _callback); } @@ -264,7 +259,6 @@ public class StoreApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -277,10 +271,7 @@ public class StoreApi { @SuppressWarnings("rawtypes") private okhttp3.Call getInventoryValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = getInventoryCall(_callback); - return localVarCall; + return getInventoryCall(_callback); } @@ -385,7 +376,8 @@ public class StoreApi { localVarPath = localVarApiClient.fillParametersFromOperation(operation, paramMap, localVarPath, localVarQueryParams, localVarCollectionQueryParams, localVarHeaderParams, localVarCookieParams); final String[] localVarAccepts = { - "application/xml", "application/json" + "application/xml", + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -393,7 +385,6 @@ public class StoreApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -406,15 +397,12 @@ public class StoreApi { @SuppressWarnings("rawtypes") private okhttp3.Call getOrderByIdValidateBeforeCall(Long orderId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'orderId' is set if (orderId == null) { throw new ApiException("Missing the required parameter 'orderId' when calling getOrderById(Async)"); } - - okhttp3.Call localVarCall = getOrderByIdCall(orderId, _callback); - return localVarCall; + return getOrderByIdCall(orderId, _callback); } @@ -526,7 +514,8 @@ public class StoreApi { localVarPath = localVarApiClient.fillParametersFromOperation(operation, paramMap, localVarPath, localVarQueryParams, localVarCollectionQueryParams, localVarHeaderParams, localVarCookieParams); final String[] localVarAccepts = { - "application/xml", "application/json" + "application/xml", + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -534,7 +523,6 @@ public class StoreApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -547,15 +535,12 @@ public class StoreApi { @SuppressWarnings("rawtypes") private okhttp3.Call placeOrderValidateBeforeCall(Order body, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling placeOrder(Async)"); } - - okhttp3.Call localVarCall = placeOrderCall(body, _callback); - return localVarCall; + return placeOrderCall(body, _callback); } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/UserApi.java index cc6742339d5d..b9f0f5df534f 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/UserApi.java @@ -123,7 +123,6 @@ public class UserApi { localVarPath = localVarApiClient.fillParametersFromOperation(operation, paramMap, localVarPath, localVarQueryParams, localVarCollectionQueryParams, localVarHeaderParams, localVarCookieParams); final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -131,7 +130,6 @@ public class UserApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -144,15 +142,12 @@ public class UserApi { @SuppressWarnings("rawtypes") private okhttp3.Call createUserValidateBeforeCall(User body, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling createUser(Async)"); } - - okhttp3.Call localVarCall = createUserCall(body, _callback); - return localVarCall; + return createUserCall(body, _callback); } @@ -253,7 +248,6 @@ public class UserApi { localVarPath = localVarApiClient.fillParametersFromOperation(operation, paramMap, localVarPath, localVarQueryParams, localVarCollectionQueryParams, localVarHeaderParams, localVarCookieParams); final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -261,7 +255,6 @@ public class UserApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -274,15 +267,12 @@ public class UserApi { @SuppressWarnings("rawtypes") private okhttp3.Call createUsersWithArrayInputValidateBeforeCall(List body, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling createUsersWithArrayInput(Async)"); } - - okhttp3.Call localVarCall = createUsersWithArrayInputCall(body, _callback); - return localVarCall; + return createUsersWithArrayInputCall(body, _callback); } @@ -383,7 +373,6 @@ public class UserApi { localVarPath = localVarApiClient.fillParametersFromOperation(operation, paramMap, localVarPath, localVarQueryParams, localVarCollectionQueryParams, localVarHeaderParams, localVarCookieParams); final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -391,7 +380,6 @@ public class UserApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -404,15 +392,12 @@ public class UserApi { @SuppressWarnings("rawtypes") private okhttp3.Call createUsersWithListInputValidateBeforeCall(List body, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling createUsersWithListInput(Async)"); } - - okhttp3.Call localVarCall = createUsersWithListInputCall(body, _callback); - return localVarCall; + return createUsersWithListInputCall(body, _callback); } @@ -515,7 +500,6 @@ public class UserApi { localVarPath = localVarApiClient.fillParametersFromOperation(operation, paramMap, localVarPath, localVarQueryParams, localVarCollectionQueryParams, localVarHeaderParams, localVarCookieParams); final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -523,7 +507,6 @@ public class UserApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -536,15 +519,12 @@ public class UserApi { @SuppressWarnings("rawtypes") private okhttp3.Call deleteUserValidateBeforeCall(String username, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'username' is set if (username == null) { throw new ApiException("Missing the required parameter 'username' when calling deleteUser(Async)"); } - - okhttp3.Call localVarCall = deleteUserCall(username, _callback); - return localVarCall; + return deleteUserCall(username, _callback); } @@ -651,7 +631,8 @@ public class UserApi { localVarPath = localVarApiClient.fillParametersFromOperation(operation, paramMap, localVarPath, localVarQueryParams, localVarCollectionQueryParams, localVarHeaderParams, localVarCookieParams); final String[] localVarAccepts = { - "application/xml", "application/json" + "application/xml", + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -659,7 +640,6 @@ public class UserApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -672,15 +652,12 @@ public class UserApi { @SuppressWarnings("rawtypes") private okhttp3.Call getUserByNameValidateBeforeCall(String username, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'username' is set if (username == null) { throw new ApiException("Missing the required parameter 'username' when calling getUserByName(Async)"); } - - okhttp3.Call localVarCall = getUserByNameCall(username, _callback); - return localVarCall; + return getUserByNameCall(username, _callback); } @@ -795,7 +772,8 @@ public class UserApi { localVarPath = localVarApiClient.fillParametersFromOperation(operation, paramMap, localVarPath, localVarQueryParams, localVarCollectionQueryParams, localVarHeaderParams, localVarCookieParams); final String[] localVarAccepts = { - "application/xml", "application/json" + "application/xml", + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -803,7 +781,6 @@ public class UserApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -816,20 +793,17 @@ public class UserApi { @SuppressWarnings("rawtypes") private okhttp3.Call loginUserValidateBeforeCall(String username, String password, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'username' is set if (username == null) { throw new ApiException("Missing the required parameter 'username' when calling loginUser(Async)"); } - + // verify the required parameter 'password' is set if (password == null) { throw new ApiException("Missing the required parameter 'password' when calling loginUser(Async)"); } - - okhttp3.Call localVarCall = loginUserCall(username, password, _callback); - return localVarCall; + return loginUserCall(username, password, _callback); } @@ -939,7 +913,6 @@ public class UserApi { localVarPath = localVarApiClient.fillParametersFromOperation(operation, paramMap, localVarPath, localVarQueryParams, localVarCollectionQueryParams, localVarHeaderParams, localVarCookieParams); final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -947,7 +920,6 @@ public class UserApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -960,10 +932,7 @@ public class UserApi { @SuppressWarnings("rawtypes") private okhttp3.Call logoutUserValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = logoutUserCall(_callback); - return localVarCall; + return logoutUserCall(_callback); } @@ -1064,7 +1033,6 @@ public class UserApi { localVarPath = localVarApiClient.fillParametersFromOperation(operation, paramMap, localVarPath, localVarQueryParams, localVarCollectionQueryParams, localVarHeaderParams, localVarCookieParams); final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -1072,7 +1040,6 @@ public class UserApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -1085,20 +1052,17 @@ public class UserApi { @SuppressWarnings("rawtypes") private okhttp3.Call updateUserValidateBeforeCall(String username, User body, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'username' is set if (username == null) { throw new ApiException("Missing the required parameter 'username' when calling updateUser(Async)"); } - + // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling updateUser(Async)"); } - - okhttp3.Call localVarCall = updateUserCall(username, body, _callback); - return localVarCall; + return updateUserCall(username, body, _callback); } diff --git a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/api/PetApi.java index e557db0a5382..1e0a4d7b4796 100644 --- a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/api/PetApi.java @@ -101,7 +101,8 @@ public class PetApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "application/xml", "application/json" + "application/xml", + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -109,7 +110,8 @@ public class PetApi { } final String[] localVarContentTypes = { - "application/json", "application/xml" + "application/json", + "application/xml" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -122,15 +124,12 @@ public class PetApi { @SuppressWarnings("rawtypes") private okhttp3.Call addPetValidateBeforeCall(Pet pet, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'pet' is set if (pet == null) { throw new ApiException("Missing the required parameter 'pet' when calling addPet(Async)"); } - - okhttp3.Call localVarCall = addPetCall(pet, _callback); - return localVarCall; + return addPetCall(pet, _callback); } @@ -266,7 +265,6 @@ public class PetApi { } final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -274,7 +272,6 @@ public class PetApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -287,15 +284,12 @@ public class PetApi { @SuppressWarnings("rawtypes") private okhttp3.Call deletePetValidateBeforeCall(Long petId, String apiKey, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'petId' is set if (petId == null) { throw new ApiException("Missing the required parameter 'petId' when calling deletePet(Async)"); } - - okhttp3.Call localVarCall = deletePetCall(petId, apiKey, _callback); - return localVarCall; + return deletePetCall(petId, apiKey, _callback); } @@ -432,7 +426,8 @@ public class PetApi { } final String[] localVarAccepts = { - "application/xml", "application/json" + "application/xml", + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -440,7 +435,6 @@ public class PetApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -453,15 +447,12 @@ public class PetApi { @SuppressWarnings("rawtypes") private okhttp3.Call findPetsByStatusValidateBeforeCall(List status, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'status' is set if (status == null) { throw new ApiException("Missing the required parameter 'status' when calling findPetsByStatus(Async)"); } - - okhttp3.Call localVarCall = findPetsByStatusCall(status, _callback); - return localVarCall; + return findPetsByStatusCall(status, _callback); } @@ -596,7 +587,8 @@ public class PetApi { } final String[] localVarAccepts = { - "application/xml", "application/json" + "application/xml", + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -604,7 +596,6 @@ public class PetApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -618,15 +609,12 @@ public class PetApi { @Deprecated @SuppressWarnings("rawtypes") private okhttp3.Call findPetsByTagsValidateBeforeCall(List tags, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'tags' is set if (tags == null) { throw new ApiException("Missing the required parameter 'tags' when calling findPetsByTags(Async)"); } - - okhttp3.Call localVarCall = findPetsByTagsCall(tags, _callback); - return localVarCall; + return findPetsByTagsCall(tags, _callback); } @@ -768,7 +756,8 @@ public class PetApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "application/xml", "application/json" + "application/xml", + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -776,7 +765,6 @@ public class PetApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -789,15 +777,12 @@ public class PetApi { @SuppressWarnings("rawtypes") private okhttp3.Call getPetByIdValidateBeforeCall(Long petId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'petId' is set if (petId == null) { throw new ApiException("Missing the required parameter 'petId' when calling getPetById(Async)"); } - - okhttp3.Call localVarCall = getPetByIdCall(petId, _callback); - return localVarCall; + return getPetByIdCall(petId, _callback); } @@ -933,7 +918,8 @@ public class PetApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "application/xml", "application/json" + "application/xml", + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -941,7 +927,8 @@ public class PetApi { } final String[] localVarContentTypes = { - "application/json", "application/xml" + "application/json", + "application/xml" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -954,15 +941,12 @@ public class PetApi { @SuppressWarnings("rawtypes") private okhttp3.Call updatePetValidateBeforeCall(Pet pet, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'pet' is set if (pet == null) { throw new ApiException("Missing the required parameter 'pet' when calling updatePet(Async)"); } - - okhttp3.Call localVarCall = updatePetCall(pet, _callback); - return localVarCall; + return updatePetCall(pet, _callback); } @@ -1126,7 +1110,6 @@ public class PetApi { } final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -1147,15 +1130,12 @@ public class PetApi { @SuppressWarnings("rawtypes") private okhttp3.Call updatePetWithFormValidateBeforeCall(Long petId, String name, String status, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'petId' is set if (petId == null) { throw new ApiException("Missing the required parameter 'petId' when calling updatePetWithForm(Async)"); } - - okhttp3.Call localVarCall = updatePetWithFormCall(petId, name, status, _callback); - return localVarCall; + return updatePetWithFormCall(petId, name, status, _callback); } @@ -1272,15 +1252,12 @@ public class PetApi { @SuppressWarnings("rawtypes") private okhttp3.Call uploadFileValidateBeforeCall(Long petId, String additionalMetadata, File _file, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'petId' is set if (petId == null) { throw new ApiException("Missing the required parameter 'petId' when calling uploadFile(Async)"); } - - okhttp3.Call localVarCall = uploadFileCall(petId, additionalMetadata, _file, _callback); - return localVarCall; + return uploadFileCall(petId, additionalMetadata, _file, _callback); } diff --git a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Category.java index 61b79d5cc3a7..f1c2ab035881 100644 --- a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Category.java @@ -117,6 +117,10 @@ public class Category { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Category instance itself */ public Category putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -128,6 +132,8 @@ public class Category { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -135,6 +141,9 @@ public class Category { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 932dd65aec97..1eddb844b190 100644 --- a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -144,6 +144,10 @@ public class ModelApiResponse { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ModelApiResponse instance itself */ public ModelApiResponse putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -155,6 +159,8 @@ public class ModelApiResponse { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -162,6 +168,9 @@ public class ModelApiResponse { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Order.java index ec5b8144ac16..a88514fafee6 100644 --- a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Order.java @@ -275,6 +275,10 @@ public class Order { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Order instance itself */ public Order putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -286,6 +290,8 @@ public class Order { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -293,6 +299,9 @@ public class Order { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Pet.java index b067ea82560e..13f03b976f50 100644 --- a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Pet.java @@ -293,6 +293,10 @@ public class Pet { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Pet instance itself */ public Pet putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -304,6 +308,8 @@ public class Pet { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -311,6 +317,9 @@ public class Pet { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Tag.java index 073bcdc11e6b..29cf8fe79a15 100644 --- a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Tag.java @@ -117,6 +117,10 @@ public class Tag { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Tag instance itself */ public Tag putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -128,6 +132,8 @@ public class Tag { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -135,6 +141,9 @@ public class Tag { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/User.java index 721874fb01a8..726c838cf32d 100644 --- a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/User.java @@ -279,6 +279,10 @@ public class User { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the User instance itself */ public User putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -290,6 +294,8 @@ public class User { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -297,6 +303,9 @@ public class User { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index 0b95c9d75933..b9a463c411e0 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -132,15 +132,12 @@ public class AnotherFakeApi { @SuppressWarnings("rawtypes") private okhttp3.Call call123testSpecialTagsValidateBeforeCall(Client body, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling call123testSpecialTags(Async)"); } - - okhttp3.Call localVarCall = call123testSpecialTagsCall(body, _callback); - return localVarCall; + return call123testSpecialTagsCall(body, _callback); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeApi.java index 4e91e597d772..6dfe38809b7e 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeApi.java @@ -119,7 +119,6 @@ public class FakeApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -127,7 +126,12 @@ public class FakeApi { } final String[] localVarContentTypes = { - "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" + "application/xml", + "application/xml; charset=utf-8", + "application/xml; charset=utf-16", + "text/xml", + "text/xml; charset=utf-8", + "text/xml; charset=utf-16" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -140,15 +144,12 @@ public class FakeApi { @SuppressWarnings("rawtypes") private okhttp3.Call createXmlItemValidateBeforeCall(XmlItem xmlItem, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'xmlItem' is set if (xmlItem == null) { throw new ApiException("Missing the required parameter 'xmlItem' when calling createXmlItem(Async)"); } - - okhttp3.Call localVarCall = createXmlItemCall(xmlItem, _callback); - return localVarCall; + return createXmlItemCall(xmlItem, _callback); } @@ -249,7 +250,6 @@ public class FakeApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -262,10 +262,7 @@ public class FakeApi { @SuppressWarnings("rawtypes") private okhttp3.Call fakeOuterBooleanSerializeValidateBeforeCall(Boolean body, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = fakeOuterBooleanSerializeCall(body, _callback); - return localVarCall; + return fakeOuterBooleanSerializeCall(body, _callback); } @@ -370,7 +367,6 @@ public class FakeApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -383,10 +379,7 @@ public class FakeApi { @SuppressWarnings("rawtypes") private okhttp3.Call fakeOuterCompositeSerializeValidateBeforeCall(OuterComposite body, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = fakeOuterCompositeSerializeCall(body, _callback); - return localVarCall; + return fakeOuterCompositeSerializeCall(body, _callback); } @@ -491,7 +484,6 @@ public class FakeApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -504,10 +496,7 @@ public class FakeApi { @SuppressWarnings("rawtypes") private okhttp3.Call fakeOuterNumberSerializeValidateBeforeCall(BigDecimal body, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = fakeOuterNumberSerializeCall(body, _callback); - return localVarCall; + return fakeOuterNumberSerializeCall(body, _callback); } @@ -612,7 +601,6 @@ public class FakeApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -625,10 +613,7 @@ public class FakeApi { @SuppressWarnings("rawtypes") private okhttp3.Call fakeOuterStringSerializeValidateBeforeCall(String body, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = fakeOuterStringSerializeCall(body, _callback); - return localVarCall; + return fakeOuterStringSerializeCall(body, _callback); } @@ -725,7 +710,6 @@ public class FakeApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -746,15 +730,12 @@ public class FakeApi { @SuppressWarnings("rawtypes") private okhttp3.Call testBodyWithFileSchemaValidateBeforeCall(FileSchemaTestClass body, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling testBodyWithFileSchema(Async)"); } - - okhttp3.Call localVarCall = testBodyWithFileSchemaCall(body, _callback); - return localVarCall; + return testBodyWithFileSchemaCall(body, _callback); } @@ -852,7 +833,6 @@ public class FakeApi { } final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -873,20 +853,17 @@ public class FakeApi { @SuppressWarnings("rawtypes") private okhttp3.Call testBodyWithQueryParamsValidateBeforeCall(String query, User body, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'query' is set if (query == null) { throw new ApiException("Missing the required parameter 'query' when calling testBodyWithQueryParams(Async)"); } - + // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling testBodyWithQueryParams(Async)"); } - - okhttp3.Call localVarCall = testBodyWithQueryParamsCall(query, body, _callback); - return localVarCall; + return testBodyWithQueryParamsCall(query, body, _callback); } @@ -1003,15 +980,12 @@ public class FakeApi { @SuppressWarnings("rawtypes") private okhttp3.Call testClientModelValidateBeforeCall(Client body, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling testClientModel(Async)"); } - - okhttp3.Call localVarCall = testClientModelCall(body, _callback); - return localVarCall; + return testClientModelCall(body, _callback); } @@ -1178,7 +1152,6 @@ public class FakeApi { } final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -1199,30 +1172,27 @@ public class FakeApi { @SuppressWarnings("rawtypes") private okhttp3.Call testEndpointParametersValidateBeforeCall(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'number' is set if (number == null) { throw new ApiException("Missing the required parameter 'number' when calling testEndpointParameters(Async)"); } - + // verify the required parameter '_double' is set if (_double == null) { throw new ApiException("Missing the required parameter '_double' when calling testEndpointParameters(Async)"); } - + // verify the required parameter 'patternWithoutDelimiter' is set if (patternWithoutDelimiter == null) { throw new ApiException("Missing the required parameter 'patternWithoutDelimiter' when calling testEndpointParameters(Async)"); } - + // verify the required parameter '_byte' is set if (_byte == null) { throw new ApiException("Missing the required parameter '_byte' when calling testEndpointParameters(Async)"); } - - okhttp3.Call localVarCall = testEndpointParametersCall(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback, _callback); - return localVarCall; + return testEndpointParametersCall(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback, _callback); } @@ -1397,7 +1367,6 @@ public class FakeApi { } final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -1418,10 +1387,7 @@ public class FakeApi { @SuppressWarnings("rawtypes") private okhttp3.Call testEnumParametersValidateBeforeCall(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = testEnumParametersCall(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, _callback); - return localVarCall; + return testEnumParametersCall(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, _callback); } @@ -1550,7 +1516,6 @@ public class FakeApi { } final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -1558,7 +1523,6 @@ public class FakeApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -1571,25 +1535,22 @@ public class FakeApi { @SuppressWarnings("rawtypes") private okhttp3.Call testGroupParametersValidateBeforeCall(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'requiredStringGroup' is set if (requiredStringGroup == null) { throw new ApiException("Missing the required parameter 'requiredStringGroup' when calling testGroupParameters(Async)"); } - + // verify the required parameter 'requiredBooleanGroup' is set if (requiredBooleanGroup == null) { throw new ApiException("Missing the required parameter 'requiredBooleanGroup' when calling testGroupParameters(Async)"); } - + // verify the required parameter 'requiredInt64Group' is set if (requiredInt64Group == null) { throw new ApiException("Missing the required parameter 'requiredInt64Group' when calling testGroupParameters(Async)"); } - - okhttp3.Call localVarCall = testGroupParametersCall(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, _callback); - return localVarCall; + return testGroupParametersCall(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, _callback); } @@ -1762,7 +1723,6 @@ public class FakeApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -1783,15 +1743,12 @@ public class FakeApi { @SuppressWarnings("rawtypes") private okhttp3.Call testInlineAdditionalPropertiesValidateBeforeCall(Map param, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'param' is set if (param == null) { throw new ApiException("Missing the required parameter 'param' when calling testInlineAdditionalProperties(Async)"); } - - okhttp3.Call localVarCall = testInlineAdditionalPropertiesCall(param, _callback); - return localVarCall; + return testInlineAdditionalPropertiesCall(param, _callback); } @@ -1893,7 +1850,6 @@ public class FakeApi { } final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -1914,20 +1870,17 @@ public class FakeApi { @SuppressWarnings("rawtypes") private okhttp3.Call testJsonFormDataValidateBeforeCall(String param, String param2, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'param' is set if (param == null) { throw new ApiException("Missing the required parameter 'param' when calling testJsonFormData(Async)"); } - + // verify the required parameter 'param2' is set if (param2 == null) { throw new ApiException("Missing the required parameter 'param2' when calling testJsonFormData(Async)"); } - - okhttp3.Call localVarCall = testJsonFormDataCall(param, param2, _callback); - return localVarCall; + return testJsonFormDataCall(param, param2, _callback); } @@ -2047,7 +2000,6 @@ public class FakeApi { } final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -2055,7 +2007,6 @@ public class FakeApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -2068,35 +2019,32 @@ public class FakeApi { @SuppressWarnings("rawtypes") private okhttp3.Call testQueryParameterCollectionFormatValidateBeforeCall(List pipe, List ioutil, List http, List url, List context, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'pipe' is set if (pipe == null) { throw new ApiException("Missing the required parameter 'pipe' when calling testQueryParameterCollectionFormat(Async)"); } - + // verify the required parameter 'ioutil' is set if (ioutil == null) { throw new ApiException("Missing the required parameter 'ioutil' when calling testQueryParameterCollectionFormat(Async)"); } - + // verify the required parameter 'http' is set if (http == null) { throw new ApiException("Missing the required parameter 'http' when calling testQueryParameterCollectionFormat(Async)"); } - + // verify the required parameter 'url' is set if (url == null) { throw new ApiException("Missing the required parameter 'url' when calling testQueryParameterCollectionFormat(Async)"); } - + // verify the required parameter 'context' is set if (context == null) { throw new ApiException("Missing the required parameter 'context' when calling testQueryParameterCollectionFormat(Async)"); } - - okhttp3.Call localVarCall = testQueryParameterCollectionFormatCall(pipe, ioutil, http, url, context, _callback); - return localVarCall; + return testQueryParameterCollectionFormatCall(pipe, ioutil, http, url, context, _callback); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index f6eda4c553ca..8e5c1348477b 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -132,15 +132,12 @@ public class FakeClassnameTags123Api { @SuppressWarnings("rawtypes") private okhttp3.Call testClassnameValidateBeforeCall(Client body, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling testClassname(Async)"); } - - okhttp3.Call localVarCall = testClassnameCall(body, _callback); - return localVarCall; + return testClassnameCall(body, _callback); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/PetApi.java index 2ff99caaa34b..9cc3e4822110 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/PetApi.java @@ -115,7 +115,6 @@ public class PetApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -123,7 +122,8 @@ public class PetApi { } final String[] localVarContentTypes = { - "application/json", "application/xml" + "application/json", + "application/xml" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -136,15 +136,12 @@ public class PetApi { @SuppressWarnings("rawtypes") private okhttp3.Call addPetValidateBeforeCall(Pet body, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling addPet(Async)"); } - - okhttp3.Call localVarCall = addPetCall(body, _callback); - return localVarCall; + return addPetCall(body, _callback); } @@ -247,7 +244,6 @@ public class PetApi { } final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -255,7 +251,6 @@ public class PetApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -268,15 +263,12 @@ public class PetApi { @SuppressWarnings("rawtypes") private okhttp3.Call deletePetValidateBeforeCall(Long petId, String apiKey, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'petId' is set if (petId == null) { throw new ApiException("Missing the required parameter 'petId' when calling deletePet(Async)"); } - - okhttp3.Call localVarCall = deletePetCall(petId, apiKey, _callback); - return localVarCall; + return deletePetCall(petId, apiKey, _callback); } @@ -380,7 +372,8 @@ public class PetApi { } final String[] localVarAccepts = { - "application/xml", "application/json" + "application/xml", + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -388,7 +381,6 @@ public class PetApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -401,15 +393,12 @@ public class PetApi { @SuppressWarnings("rawtypes") private okhttp3.Call findPetsByStatusValidateBeforeCall(List status, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'status' is set if (status == null) { throw new ApiException("Missing the required parameter 'status' when calling findPetsByStatus(Async)"); } - - okhttp3.Call localVarCall = findPetsByStatusCall(status, _callback); - return localVarCall; + return findPetsByStatusCall(status, _callback); } @@ -516,7 +505,8 @@ public class PetApi { } final String[] localVarAccepts = { - "application/xml", "application/json" + "application/xml", + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -524,7 +514,6 @@ public class PetApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -538,15 +527,12 @@ public class PetApi { @Deprecated @SuppressWarnings("rawtypes") private okhttp3.Call findPetsByTagsValidateBeforeCall(Set tags, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'tags' is set if (tags == null) { throw new ApiException("Missing the required parameter 'tags' when calling findPetsByTags(Async)"); } - - okhttp3.Call localVarCall = findPetsByTagsCall(tags, _callback); - return localVarCall; + return findPetsByTagsCall(tags, _callback); } @@ -655,7 +641,8 @@ public class PetApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "application/xml", "application/json" + "application/xml", + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -663,7 +650,6 @@ public class PetApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -676,15 +662,12 @@ public class PetApi { @SuppressWarnings("rawtypes") private okhttp3.Call getPetByIdValidateBeforeCall(Long petId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'petId' is set if (petId == null) { throw new ApiException("Missing the required parameter 'petId' when calling getPetById(Async)"); } - - okhttp3.Call localVarCall = getPetByIdCall(petId, _callback); - return localVarCall; + return getPetByIdCall(petId, _callback); } @@ -790,7 +773,6 @@ public class PetApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -798,7 +780,8 @@ public class PetApi { } final String[] localVarContentTypes = { - "application/json", "application/xml" + "application/json", + "application/xml" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -811,15 +794,12 @@ public class PetApi { @SuppressWarnings("rawtypes") private okhttp3.Call updatePetValidateBeforeCall(Pet body, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling updatePet(Async)"); } - - okhttp3.Call localVarCall = updatePetCall(body, _callback); - return localVarCall; + return updatePetCall(body, _callback); } @@ -932,7 +912,6 @@ public class PetApi { } final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -953,15 +932,12 @@ public class PetApi { @SuppressWarnings("rawtypes") private okhttp3.Call updatePetWithFormValidateBeforeCall(Long petId, String name, String status, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'petId' is set if (petId == null) { throw new ApiException("Missing the required parameter 'petId' when calling updatePetWithForm(Async)"); } - - okhttp3.Call localVarCall = updatePetWithFormCall(petId, name, status, _callback); - return localVarCall; + return updatePetWithFormCall(petId, name, status, _callback); } @@ -1092,15 +1068,12 @@ public class PetApi { @SuppressWarnings("rawtypes") private okhttp3.Call uploadFileValidateBeforeCall(Long petId, String additionalMetadata, File _file, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'petId' is set if (petId == null) { throw new ApiException("Missing the required parameter 'petId' when calling uploadFile(Async)"); } - - okhttp3.Call localVarCall = uploadFileCall(petId, additionalMetadata, _file, _callback); - return localVarCall; + return uploadFileCall(petId, additionalMetadata, _file, _callback); } @@ -1235,20 +1208,17 @@ public class PetApi { @SuppressWarnings("rawtypes") private okhttp3.Call uploadFileWithRequiredFileValidateBeforeCall(Long petId, File requiredFile, String additionalMetadata, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'petId' is set if (petId == null) { throw new ApiException("Missing the required parameter 'petId' when calling uploadFileWithRequiredFile(Async)"); } - + // verify the required parameter 'requiredFile' is set if (requiredFile == null) { throw new ApiException("Missing the required parameter 'requiredFile' when calling uploadFileWithRequiredFile(Async)"); } - - okhttp3.Call localVarCall = uploadFileWithRequiredFileCall(petId, requiredFile, additionalMetadata, _callback); - return localVarCall; + return uploadFileWithRequiredFileCall(petId, requiredFile, additionalMetadata, _callback); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/StoreApi.java index 47e8795f6fa7..ac429922b6d4 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/StoreApi.java @@ -113,7 +113,6 @@ public class StoreApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -121,7 +120,6 @@ public class StoreApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -134,15 +132,12 @@ public class StoreApi { @SuppressWarnings("rawtypes") private okhttp3.Call deleteOrderValidateBeforeCall(String orderId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'orderId' is set if (orderId == null) { throw new ApiException("Missing the required parameter 'orderId' when calling deleteOrder(Async)"); } - - okhttp3.Call localVarCall = deleteOrderCall(orderId, _callback); - return localVarCall; + return deleteOrderCall(orderId, _callback); } @@ -245,7 +240,6 @@ public class StoreApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -258,10 +252,7 @@ public class StoreApi { @SuppressWarnings("rawtypes") private okhttp3.Call getInventoryValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = getInventoryCall(_callback); - return localVarCall; + return getInventoryCall(_callback); } @@ -358,7 +349,8 @@ public class StoreApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "application/xml", "application/json" + "application/xml", + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -366,7 +358,6 @@ public class StoreApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -379,15 +370,12 @@ public class StoreApi { @SuppressWarnings("rawtypes") private okhttp3.Call getOrderByIdValidateBeforeCall(Long orderId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'orderId' is set if (orderId == null) { throw new ApiException("Missing the required parameter 'orderId' when calling getOrderById(Async)"); } - - okhttp3.Call localVarCall = getOrderByIdCall(orderId, _callback); - return localVarCall; + return getOrderByIdCall(orderId, _callback); } @@ -491,7 +479,8 @@ public class StoreApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "application/xml", "application/json" + "application/xml", + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -499,7 +488,6 @@ public class StoreApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -512,15 +500,12 @@ public class StoreApi { @SuppressWarnings("rawtypes") private okhttp3.Call placeOrderValidateBeforeCall(Order body, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling placeOrder(Async)"); } - - okhttp3.Call localVarCall = placeOrderCall(body, _callback); - return localVarCall; + return placeOrderCall(body, _callback); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/UserApi.java index 631463d49537..8827ee271490 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/UserApi.java @@ -112,7 +112,6 @@ public class UserApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -120,7 +119,6 @@ public class UserApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -133,15 +131,12 @@ public class UserApi { @SuppressWarnings("rawtypes") private okhttp3.Call createUserValidateBeforeCall(User body, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling createUser(Async)"); } - - okhttp3.Call localVarCall = createUserCall(body, _callback); - return localVarCall; + return createUserCall(body, _callback); } @@ -234,7 +229,6 @@ public class UserApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -242,7 +236,6 @@ public class UserApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -255,15 +248,12 @@ public class UserApi { @SuppressWarnings("rawtypes") private okhttp3.Call createUsersWithArrayInputValidateBeforeCall(List body, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling createUsersWithArrayInput(Async)"); } - - okhttp3.Call localVarCall = createUsersWithArrayInputCall(body, _callback); - return localVarCall; + return createUsersWithArrayInputCall(body, _callback); } @@ -356,7 +346,6 @@ public class UserApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -364,7 +353,6 @@ public class UserApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -377,15 +365,12 @@ public class UserApi { @SuppressWarnings("rawtypes") private okhttp3.Call createUsersWithListInputValidateBeforeCall(List body, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling createUsersWithListInput(Async)"); } - - okhttp3.Call localVarCall = createUsersWithListInputCall(body, _callback); - return localVarCall; + return createUsersWithListInputCall(body, _callback); } @@ -480,7 +465,6 @@ public class UserApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -488,7 +472,6 @@ public class UserApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -501,15 +484,12 @@ public class UserApi { @SuppressWarnings("rawtypes") private okhttp3.Call deleteUserValidateBeforeCall(String username, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'username' is set if (username == null) { throw new ApiException("Missing the required parameter 'username' when calling deleteUser(Async)"); } - - okhttp3.Call localVarCall = deleteUserCall(username, _callback); - return localVarCall; + return deleteUserCall(username, _callback); } @@ -608,7 +588,8 @@ public class UserApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "application/xml", "application/json" + "application/xml", + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -616,7 +597,6 @@ public class UserApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -629,15 +609,12 @@ public class UserApi { @SuppressWarnings("rawtypes") private okhttp3.Call getUserByNameValidateBeforeCall(String username, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'username' is set if (username == null) { throw new ApiException("Missing the required parameter 'username' when calling getUserByName(Async)"); } - - okhttp3.Call localVarCall = getUserByNameCall(username, _callback); - return localVarCall; + return getUserByNameCall(username, _callback); } @@ -750,7 +727,8 @@ public class UserApi { } final String[] localVarAccepts = { - "application/xml", "application/json" + "application/xml", + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -758,7 +736,6 @@ public class UserApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -771,20 +748,17 @@ public class UserApi { @SuppressWarnings("rawtypes") private okhttp3.Call loginUserValidateBeforeCall(String username, String password, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'username' is set if (username == null) { throw new ApiException("Missing the required parameter 'username' when calling loginUser(Async)"); } - + // verify the required parameter 'password' is set if (password == null) { throw new ApiException("Missing the required parameter 'password' when calling loginUser(Async)"); } - - okhttp3.Call localVarCall = loginUserCall(username, password, _callback); - return localVarCall; + return loginUserCall(username, password, _callback); } @@ -886,7 +860,6 @@ public class UserApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -894,7 +867,6 @@ public class UserApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -907,10 +879,7 @@ public class UserApi { @SuppressWarnings("rawtypes") private okhttp3.Call logoutUserValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = logoutUserCall(_callback); - return localVarCall; + return logoutUserCall(_callback); } @@ -1003,7 +972,6 @@ public class UserApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -1011,7 +979,6 @@ public class UserApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -1024,20 +991,17 @@ public class UserApi { @SuppressWarnings("rawtypes") private okhttp3.Call updateUserValidateBeforeCall(String username, User body, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'username' is set if (username == null) { throw new ApiException("Missing the required parameter 'username' when calling updateUser(Async)"); } - + // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling updateUser(Async)"); } - - okhttp3.Call localVarCall = updateUserCall(username, body, _callback); - return localVarCall; + return updateUserCall(username, body, _callback); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index f38e4499a618..dd20623d4b2d 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -132,15 +132,12 @@ public class AnotherFakeApi { @SuppressWarnings("rawtypes") private okhttp3.Call call123testSpecialTagsValidateBeforeCall(Client client, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'client' is set if (client == null) { throw new ApiException("Missing the required parameter 'client' when calling call123testSpecialTags(Async)"); } - - okhttp3.Call localVarCall = call123testSpecialTagsCall(client, _callback); - return localVarCall; + return call123testSpecialTagsCall(client, _callback); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/DefaultApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/DefaultApi.java index c7f201d8b653..ee3f7324613f 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/DefaultApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/DefaultApi.java @@ -118,7 +118,6 @@ public class DefaultApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -131,10 +130,7 @@ public class DefaultApi { @SuppressWarnings("rawtypes") private okhttp3.Call fooGetValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = fooGetCall(_callback); - return localVarCall; + return fooGetCall(_callback); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeApi.java index 0452a3a613d3..99ad929095d9 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeApi.java @@ -127,7 +127,6 @@ public class FakeApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -140,10 +139,7 @@ public class FakeApi { @SuppressWarnings("rawtypes") private okhttp3.Call fakeHealthGetValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = fakeHealthGetCall(_callback); - return localVarCall; + return fakeHealthGetCall(_callback); } @@ -258,10 +254,7 @@ public class FakeApi { @SuppressWarnings("rawtypes") private okhttp3.Call fakeOuterBooleanSerializeValidateBeforeCall(Boolean body, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = fakeOuterBooleanSerializeCall(body, _callback); - return localVarCall; + return fakeOuterBooleanSerializeCall(body, _callback); } @@ -379,10 +372,7 @@ public class FakeApi { @SuppressWarnings("rawtypes") private okhttp3.Call fakeOuterCompositeSerializeValidateBeforeCall(OuterComposite outerComposite, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = fakeOuterCompositeSerializeCall(outerComposite, _callback); - return localVarCall; + return fakeOuterCompositeSerializeCall(outerComposite, _callback); } @@ -500,10 +490,7 @@ public class FakeApi { @SuppressWarnings("rawtypes") private okhttp3.Call fakeOuterNumberSerializeValidateBeforeCall(BigDecimal body, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = fakeOuterNumberSerializeCall(body, _callback); - return localVarCall; + return fakeOuterNumberSerializeCall(body, _callback); } @@ -621,10 +608,7 @@ public class FakeApi { @SuppressWarnings("rawtypes") private okhttp3.Call fakeOuterStringSerializeValidateBeforeCall(String body, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = fakeOuterStringSerializeCall(body, _callback); - return localVarCall; + return fakeOuterStringSerializeCall(body, _callback); } @@ -728,7 +712,6 @@ public class FakeApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -741,10 +724,7 @@ public class FakeApi { @SuppressWarnings("rawtypes") private okhttp3.Call getArrayOfEnumsValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = getArrayOfEnumsCall(_callback); - return localVarCall; + return getArrayOfEnumsCall(_callback); } @@ -838,7 +818,6 @@ public class FakeApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -859,15 +838,12 @@ public class FakeApi { @SuppressWarnings("rawtypes") private okhttp3.Call testBodyWithFileSchemaValidateBeforeCall(FileSchemaTestClass fileSchemaTestClass, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'fileSchemaTestClass' is set if (fileSchemaTestClass == null) { throw new ApiException("Missing the required parameter 'fileSchemaTestClass' when calling testBodyWithFileSchema(Async)"); } - - okhttp3.Call localVarCall = testBodyWithFileSchemaCall(fileSchemaTestClass, _callback); - return localVarCall; + return testBodyWithFileSchemaCall(fileSchemaTestClass, _callback); } @@ -965,7 +941,6 @@ public class FakeApi { } final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -986,20 +961,17 @@ public class FakeApi { @SuppressWarnings("rawtypes") private okhttp3.Call testBodyWithQueryParamsValidateBeforeCall(String query, User user, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'query' is set if (query == null) { throw new ApiException("Missing the required parameter 'query' when calling testBodyWithQueryParams(Async)"); } - + // verify the required parameter 'user' is set if (user == null) { throw new ApiException("Missing the required parameter 'user' when calling testBodyWithQueryParams(Async)"); } - - okhttp3.Call localVarCall = testBodyWithQueryParamsCall(query, user, _callback); - return localVarCall; + return testBodyWithQueryParamsCall(query, user, _callback); } @@ -1116,15 +1088,12 @@ public class FakeApi { @SuppressWarnings("rawtypes") private okhttp3.Call testClientModelValidateBeforeCall(Client client, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'client' is set if (client == null) { throw new ApiException("Missing the required parameter 'client' when calling testClientModel(Async)"); } - - okhttp3.Call localVarCall = testClientModelCall(client, _callback); - return localVarCall; + return testClientModelCall(client, _callback); } @@ -1291,7 +1260,6 @@ public class FakeApi { } final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -1312,30 +1280,27 @@ public class FakeApi { @SuppressWarnings("rawtypes") private okhttp3.Call testEndpointParametersValidateBeforeCall(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'number' is set if (number == null) { throw new ApiException("Missing the required parameter 'number' when calling testEndpointParameters(Async)"); } - + // verify the required parameter '_double' is set if (_double == null) { throw new ApiException("Missing the required parameter '_double' when calling testEndpointParameters(Async)"); } - + // verify the required parameter 'patternWithoutDelimiter' is set if (patternWithoutDelimiter == null) { throw new ApiException("Missing the required parameter 'patternWithoutDelimiter' when calling testEndpointParameters(Async)"); } - + // verify the required parameter '_byte' is set if (_byte == null) { throw new ApiException("Missing the required parameter '_byte' when calling testEndpointParameters(Async)"); } - - okhttp3.Call localVarCall = testEndpointParametersCall(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback, _callback); - return localVarCall; + return testEndpointParametersCall(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback, _callback); } @@ -1510,7 +1475,6 @@ public class FakeApi { } final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -1531,10 +1495,7 @@ public class FakeApi { @SuppressWarnings("rawtypes") private okhttp3.Call testEnumParametersValidateBeforeCall(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = testEnumParametersCall(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, _callback); - return localVarCall; + return testEnumParametersCall(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, _callback); } @@ -1663,7 +1624,6 @@ public class FakeApi { } final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -1671,7 +1631,6 @@ public class FakeApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -1684,25 +1643,22 @@ public class FakeApi { @SuppressWarnings("rawtypes") private okhttp3.Call testGroupParametersValidateBeforeCall(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'requiredStringGroup' is set if (requiredStringGroup == null) { throw new ApiException("Missing the required parameter 'requiredStringGroup' when calling testGroupParameters(Async)"); } - + // verify the required parameter 'requiredBooleanGroup' is set if (requiredBooleanGroup == null) { throw new ApiException("Missing the required parameter 'requiredBooleanGroup' when calling testGroupParameters(Async)"); } - + // verify the required parameter 'requiredInt64Group' is set if (requiredInt64Group == null) { throw new ApiException("Missing the required parameter 'requiredInt64Group' when calling testGroupParameters(Async)"); } - - okhttp3.Call localVarCall = testGroupParametersCall(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, _callback); - return localVarCall; + return testGroupParametersCall(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, _callback); } @@ -1875,7 +1831,6 @@ public class FakeApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -1896,15 +1851,12 @@ public class FakeApi { @SuppressWarnings("rawtypes") private okhttp3.Call testInlineAdditionalPropertiesValidateBeforeCall(Map requestBody, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'requestBody' is set if (requestBody == null) { throw new ApiException("Missing the required parameter 'requestBody' when calling testInlineAdditionalProperties(Async)"); } - - okhttp3.Call localVarCall = testInlineAdditionalPropertiesCall(requestBody, _callback); - return localVarCall; + return testInlineAdditionalPropertiesCall(requestBody, _callback); } @@ -2006,7 +1958,6 @@ public class FakeApi { } final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -2027,20 +1978,17 @@ public class FakeApi { @SuppressWarnings("rawtypes") private okhttp3.Call testJsonFormDataValidateBeforeCall(String param, String param2, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'param' is set if (param == null) { throw new ApiException("Missing the required parameter 'param' when calling testJsonFormData(Async)"); } - + // verify the required parameter 'param2' is set if (param2 == null) { throw new ApiException("Missing the required parameter 'param2' when calling testJsonFormData(Async)"); } - - okhttp3.Call localVarCall = testJsonFormDataCall(param, param2, _callback); - return localVarCall; + return testJsonFormDataCall(param, param2, _callback); } @@ -2160,7 +2108,6 @@ public class FakeApi { } final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -2168,7 +2115,6 @@ public class FakeApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -2181,35 +2127,32 @@ public class FakeApi { @SuppressWarnings("rawtypes") private okhttp3.Call testQueryParameterCollectionFormatValidateBeforeCall(List pipe, List ioutil, List http, List url, List context, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'pipe' is set if (pipe == null) { throw new ApiException("Missing the required parameter 'pipe' when calling testQueryParameterCollectionFormat(Async)"); } - + // verify the required parameter 'ioutil' is set if (ioutil == null) { throw new ApiException("Missing the required parameter 'ioutil' when calling testQueryParameterCollectionFormat(Async)"); } - + // verify the required parameter 'http' is set if (http == null) { throw new ApiException("Missing the required parameter 'http' when calling testQueryParameterCollectionFormat(Async)"); } - + // verify the required parameter 'url' is set if (url == null) { throw new ApiException("Missing the required parameter 'url' when calling testQueryParameterCollectionFormat(Async)"); } - + // verify the required parameter 'context' is set if (context == null) { throw new ApiException("Missing the required parameter 'context' when calling testQueryParameterCollectionFormat(Async)"); } - - okhttp3.Call localVarCall = testQueryParameterCollectionFormatCall(pipe, ioutil, http, url, context, _callback); - return localVarCall; + return testQueryParameterCollectionFormatCall(pipe, ioutil, http, url, context, _callback); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index 0437e89e5c4b..bf49324d4161 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -132,15 +132,12 @@ public class FakeClassnameTags123Api { @SuppressWarnings("rawtypes") private okhttp3.Call testClassnameValidateBeforeCall(Client client, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'client' is set if (client == null) { throw new ApiException("Missing the required parameter 'client' when calling testClassname(Async)"); } - - okhttp3.Call localVarCall = testClassnameCall(client, _callback); - return localVarCall; + return testClassnameCall(client, _callback); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/PetApi.java index d99191cd5d45..5b6191cd4dca 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/PetApi.java @@ -113,7 +113,6 @@ public class PetApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -121,7 +120,8 @@ public class PetApi { } final String[] localVarContentTypes = { - "application/json", "application/xml" + "application/json", + "application/xml" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -134,15 +134,12 @@ public class PetApi { @SuppressWarnings("rawtypes") private okhttp3.Call addPetValidateBeforeCall(Pet pet, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'pet' is set if (pet == null) { throw new ApiException("Missing the required parameter 'pet' when calling addPet(Async)"); } - - okhttp3.Call localVarCall = addPetCall(pet, _callback); - return localVarCall; + return addPetCall(pet, _callback); } @@ -241,7 +238,6 @@ public class PetApi { } final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -249,7 +245,6 @@ public class PetApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -262,15 +257,12 @@ public class PetApi { @SuppressWarnings("rawtypes") private okhttp3.Call deletePetValidateBeforeCall(Long petId, String apiKey, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'petId' is set if (petId == null) { throw new ApiException("Missing the required parameter 'petId' when calling deletePet(Async)"); } - - okhttp3.Call localVarCall = deletePetCall(petId, apiKey, _callback); - return localVarCall; + return deletePetCall(petId, apiKey, _callback); } @@ -371,7 +363,8 @@ public class PetApi { } final String[] localVarAccepts = { - "application/xml", "application/json" + "application/xml", + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -379,7 +372,6 @@ public class PetApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -392,15 +384,12 @@ public class PetApi { @SuppressWarnings("rawtypes") private okhttp3.Call findPetsByStatusValidateBeforeCall(List status, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'status' is set if (status == null) { throw new ApiException("Missing the required parameter 'status' when calling findPetsByStatus(Async)"); } - - okhttp3.Call localVarCall = findPetsByStatusCall(status, _callback); - return localVarCall; + return findPetsByStatusCall(status, _callback); } @@ -507,7 +496,8 @@ public class PetApi { } final String[] localVarAccepts = { - "application/xml", "application/json" + "application/xml", + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -515,7 +505,6 @@ public class PetApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -529,15 +518,12 @@ public class PetApi { @Deprecated @SuppressWarnings("rawtypes") private okhttp3.Call findPetsByTagsValidateBeforeCall(List tags, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'tags' is set if (tags == null) { throw new ApiException("Missing the required parameter 'tags' when calling findPetsByTags(Async)"); } - - okhttp3.Call localVarCall = findPetsByTagsCall(tags, _callback); - return localVarCall; + return findPetsByTagsCall(tags, _callback); } @@ -646,7 +632,8 @@ public class PetApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "application/xml", "application/json" + "application/xml", + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -654,7 +641,6 @@ public class PetApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -667,15 +653,12 @@ public class PetApi { @SuppressWarnings("rawtypes") private okhttp3.Call getPetByIdValidateBeforeCall(Long petId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'petId' is set if (petId == null) { throw new ApiException("Missing the required parameter 'petId' when calling getPetById(Async)"); } - - okhttp3.Call localVarCall = getPetByIdCall(petId, _callback); - return localVarCall; + return getPetByIdCall(petId, _callback); } @@ -780,7 +763,6 @@ public class PetApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -788,7 +770,8 @@ public class PetApi { } final String[] localVarContentTypes = { - "application/json", "application/xml" + "application/json", + "application/xml" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -801,15 +784,12 @@ public class PetApi { @SuppressWarnings("rawtypes") private okhttp3.Call updatePetValidateBeforeCall(Pet pet, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'pet' is set if (pet == null) { throw new ApiException("Missing the required parameter 'pet' when calling updatePet(Async)"); } - - okhttp3.Call localVarCall = updatePetCall(pet, _callback); - return localVarCall; + return updatePetCall(pet, _callback); } @@ -919,7 +899,6 @@ public class PetApi { } final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -940,15 +919,12 @@ public class PetApi { @SuppressWarnings("rawtypes") private okhttp3.Call updatePetWithFormValidateBeforeCall(Long petId, String name, String status, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'petId' is set if (petId == null) { throw new ApiException("Missing the required parameter 'petId' when calling updatePetWithForm(Async)"); } - - okhttp3.Call localVarCall = updatePetWithFormCall(petId, name, status, _callback); - return localVarCall; + return updatePetWithFormCall(petId, name, status, _callback); } @@ -1079,15 +1055,12 @@ public class PetApi { @SuppressWarnings("rawtypes") private okhttp3.Call uploadFileValidateBeforeCall(Long petId, String additionalMetadata, File _file, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'petId' is set if (petId == null) { throw new ApiException("Missing the required parameter 'petId' when calling uploadFile(Async)"); } - - okhttp3.Call localVarCall = uploadFileCall(petId, additionalMetadata, _file, _callback); - return localVarCall; + return uploadFileCall(petId, additionalMetadata, _file, _callback); } @@ -1222,20 +1195,17 @@ public class PetApi { @SuppressWarnings("rawtypes") private okhttp3.Call uploadFileWithRequiredFileValidateBeforeCall(Long petId, File requiredFile, String additionalMetadata, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'petId' is set if (petId == null) { throw new ApiException("Missing the required parameter 'petId' when calling uploadFileWithRequiredFile(Async)"); } - + // verify the required parameter 'requiredFile' is set if (requiredFile == null) { throw new ApiException("Missing the required parameter 'requiredFile' when calling uploadFileWithRequiredFile(Async)"); } - - okhttp3.Call localVarCall = uploadFileWithRequiredFileCall(petId, requiredFile, additionalMetadata, _callback); - return localVarCall; + return uploadFileWithRequiredFileCall(petId, requiredFile, additionalMetadata, _callback); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/StoreApi.java index a28d0783b1f1..6069ecfb8c5f 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/StoreApi.java @@ -113,7 +113,6 @@ public class StoreApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -121,7 +120,6 @@ public class StoreApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -134,15 +132,12 @@ public class StoreApi { @SuppressWarnings("rawtypes") private okhttp3.Call deleteOrderValidateBeforeCall(String orderId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'orderId' is set if (orderId == null) { throw new ApiException("Missing the required parameter 'orderId' when calling deleteOrder(Async)"); } - - okhttp3.Call localVarCall = deleteOrderCall(orderId, _callback); - return localVarCall; + return deleteOrderCall(orderId, _callback); } @@ -245,7 +240,6 @@ public class StoreApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -258,10 +252,7 @@ public class StoreApi { @SuppressWarnings("rawtypes") private okhttp3.Call getInventoryValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = getInventoryCall(_callback); - return localVarCall; + return getInventoryCall(_callback); } @@ -358,7 +349,8 @@ public class StoreApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "application/xml", "application/json" + "application/xml", + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -366,7 +358,6 @@ public class StoreApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -379,15 +370,12 @@ public class StoreApi { @SuppressWarnings("rawtypes") private okhttp3.Call getOrderByIdValidateBeforeCall(Long orderId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'orderId' is set if (orderId == null) { throw new ApiException("Missing the required parameter 'orderId' when calling getOrderById(Async)"); } - - okhttp3.Call localVarCall = getOrderByIdCall(orderId, _callback); - return localVarCall; + return getOrderByIdCall(orderId, _callback); } @@ -491,7 +479,8 @@ public class StoreApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "application/xml", "application/json" + "application/xml", + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -512,15 +501,12 @@ public class StoreApi { @SuppressWarnings("rawtypes") private okhttp3.Call placeOrderValidateBeforeCall(Order order, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'order' is set if (order == null) { throw new ApiException("Missing the required parameter 'order' when calling placeOrder(Async)"); } - - okhttp3.Call localVarCall = placeOrderCall(order, _callback); - return localVarCall; + return placeOrderCall(order, _callback); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/UserApi.java index 9683fcf087c9..3398667afb16 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/UserApi.java @@ -112,7 +112,6 @@ public class UserApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -133,15 +132,12 @@ public class UserApi { @SuppressWarnings("rawtypes") private okhttp3.Call createUserValidateBeforeCall(User user, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'user' is set if (user == null) { throw new ApiException("Missing the required parameter 'user' when calling createUser(Async)"); } - - okhttp3.Call localVarCall = createUserCall(user, _callback); - return localVarCall; + return createUserCall(user, _callback); } @@ -234,7 +230,6 @@ public class UserApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -255,15 +250,12 @@ public class UserApi { @SuppressWarnings("rawtypes") private okhttp3.Call createUsersWithArrayInputValidateBeforeCall(List user, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'user' is set if (user == null) { throw new ApiException("Missing the required parameter 'user' when calling createUsersWithArrayInput(Async)"); } - - okhttp3.Call localVarCall = createUsersWithArrayInputCall(user, _callback); - return localVarCall; + return createUsersWithArrayInputCall(user, _callback); } @@ -356,7 +348,6 @@ public class UserApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -377,15 +368,12 @@ public class UserApi { @SuppressWarnings("rawtypes") private okhttp3.Call createUsersWithListInputValidateBeforeCall(List user, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'user' is set if (user == null) { throw new ApiException("Missing the required parameter 'user' when calling createUsersWithListInput(Async)"); } - - okhttp3.Call localVarCall = createUsersWithListInputCall(user, _callback); - return localVarCall; + return createUsersWithListInputCall(user, _callback); } @@ -480,7 +468,6 @@ public class UserApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -488,7 +475,6 @@ public class UserApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -501,15 +487,12 @@ public class UserApi { @SuppressWarnings("rawtypes") private okhttp3.Call deleteUserValidateBeforeCall(String username, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'username' is set if (username == null) { throw new ApiException("Missing the required parameter 'username' when calling deleteUser(Async)"); } - - okhttp3.Call localVarCall = deleteUserCall(username, _callback); - return localVarCall; + return deleteUserCall(username, _callback); } @@ -608,7 +591,8 @@ public class UserApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "application/xml", "application/json" + "application/xml", + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -616,7 +600,6 @@ public class UserApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -629,15 +612,12 @@ public class UserApi { @SuppressWarnings("rawtypes") private okhttp3.Call getUserByNameValidateBeforeCall(String username, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'username' is set if (username == null) { throw new ApiException("Missing the required parameter 'username' when calling getUserByName(Async)"); } - - okhttp3.Call localVarCall = getUserByNameCall(username, _callback); - return localVarCall; + return getUserByNameCall(username, _callback); } @@ -750,7 +730,8 @@ public class UserApi { } final String[] localVarAccepts = { - "application/xml", "application/json" + "application/xml", + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -758,7 +739,6 @@ public class UserApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -771,20 +751,17 @@ public class UserApi { @SuppressWarnings("rawtypes") private okhttp3.Call loginUserValidateBeforeCall(String username, String password, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'username' is set if (username == null) { throw new ApiException("Missing the required parameter 'username' when calling loginUser(Async)"); } - + // verify the required parameter 'password' is set if (password == null) { throw new ApiException("Missing the required parameter 'password' when calling loginUser(Async)"); } - - okhttp3.Call localVarCall = loginUserCall(username, password, _callback); - return localVarCall; + return loginUserCall(username, password, _callback); } @@ -886,7 +863,6 @@ public class UserApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -894,7 +870,6 @@ public class UserApi { } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -907,10 +882,7 @@ public class UserApi { @SuppressWarnings("rawtypes") private okhttp3.Call logoutUserValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = logoutUserCall(_callback); - return localVarCall; + return logoutUserCall(_callback); } @@ -1003,7 +975,6 @@ public class UserApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -1024,20 +995,17 @@ public class UserApi { @SuppressWarnings("rawtypes") private okhttp3.Call updateUserValidateBeforeCall(String username, User user, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'username' is set if (username == null) { throw new ApiException("Missing the required parameter 'username' when calling updateUser(Async)"); } - + // verify the required parameter 'user' is set if (user == null) { throw new ApiException("Missing the required parameter 'user' when calling updateUser(Async)"); } - - okhttp3.Call localVarCall = updateUserCall(username, user, _callback); - return localVarCall; + return updateUserCall(username, user, _callback); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index ce07553a4aaf..a3f07fb7188d 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -313,6 +313,10 @@ public class AdditionalPropertiesClass { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AdditionalPropertiesClass instance itself */ public AdditionalPropertiesClass putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -324,6 +328,8 @@ public class AdditionalPropertiesClass { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -331,6 +337,9 @@ public class AdditionalPropertiesClass { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Animal.java index 032577442bf7..5ca742c7094c 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Animal.java @@ -119,6 +119,10 @@ public class Animal { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Animal instance itself */ public Animal putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -130,6 +134,8 @@ public class Animal { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -137,6 +143,9 @@ public class Animal { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Apple.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Apple.java index 12cde30406da..13e8cd184458 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Apple.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Apple.java @@ -116,6 +116,10 @@ public class Apple { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Apple instance itself */ public Apple putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -127,6 +131,8 @@ public class Apple { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -134,6 +140,9 @@ public class Apple { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index 34e03b26076e..6633031c3bb7 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -100,6 +100,10 @@ public class ArrayOfArrayOfNumberOnly { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ArrayOfArrayOfNumberOnly instance itself */ public ArrayOfArrayOfNumberOnly putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -111,6 +115,8 @@ public class ArrayOfArrayOfNumberOnly { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -118,6 +124,9 @@ public class ArrayOfArrayOfNumberOnly { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOf.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOf.java index 4bdac20a9961..516cdf497df9 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOf.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOf.java @@ -154,6 +154,10 @@ public class ArrayOfInlineAllOf { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ArrayOfInlineAllOf instance itself */ public ArrayOfInlineAllOf putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -165,6 +169,8 @@ public class ArrayOfInlineAllOf { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -172,6 +178,9 @@ public class ArrayOfInlineAllOf { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyInner.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyInner.java index e7f4c195fe9f..10e7f8f56fbf 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyInner.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyInner.java @@ -116,6 +116,10 @@ public class ArrayOfInlineAllOfArrayAllofDogPropertyInner { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ArrayOfInlineAllOfArrayAllofDogPropertyInner instance itself */ public ArrayOfInlineAllOfArrayAllofDogPropertyInner putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -127,6 +131,8 @@ public class ArrayOfInlineAllOfArrayAllofDogPropertyInner { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -134,6 +140,9 @@ public class ArrayOfInlineAllOfArrayAllofDogPropertyInner { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf.java index 1dec4f855236..10399e91696c 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf.java @@ -89,6 +89,10 @@ public class ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf instance itself */ public ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -100,6 +104,8 @@ public class ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -107,6 +113,9 @@ public class ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf1.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf1.java index d90b166b21e4..35ca78826d43 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf1.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf1.java @@ -89,6 +89,10 @@ public class ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf1 { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf1 instance itself */ public ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf1 putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -100,6 +104,8 @@ public class ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf1 { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -107,6 +113,9 @@ public class ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf1 { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf.java deleted file mode 100644 index b71641713fd8..000000000000 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf.java +++ /dev/null @@ -1,273 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf { - public static final String SERIALIZED_NAME_COLOR = "color"; - @SerializedName(SERIALIZED_NAME_COLOR) - private String color; - - public ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf() { - } - - public ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf color(String color) { - - this.color = color; - return this; - } - - /** - * Get color - * @return color - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public String getColor() { - return color; - } - - - public void setColor(String color) { - this.color = color; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - */ - public ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf arrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf = (ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf) o; - return Objects.equals(this.color, arrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf.color)&& - Objects.equals(this.additionalProperties, arrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(color, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf {\n"); - sb.append(" color: ").append(toIndentedString(color)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("color"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields - throw new IllegalArgumentException(String.format("The required field(s) %s in ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf is not found in the empty JSON string", ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf.openapiRequiredFields.toString())); - } - } - if (jsonObj.get("color") != null && !jsonObj.get("color").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `color` to be a primitive type in the JSON string but got `%s`", jsonObj.get("color").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf given an JSON string - * - * @param jsonString JSON string - * @return An instance of ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf - * @throws IOException if the JSON string is invalid with respect to ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf - */ - public static ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf.class); - } - - /** - * Convert an instance of ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf1.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf1.java deleted file mode 100644 index 8e156c9d1198..000000000000 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf1.java +++ /dev/null @@ -1,273 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf1 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf1 { - public static final String SERIALIZED_NAME_COLOR = "color"; - @SerializedName(SERIALIZED_NAME_COLOR) - private String color; - - public ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf1() { - } - - public ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf1 color(String color) { - - this.color = color; - return this; - } - - /** - * Get color - * @return color - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public String getColor() { - return color; - } - - - public void setColor(String color) { - this.color = color; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - */ - public ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf1 putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf1 arrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf1 = (ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf1) o; - return Objects.equals(this.color, arrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf1.color)&& - Objects.equals(this.additionalProperties, arrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf1.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(color, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf1 {\n"); - sb.append(" color: ").append(toIndentedString(color)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("color"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf1 - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf1.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields - throw new IllegalArgumentException(String.format("The required field(s) %s in ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf1 is not found in the empty JSON string", ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf1.openapiRequiredFields.toString())); - } - } - if (jsonObj.get("color") != null && !jsonObj.get("color").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `color` to be a primitive type in the JSON string but got `%s`", jsonObj.get("color").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf1.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf1' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf1.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf1 value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf1 read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf1 instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf1 given an JSON string - * - * @param jsonString JSON string - * @return An instance of ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf1 - * @throws IOException if the JSON string is invalid with respect to ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf1 - */ - public static ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf1 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf1.class); - } - - /** - * Convert an instance of ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf1 to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index 3fe7ef3bb666..650d52d89129 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -100,6 +100,10 @@ public class ArrayOfNumberOnly { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ArrayOfNumberOnly instance itself */ public ArrayOfNumberOnly putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -111,6 +115,8 @@ public class ArrayOfNumberOnly { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -118,6 +124,9 @@ public class ArrayOfNumberOnly { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayTest.java index 66c62001a499..13455dd6478c 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -170,6 +170,10 @@ public class ArrayTest { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ArrayTest instance itself */ public ArrayTest putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -181,6 +185,8 @@ public class ArrayTest { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -188,6 +194,9 @@ public class ArrayTest { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Banana.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Banana.java index 77c58de4f52c..cc63b0f716d4 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Banana.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Banana.java @@ -90,6 +90,10 @@ public class Banana { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Banana instance itself */ public Banana putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -101,6 +105,8 @@ public class Banana { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -108,6 +114,9 @@ public class Banana { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/BasquePig.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/BasquePig.java index 320729a4d2d6..44826333ba6c 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/BasquePig.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/BasquePig.java @@ -89,6 +89,10 @@ public class BasquePig { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the BasquePig instance itself */ public BasquePig putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -100,6 +104,8 @@ public class BasquePig { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -107,6 +113,9 @@ public class BasquePig { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Capitalization.java index 02b5700b40fa..ef377c09c366 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Capitalization.java @@ -224,6 +224,10 @@ public class Capitalization { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Capitalization instance itself */ public Capitalization putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -235,6 +239,8 @@ public class Capitalization { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -242,6 +248,9 @@ public class Capitalization { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Cat.java index 0f6dc81df2a3..9145aa14000e 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Cat.java @@ -91,6 +91,10 @@ public class Cat extends Animal { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Cat instance itself */ public Cat putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -102,6 +106,8 @@ public class Cat extends Animal { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -109,6 +115,9 @@ public class Cat extends Animal { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/CatAllOf.java index 75ab60e755db..9ff89c24e680 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/CatAllOf.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/CatAllOf.java @@ -89,6 +89,10 @@ public class CatAllOf { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CatAllOf instance itself */ public CatAllOf putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -100,6 +104,8 @@ public class CatAllOf { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -107,6 +113,9 @@ public class CatAllOf { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Category.java index f4dbe9dc7fc2..7a127d606ac3 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Category.java @@ -116,6 +116,10 @@ public class Category { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Category instance itself */ public Category putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -127,6 +131,8 @@ public class Category { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -134,6 +140,9 @@ public class Category { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ClassModel.java index 8ce6202a12ff..7c78ec4f3490 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ClassModel.java @@ -90,6 +90,10 @@ public class ClassModel { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ClassModel instance itself */ public ClassModel putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -101,6 +105,8 @@ public class ClassModel { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -108,6 +114,9 @@ public class ClassModel { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Client.java index 4a3a46e5258b..15be7de77ac3 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Client.java @@ -89,6 +89,10 @@ public class Client { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Client instance itself */ public Client putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -100,6 +104,8 @@ public class Client { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -107,6 +113,9 @@ public class Client { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java index cb61e2b58c16..8020a1c0cce5 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java @@ -116,6 +116,10 @@ public class ComplexQuadrilateral { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ComplexQuadrilateral instance itself */ public ComplexQuadrilateral putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -127,6 +131,8 @@ public class ComplexQuadrilateral { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -134,6 +140,9 @@ public class ComplexQuadrilateral { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DanishPig.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DanishPig.java index 7c553c77a119..a93b861f8853 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DanishPig.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DanishPig.java @@ -89,6 +89,10 @@ public class DanishPig { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the DanishPig instance itself */ public DanishPig putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -100,6 +104,8 @@ public class DanishPig { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -107,6 +113,9 @@ public class DanishPig { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DeprecatedObject.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DeprecatedObject.java index 82c7a6c25199..6434f62dd597 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DeprecatedObject.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DeprecatedObject.java @@ -91,6 +91,10 @@ public class DeprecatedObject { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the DeprecatedObject instance itself */ public DeprecatedObject putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -102,6 +106,8 @@ public class DeprecatedObject { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -109,6 +115,9 @@ public class DeprecatedObject { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Dog.java index 8e4af074c572..03fec9e05319 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Dog.java @@ -91,6 +91,10 @@ public class Dog extends Animal { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Dog instance itself */ public Dog putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -102,6 +106,8 @@ public class Dog extends Animal { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -109,6 +115,9 @@ public class Dog extends Animal { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DogAllOf.java index 2db296df1c8f..4f30a816582b 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DogAllOf.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DogAllOf.java @@ -89,6 +89,10 @@ public class DogAllOf { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the DogAllOf instance itself */ public DogAllOf putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -100,6 +104,8 @@ public class DogAllOf { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -107,6 +113,9 @@ public class DogAllOf { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumArrays.java index 41d6743a7b7b..217c5da5cec8 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -220,6 +220,10 @@ public class EnumArrays { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the EnumArrays instance itself */ public EnumArrays putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -231,6 +235,8 @@ public class EnumArrays { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -238,6 +244,9 @@ public class EnumArrays { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumStringDiscriminator.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumStringDiscriminator.java index bfdd1a6a047f..41db1a90f07d 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumStringDiscriminator.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumStringDiscriminator.java @@ -137,6 +137,10 @@ public class EnumStringDiscriminator { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the EnumStringDiscriminator instance itself */ public EnumStringDiscriminator putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -148,6 +152,8 @@ public class EnumStringDiscriminator { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -155,6 +161,9 @@ public class EnumStringDiscriminator { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumTest.java index c6f025c96533..758616c598d8 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumTest.java @@ -549,6 +549,10 @@ public class EnumTest { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the EnumTest instance itself */ public EnumTest putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -560,6 +564,8 @@ public class EnumTest { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -567,6 +573,9 @@ public class EnumTest { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EquilateralTriangle.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EquilateralTriangle.java index 0e74ab79b7b4..6e28cc9617fb 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EquilateralTriangle.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EquilateralTriangle.java @@ -116,6 +116,10 @@ public class EquilateralTriangle { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the EquilateralTriangle instance itself */ public EquilateralTriangle putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -127,6 +131,8 @@ public class EquilateralTriangle { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -134,6 +140,9 @@ public class EquilateralTriangle { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 42c877cca189..cec798843527 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -127,6 +127,10 @@ public class FileSchemaTestClass { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the FileSchemaTestClass instance itself */ public FileSchemaTestClass putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -138,6 +142,8 @@ public class FileSchemaTestClass { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -145,6 +151,9 @@ public class FileSchemaTestClass { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Foo.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Foo.java index 7400a2363f65..edeaa16b2e6b 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Foo.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Foo.java @@ -89,6 +89,10 @@ public class Foo { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Foo instance itself */ public Foo putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -100,6 +104,8 @@ public class Foo { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -107,6 +113,9 @@ public class Foo { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java index f1ffeca019e8..2ee8ff77f74c 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java @@ -90,6 +90,10 @@ public class FooGetDefaultResponse { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the FooGetDefaultResponse instance itself */ public FooGetDefaultResponse putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -101,6 +105,8 @@ public class FooGetDefaultResponse { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -108,6 +114,9 @@ public class FooGetDefaultResponse { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FormatTest.java index 80c13f24f959..66a93281aaec 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FormatTest.java @@ -536,6 +536,10 @@ public class FormatTest { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the FormatTest instance itself */ public FormatTest putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -547,6 +551,8 @@ public class FormatTest { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -554,6 +560,9 @@ public class FormatTest { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/GrandparentAnimal.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/GrandparentAnimal.java index e2232a8d2320..c1b38b567e08 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/GrandparentAnimal.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/GrandparentAnimal.java @@ -91,6 +91,10 @@ public class GrandparentAnimal { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the GrandparentAnimal instance itself */ public GrandparentAnimal putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -102,6 +106,8 @@ public class GrandparentAnimal { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -109,6 +115,9 @@ public class GrandparentAnimal { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index 7baa3b491838..ef0f3b865c46 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -108,6 +108,10 @@ public class HasOnlyReadOnly { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the HasOnlyReadOnly instance itself */ public HasOnlyReadOnly putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -119,6 +123,8 @@ public class HasOnlyReadOnly { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -126,6 +132,9 @@ public class HasOnlyReadOnly { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/HealthCheckResult.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/HealthCheckResult.java index c018e67cdf7b..7272eda86500 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/HealthCheckResult.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/HealthCheckResult.java @@ -91,6 +91,10 @@ public class HealthCheckResult { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the HealthCheckResult instance itself */ public HealthCheckResult putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -102,6 +106,8 @@ public class HealthCheckResult { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -109,6 +115,9 @@ public class HealthCheckResult { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/InlineResponseDefault.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/InlineResponseDefault.java deleted file mode 100644 index 1bb1be954d4e..000000000000 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/InlineResponseDefault.java +++ /dev/null @@ -1,275 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.openapitools.client.model.Foo; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * InlineResponseDefault - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class InlineResponseDefault { - public static final String SERIALIZED_NAME_STRING = "string"; - @SerializedName(SERIALIZED_NAME_STRING) - private Foo string; - - public InlineResponseDefault() { - } - - public InlineResponseDefault string(Foo string) { - - this.string = string; - return this; - } - - /** - * Get string - * @return string - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Foo getString() { - return string; - } - - - public void setString(Foo string) { - this.string = string; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - */ - public InlineResponseDefault putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - InlineResponseDefault inlineResponseDefault = (InlineResponseDefault) o; - return Objects.equals(this.string, inlineResponseDefault.string)&& - Objects.equals(this.additionalProperties, inlineResponseDefault.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(string, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class InlineResponseDefault {\n"); - sb.append(" string: ").append(toIndentedString(string)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("string"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to InlineResponseDefault - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (InlineResponseDefault.openapiRequiredFields.isEmpty()) { - return; - } else { // has required fields - throw new IllegalArgumentException(String.format("The required field(s) %s in InlineResponseDefault is not found in the empty JSON string", InlineResponseDefault.openapiRequiredFields.toString())); - } - } - // validate the optional field `string` - if (jsonObj.getAsJsonObject("string") != null) { - Foo.validateJsonObject(jsonObj.getAsJsonObject("string")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!InlineResponseDefault.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'InlineResponseDefault' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(InlineResponseDefault.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, InlineResponseDefault value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additonal properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public InlineResponseDefault read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - InlineResponseDefault instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else { // non-primitive type - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of InlineResponseDefault given an JSON string - * - * @param jsonString JSON string - * @return An instance of InlineResponseDefault - * @throws IOException if the JSON string is invalid with respect to InlineResponseDefault - */ - public static InlineResponseDefault fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, InlineResponseDefault.class); - } - - /** - * Convert an instance of InlineResponseDefault to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MapTest.java index 6bc6735f4d16..5c7347833be3 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MapTest.java @@ -251,6 +251,10 @@ public class MapTest { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the MapTest instance itself */ public MapTest putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -262,6 +266,8 @@ public class MapTest { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -269,6 +275,9 @@ public class MapTest { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 50e3e01b39da..5af8c69660a7 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -156,6 +156,10 @@ public class MixedPropertiesAndAdditionalPropertiesClass { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the MixedPropertiesAndAdditionalPropertiesClass instance itself */ public MixedPropertiesAndAdditionalPropertiesClass putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -167,6 +171,8 @@ public class MixedPropertiesAndAdditionalPropertiesClass { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -174,6 +180,9 @@ public class MixedPropertiesAndAdditionalPropertiesClass { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Model200Response.java index 1d16af328b9d..7a236e7d93cc 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Model200Response.java @@ -117,6 +117,10 @@ public class Model200Response { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Model200Response instance itself */ public Model200Response putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -128,6 +132,8 @@ public class Model200Response { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -135,6 +141,9 @@ public class Model200Response { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelApiResponse.java index da280792268c..dc1b56c9d291 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -143,6 +143,10 @@ public class ModelApiResponse { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ModelApiResponse instance itself */ public ModelApiResponse putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -154,6 +158,8 @@ public class ModelApiResponse { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -161,6 +167,9 @@ public class ModelApiResponse { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelFile.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelFile.java index 5f330f161015..bffda975917c 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelFile.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelFile.java @@ -90,6 +90,10 @@ public class ModelFile { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ModelFile instance itself */ public ModelFile putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -101,6 +105,8 @@ public class ModelFile { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -108,6 +114,9 @@ public class ModelFile { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelList.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelList.java index ad9b734b65c3..fb09ed3ff7c7 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelList.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelList.java @@ -89,6 +89,10 @@ public class ModelList { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ModelList instance itself */ public ModelList putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -100,6 +104,8 @@ public class ModelList { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -107,6 +113,9 @@ public class ModelList { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelReturn.java index 6c13e2988f98..93c6237225a6 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -90,6 +90,10 @@ public class ModelReturn { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ModelReturn instance itself */ public ModelReturn putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -101,6 +105,8 @@ public class ModelReturn { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -108,6 +114,9 @@ public class ModelReturn { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Name.java index 23196fd0f844..c9221c4667c6 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Name.java @@ -163,6 +163,10 @@ public class Name { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Name instance itself */ public Name putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -174,6 +178,8 @@ public class Name { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -181,6 +187,9 @@ public class Name { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NumberOnly.java index e66f653a9069..5a8f5cf16e62 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -90,6 +90,10 @@ public class NumberOnly { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the NumberOnly instance itself */ public NumberOnly putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -101,6 +105,8 @@ public class NumberOnly { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -108,6 +114,9 @@ public class NumberOnly { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java index 54c5ad0da40a..019c6b38422f 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java @@ -188,6 +188,10 @@ public class ObjectWithDeprecatedFields { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ObjectWithDeprecatedFields instance itself */ public ObjectWithDeprecatedFields putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -199,6 +203,8 @@ public class ObjectWithDeprecatedFields { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -206,6 +212,9 @@ public class ObjectWithDeprecatedFields { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Order.java index 1a5451c96892..3310e7a0ef07 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Order.java @@ -274,6 +274,10 @@ public class Order { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Order instance itself */ public Order putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -285,6 +289,8 @@ public class Order { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -292,6 +298,9 @@ public class Order { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/OuterComposite.java index a7ee0d34867c..34fd2a1589bb 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -144,6 +144,10 @@ public class OuterComposite { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the OuterComposite instance itself */ public OuterComposite putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -155,6 +159,8 @@ public class OuterComposite { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -162,6 +168,9 @@ public class OuterComposite { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ParentPet.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ParentPet.java index 0e04aa65184b..7ba6aa639e80 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ParentPet.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ParentPet.java @@ -64,6 +64,10 @@ public class ParentPet extends GrandparentAnimal { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ParentPet instance itself */ public ParentPet putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -75,6 +79,8 @@ public class ParentPet extends GrandparentAnimal { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -82,6 +88,9 @@ public class ParentPet extends GrandparentAnimal { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Pet.java index 485e0ae1da71..7bd1f4d78427 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Pet.java @@ -290,6 +290,10 @@ public class Pet { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Pet instance itself */ public Pet putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -301,6 +305,8 @@ public class Pet { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -308,6 +314,9 @@ public class Pet { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/PetWithRequiredTags.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/PetWithRequiredTags.java index df846f2e2ac2..ba9c69f5326c 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/PetWithRequiredTags.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/PetWithRequiredTags.java @@ -287,6 +287,10 @@ public class PetWithRequiredTags { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the PetWithRequiredTags instance itself */ public PetWithRequiredTags putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -298,6 +302,8 @@ public class PetWithRequiredTags { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -305,6 +311,9 @@ public class PetWithRequiredTags { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/QuadrilateralInterface.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/QuadrilateralInterface.java index f5ade3d07a13..37e079c42555 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/QuadrilateralInterface.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/QuadrilateralInterface.java @@ -89,6 +89,10 @@ public class QuadrilateralInterface { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the QuadrilateralInterface instance itself */ public QuadrilateralInterface putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -100,6 +104,8 @@ public class QuadrilateralInterface { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -107,6 +113,9 @@ public class QuadrilateralInterface { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index e27def753364..5b912c8baef2 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -115,6 +115,10 @@ public class ReadOnlyFirst { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ReadOnlyFirst instance itself */ public ReadOnlyFirst putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -126,6 +130,8 @@ public class ReadOnlyFirst { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -133,6 +139,9 @@ public class ReadOnlyFirst { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ScaleneTriangle.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ScaleneTriangle.java index 996db6f09372..997b3e8066b0 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ScaleneTriangle.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ScaleneTriangle.java @@ -116,6 +116,10 @@ public class ScaleneTriangle { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ScaleneTriangle instance itself */ public ScaleneTriangle putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -127,6 +131,8 @@ public class ScaleneTriangle { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -134,6 +140,9 @@ public class ScaleneTriangle { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ShapeInterface.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ShapeInterface.java index 04ee2cdc3ef3..748b141957c0 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ShapeInterface.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ShapeInterface.java @@ -89,6 +89,10 @@ public class ShapeInterface { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ShapeInterface instance itself */ public ShapeInterface putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -100,6 +104,8 @@ public class ShapeInterface { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -107,6 +113,9 @@ public class ShapeInterface { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java index e3148e7287a3..7dceb9321e3f 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java @@ -116,6 +116,10 @@ public class SimpleQuadrilateral { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SimpleQuadrilateral instance itself */ public SimpleQuadrilateral putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -127,6 +131,8 @@ public class SimpleQuadrilateral { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -134,6 +140,9 @@ public class SimpleQuadrilateral { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/SpecialModelName.java index f02c9303a4e0..d5e8d1562073 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -116,6 +116,10 @@ public class SpecialModelName { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SpecialModelName instance itself */ public SpecialModelName putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -127,6 +131,8 @@ public class SpecialModelName { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -134,6 +140,9 @@ public class SpecialModelName { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Tag.java index d9c190e90a92..75ea63b35815 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Tag.java @@ -116,6 +116,10 @@ public class Tag { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Tag instance itself */ public Tag putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -127,6 +131,8 @@ public class Tag { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -134,6 +140,9 @@ public class Tag { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/TriangleInterface.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/TriangleInterface.java index 591a1040178b..a5efe5af1af7 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/TriangleInterface.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/TriangleInterface.java @@ -89,6 +89,10 @@ public class TriangleInterface { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the TriangleInterface instance itself */ public TriangleInterface putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -100,6 +104,8 @@ public class TriangleInterface { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -107,6 +113,9 @@ public class TriangleInterface { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/User.java index 563ce37bf517..205b0d92ab74 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/User.java @@ -387,6 +387,10 @@ public class User { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the User instance itself */ public User putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -398,6 +402,8 @@ public class User { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -405,6 +411,9 @@ public class User { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Whale.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Whale.java index 320ddf5d9fa3..455e69bf49ee 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Whale.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Whale.java @@ -143,6 +143,10 @@ public class Whale { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Whale instance itself */ public Whale putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -154,6 +158,8 @@ public class Whale { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -161,6 +167,9 @@ public class Whale { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Zebra.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Zebra.java index 12c69857cd23..75a51a5c9a94 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Zebra.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Zebra.java @@ -165,6 +165,10 @@ public class Zebra { /** * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Zebra instance itself */ public Zebra putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { @@ -176,6 +180,8 @@ public class Zebra { /** * Return the additional (undeclared) property. + * + * @return a map of objects */ public Map getAdditionalProperties() { return additionalProperties; @@ -183,6 +189,9 @@ public class Zebra { /** * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object */ public Object getAdditionalProperty(String key) { if (this.additionalProperties == null) { diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyInnerTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyInnerTest.java index 6c7738e8c96a..4fc429aac716 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyInnerTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyInnerTest.java @@ -21,8 +21,6 @@ import com.google.gson.stream.JsonWriter; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.openapitools.client.model.ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf; -import org.openapitools.client.model.DogAllOf; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf1Test.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf1Test.java deleted file mode 100644 index 2716e8181dfd..000000000000 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf1Test.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - - -/** - * Model tests for ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf1 - */ -public class ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf1Test { - private final ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf1 model = new ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf1(); - - /** - * Model tests for ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf1 - */ - @Test - public void testArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf1() { - // TODO: test ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf1 - } - - /** - * Test the property 'color' - */ - @Test - public void colorTest() { - // TODO: test color - } - -} diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOfTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOfTest.java deleted file mode 100644 index 7a2a0b26a42e..000000000000 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOfTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - - -/** - * Model tests for ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf - */ -public class ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOfTest { - private final ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf model = new ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf(); - - /** - * Model tests for ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf - */ - @Test - public void testArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf() { - // TODO: test ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf - } - - /** - * Test the property 'color' - */ - @Test - public void colorTest() { - // TODO: test color - } - -} diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/InlineResponseDefaultTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/InlineResponseDefaultTest.java deleted file mode 100644 index c4fe8ec11cf0..000000000000 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/InlineResponseDefaultTest.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.openapitools.client.model.Foo; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - - -/** - * Model tests for InlineResponseDefault - */ -public class InlineResponseDefaultTest { - private final InlineResponseDefault model = new InlineResponseDefault(); - - /** - * Model tests for InlineResponseDefault - */ - @Test - public void testInlineResponseDefault() { - // TODO: test InlineResponseDefault - } - - /** - * Test the property 'string' - */ - @Test - public void stringTest() { - // TODO: test string - } - -}