diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java index a7a042031857..c7e8b8079895 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java @@ -551,7 +551,7 @@ public void processOpts() { importMapping.put("JsonDeserialize", (useJackson3 ? JACKSON3_PACKAGE : JACKSON2_PACKAGE) + ".databind.annotation.JsonDeserialize"); typeMapping.put("file", "org.springframework.core.io.Resource"); - importMapping.put("Nullable", "org.springframework.lang.Nullable"); + importMapping.put("Nullable", isUseSpringBoot4() ? "org.jspecify.annotations.Nullable" : "org.springframework.lang.Nullable"); importMapping.put("org.springframework.core.io.Resource", "org.springframework.core.io.Resource"); importMapping.put("DateTimeFormat", "org.springframework.format.annotation.DateTimeFormat"); importMapping.put("ParameterObject", "org.springdoc.api.annotations.ParameterObject"); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/cpphttplibserver/CppHttplibServerCodegenModelTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/cpphttplibserver/CppHttplibServerCodegenModelTest.java index 72d9e5cb5a5c..d731815fea14 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/cpphttplibserver/CppHttplibServerCodegenModelTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/cpphttplibserver/CppHttplibServerCodegenModelTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.openapitools.codegen.cpphttplib; +package org.openapitools.codegen.cpphttplibserver; import org.openapitools.codegen.*; import org.openapitools.codegen.languages.CppHttplibServerCodegen; diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/cpphttplibserver/CppHttplibServerCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/cpphttplibserver/CppHttplibServerCodegenTest.java index 1496f6e9d582..60f4753a9ce5 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/cpphttplibserver/CppHttplibServerCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/cpphttplibserver/CppHttplibServerCodegenTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.openapitools.codegen.cpphttplib; +package org.openapitools.codegen.cpphttplibserver; import static org.openapitools.codegen.utils.StringUtils.underscore; diff --git a/samples/client/others/java/restclient-enum-in-multipart/docs/AllOfSimpleModel.md b/samples/client/others/java/restclient-enum-in-multipart/docs/AllOfSimpleModel.md new file mode 100644 index 000000000000..de96aa498bd8 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/docs/AllOfSimpleModel.md @@ -0,0 +1,13 @@ + + +# AllOfSimpleModel + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayOfStrings** | **List<String>** | | | + + + diff --git a/samples/client/others/java/restclient-enum-in-multipart/docs/Animal.md b/samples/client/others/java/restclient-enum-in-multipart/docs/Animal.md new file mode 100644 index 000000000000..d9b32f14c88a --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/docs/Animal.md @@ -0,0 +1,14 @@ + + +# Animal + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**className** | **String** | | | +|**color** | **String** | | [optional] | + + + diff --git a/samples/client/others/java/restclient-enum-in-multipart/docs/AnyTypeTest.md b/samples/client/others/java/restclient-enum-in-multipart/docs/AnyTypeTest.md new file mode 100644 index 000000000000..a96a098853db --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/docs/AnyTypeTest.md @@ -0,0 +1,15 @@ + + +# AnyTypeTest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**anyTypeProperty** | **Object** | | [optional] | +|**arrayProp** | **List<String>** | test array in 3.1 spec | [optional] | +|**refArrayPrefixItems** | **List<Object>** | An item that was added to the queue. | [optional] | + + + diff --git a/samples/client/others/java/restclient-enum-in-multipart/docs/ArrayOfSameRef.md b/samples/client/others/java/restclient-enum-in-multipart/docs/ArrayOfSameRef.md new file mode 100644 index 000000000000..d4be6b198544 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/docs/ArrayOfSameRef.md @@ -0,0 +1,15 @@ + + +# ArrayOfSameRef + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayFooOne** | [**List<Tag>**](Tag.md) | | [optional] | +|**arrayFooTwo** | [**List<Tag>**](Tag.md) | | [optional] | +|**arrayFooThree** | [**List<Tag>**](Tag.md) | | [optional] | + + + diff --git a/samples/client/others/java/restclient-enum-in-multipart/docs/Cat.md b/samples/client/others/java/restclient-enum-in-multipart/docs/Cat.md new file mode 100644 index 000000000000..390dd519c8ce --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/docs/Cat.md @@ -0,0 +1,13 @@ + + +# Cat + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**declawed** | **Boolean** | | [optional] | + + + diff --git a/samples/client/others/java/restclient-enum-in-multipart/docs/Category.md b/samples/client/others/java/restclient-enum-in-multipart/docs/Category.md new file mode 100644 index 000000000000..a7fc939d252e --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/docs/Category.md @@ -0,0 +1,15 @@ + + +# Category + +A category for a pet + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | [optional] | + + + diff --git a/samples/client/others/java/restclient-enum-in-multipart/docs/CircularReference1.md b/samples/client/others/java/restclient-enum-in-multipart/docs/CircularReference1.md new file mode 100644 index 000000000000..57d2e5f35dfc --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/docs/CircularReference1.md @@ -0,0 +1,13 @@ + + +# CircularReference1 + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**prop1** | [**CircularReference2**](CircularReference2.md) | | [optional] | + + + diff --git a/samples/client/others/java/restclient-enum-in-multipart/docs/CircularReference2.md b/samples/client/others/java/restclient-enum-in-multipart/docs/CircularReference2.md new file mode 100644 index 000000000000..08b2cb49b296 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/docs/CircularReference2.md @@ -0,0 +1,13 @@ + + +# CircularReference2 + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**prop1** | [**CircularReference3**](CircularReference3.md) | | [optional] | + + + diff --git a/samples/client/others/java/restclient-enum-in-multipart/docs/CircularReference3.md b/samples/client/others/java/restclient-enum-in-multipart/docs/CircularReference3.md new file mode 100644 index 000000000000..d34ffab11bcd --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/docs/CircularReference3.md @@ -0,0 +1,13 @@ + + +# CircularReference3 + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**prop1** | [**CircularReference1**](CircularReference1.md) | | [optional] | + + + diff --git a/samples/client/others/java/restclient-enum-in-multipart/docs/CodesEnum.md b/samples/client/others/java/restclient-enum-in-multipart/docs/CodesEnum.md new file mode 100644 index 000000000000..15fb076ca72b --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/docs/CodesEnum.md @@ -0,0 +1,15 @@ + + +# CodesEnum + +## Enum + + +* `CODE_1` (value: `"Code 1"`) + +* `CODE_2` (value: `"Code 2"`) + +* `CODE_3` (value: `"Code 3"`) + + + diff --git a/samples/client/others/java/restclient-enum-in-multipart/docs/DefaultApi.md b/samples/client/others/java/restclient-enum-in-multipart/docs/DefaultApi.md new file mode 100644 index 000000000000..7448b38315bf --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/docs/DefaultApi.md @@ -0,0 +1,73 @@ +# DefaultApi + +All URIs are relative to *http://petstore.swagger.io/v2* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**fakeWebhooksSourcesDeletedPost**](DefaultApi.md#fakeWebhooksSourcesDeletedPost) | **POST** /fake/webhooks/sources/deleted | | + + + +## fakeWebhooksSourcesDeletedPost + +> fakeWebhooksSourcesDeletedPost(fakeWebhooksSourcesDeletedPostRequest) + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + FakeWebhooksSourcesDeletedPostRequest fakeWebhooksSourcesDeletedPostRequest = new FakeWebhooksSourcesDeletedPostRequest(); // FakeWebhooksSourcesDeletedPostRequest | + try { + apiInstance.fakeWebhooksSourcesDeletedPost(fakeWebhooksSourcesDeletedPostRequest); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#fakeWebhooksSourcesDeletedPost"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **fakeWebhooksSourcesDeletedPostRequest** | [**FakeWebhooksSourcesDeletedPostRequest**](FakeWebhooksSourcesDeletedPostRequest.md)| | [optional] | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **405** | Invalid input | - | + diff --git a/samples/client/others/java/restclient-enum-in-multipart/docs/Dog.md b/samples/client/others/java/restclient-enum-in-multipart/docs/Dog.md new file mode 100644 index 000000000000..972c981c0d05 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/docs/Dog.md @@ -0,0 +1,13 @@ + + +# Dog + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**breed** | **String** | | [optional] | + + + diff --git a/samples/client/others/java/restclient-enum-in-multipart/docs/FakeApi.md b/samples/client/others/java/restclient-enum-in-multipart/docs/FakeApi.md new file mode 100644 index 000000000000..9fadb43afc3a --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/docs/FakeApi.md @@ -0,0 +1,759 @@ +# FakeApi + +All URIs are relative to *http://petstore.swagger.io/v2* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**fakeInlineSchemaAnyofPath1Get**](FakeApi.md#fakeInlineSchemaAnyofPath1Get) | **GET** /fake/inline/schema/anyof/path1 | | +| [**fakeInlineSchemaAnyofPath2Get**](FakeApi.md#fakeInlineSchemaAnyofPath2Get) | **GET** /fake/inline/schema/anyof/path2 | | +| [**fakeInlineSchemaAnyofPath3Get**](FakeApi.md#fakeInlineSchemaAnyofPath3Get) | **GET** /fake/inline/schema/anyof/path3 | | +| [**op1**](FakeApi.md#op1) | **POST** /fake/api/changeowner | op1 | +| [**op2**](FakeApi.md#op2) | **POST** /fake/api/changename | op2 | +| [**op3**](FakeApi.md#op3) | **POST** /fake/api/query/enum | op3 | +| [**refToRefParameter**](FakeApi.md#refToRefParameter) | **GET** /ref/ref_to_parameter | | +| [**refToRefParameterAnyof**](FakeApi.md#refToRefParameterAnyof) | **GET** /ref/ref_to_operation_level_parameter_oneof | | +| [**refToRefParameterOneof**](FakeApi.md#refToRefParameterOneof) | **GET** /ref/ref_to_path_level_parameter_oneof | | +| [**responseNoRef**](FakeApi.md#responseNoRef) | **GET** /no_ref | | +| [**responseRefToNoRef**](FakeApi.md#responseRefToNoRef) | **GET** /ref/no_ref | | +| [**responseRefToRef**](FakeApi.md#responseRefToRef) | **GET** /ref/ref | | + + + +## fakeInlineSchemaAnyofPath1Get + +> Object fakeInlineSchemaAnyofPath1Get() + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + try { + Object result = apiInstance.fakeInlineSchemaAnyofPath1Get(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeInlineSchemaAnyofPath1Get"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +**Object** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | | - | + + +## fakeInlineSchemaAnyofPath2Get + +> Object fakeInlineSchemaAnyofPath2Get() + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + try { + Object result = apiInstance.fakeInlineSchemaAnyofPath2Get(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeInlineSchemaAnyofPath2Get"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +**Object** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | | - | + + +## fakeInlineSchemaAnyofPath3Get + +> List<Object> fakeInlineSchemaAnyofPath3Get() + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + try { + List result = apiInstance.fakeInlineSchemaAnyofPath3Get(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeInlineSchemaAnyofPath3Get"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +**List<Object>** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | | - | + + +## op1 + +> Object op1() + +op1 + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + try { + Object result = apiInstance.op1(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#op1"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +**Object** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Successful Response | - | +| **422** | Validation Error | - | + + +## op2 + +> Object op2() + +op2 + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + try { + Object result = apiInstance.op2(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#op2"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +**Object** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Successful Response | - | +| **422** | Validation Error | - | + + +## op3 + +> op3(queryEnum) + +op3 + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + List queryEnum = Arrays.asList(); // List | query enum test + try { + apiInstance.op3(queryEnum); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#op3"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queryEnum** | [**List<CodesEnum>**](CodesEnum.md)| query enum test | | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | + + +## refToRefParameter + +> String refToRefParameter(refToUuid) + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + UUID refToUuid = UUID.fromString("61864654-6e6b-4152-a62f-795fdd606bc2"); // UUID | to test ref to parameter (uuid) + try { + String result = apiInstance.refToRefParameter(refToUuid); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#refToRefParameter"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **refToUuid** | **UUID**| to test ref to parameter (uuid) | | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | required to pass validation | - | + + +## refToRefParameterAnyof + +> refToRefParameterAnyof(refToAnyof) + + + +to test $ref to operation level parameters + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + RefToRefParameterAnyofRefToAnyofParameter refToAnyof = new RefToRefParameterAnyofRefToAnyofParameter(); // RefToRefParameterAnyofRefToAnyofParameter | to test ref to parameter (anyof) + try { + apiInstance.refToRefParameterAnyof(refToAnyof); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#refToRefParameterAnyof"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **refToAnyof** | [**RefToRefParameterAnyofRefToAnyofParameter**](.md)| to test ref to parameter (anyof) | | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | + + +## refToRefParameterOneof + +> refToRefParameterOneof(refToOneof) + + + +to test $ref to path level parameters + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + RefRefToPathLevelParameterOneofRefToOneofParameter refToOneof = new RefRefToPathLevelParameterOneofRefToOneofParameter(); // RefRefToPathLevelParameterOneofRefToOneofParameter | to test ref to parameter (oneof) + try { + apiInstance.refToRefParameterOneof(refToOneof); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#refToRefParameterOneof"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **refToOneof** | [**RefRefToPathLevelParameterOneofRefToOneofParameter**](.md)| to test ref to parameter (oneof) | | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | + + +## responseNoRef + +> String responseNoRef() + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + try { + String result = apiInstance.responseNoRef(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#responseNoRef"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | required to pass validation | - | + + +## responseRefToNoRef + +> String responseRefToNoRef() + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + try { + String result = apiInstance.responseRefToNoRef(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#responseRefToNoRef"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | required to pass validation | - | + + +## responseRefToRef + +> String responseRefToRef() + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + try { + String result = apiInstance.responseRefToRef(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#responseRefToRef"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | required to pass validation | - | + diff --git a/samples/client/others/java/restclient-enum-in-multipart/docs/FakeWebhooksSourcesDeletedPostRequest.md b/samples/client/others/java/restclient-enum-in-multipart/docs/FakeWebhooksSourcesDeletedPostRequest.md new file mode 100644 index 000000000000..0ab71acc4683 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/docs/FakeWebhooksSourcesDeletedPostRequest.md @@ -0,0 +1,16 @@ + + +# FakeWebhooksSourcesDeletedPostRequest + +inline schema in webhooks + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**eventTimestamp** | **OffsetDateTime** | | | +|**eventType** | **String** | | | +|**event** | [**FakeWebhooksSourcesDeletedPostRequestEvent**](FakeWebhooksSourcesDeletedPostRequestEvent.md) | | | + + + diff --git a/samples/client/others/java/restclient-enum-in-multipart/docs/FakeWebhooksSourcesDeletedPostRequestEvent.md b/samples/client/others/java/restclient-enum-in-multipart/docs/FakeWebhooksSourcesDeletedPostRequestEvent.md new file mode 100644 index 000000000000..c1ae950abda2 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/docs/FakeWebhooksSourcesDeletedPostRequestEvent.md @@ -0,0 +1,13 @@ + + +# FakeWebhooksSourcesDeletedPostRequestEvent + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**eventId** | **String** | | | + + + diff --git a/samples/client/others/java/restclient-enum-in-multipart/docs/ModelApiResponse.md b/samples/client/others/java/restclient-enum-in-multipart/docs/ModelApiResponse.md new file mode 100644 index 000000000000..cd7e3c400be6 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/docs/ModelApiResponse.md @@ -0,0 +1,16 @@ + + +# ModelApiResponse + +Describes the result of uploading an image resource + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **Integer** | | [optional] | +|**type** | **String** | | [optional] | +|**message** | **String** | | [optional] | + + + diff --git a/samples/client/others/java/restclient-enum-in-multipart/docs/OneOfStringOrInt.md b/samples/client/others/java/restclient-enum-in-multipart/docs/OneOfStringOrInt.md new file mode 100644 index 000000000000..f8bd666c0fe0 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/docs/OneOfStringOrInt.md @@ -0,0 +1,13 @@ + + +# OneOfStringOrInt + +string or int (onefOf) + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + diff --git a/samples/client/others/java/restclient-enum-in-multipart/docs/Order.md b/samples/client/others/java/restclient-enum-in-multipart/docs/Order.md new file mode 100644 index 000000000000..0c33059b8b6a --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/docs/Order.md @@ -0,0 +1,29 @@ + + +# Order + +An order for a pets from the pet store + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**petId** | **Long** | | [optional] | +|**quantity** | **Integer** | | [optional] | +|**shipDate** | **OffsetDateTime** | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] | +|**complete** | **Boolean** | | [optional] | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| PLACED | "placed" | +| APPROVED | "approved" | +| DELIVERED | "delivered" | + + + diff --git a/samples/client/others/java/restclient-enum-in-multipart/docs/Pet.md b/samples/client/others/java/restclient-enum-in-multipart/docs/Pet.md new file mode 100644 index 000000000000..8bb363301232 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/docs/Pet.md @@ -0,0 +1,29 @@ + + +# Pet + +A pet for sale in the pet store + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**category** | [**Category**](Category.md) | | [optional] | +|**name** | **String** | | | +|**photoUrls** | **List<String>** | | | +|**tags** | [**List<Tag>**](Tag.md) | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| AVAILABLE | "available" | +| PENDING | "pending" | +| SOLD | "sold" | + + + diff --git a/samples/client/others/java/restclient-enum-in-multipart/docs/PetApi.md b/samples/client/others/java/restclient-enum-in-multipart/docs/PetApi.md new file mode 100644 index 000000000000..4031a8d100d9 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/docs/PetApi.md @@ -0,0 +1,602 @@ +# PetApi + +All URIs are relative to *http://petstore.swagger.io/v2* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**addPet**](PetApi.md#addPet) | **POST** /pet | Add a new pet to the store | +| [**deletePet**](PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet | +| [**findPetsByStatus**](PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status | +| [**findPetsByTags**](PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags | +| [**getPetById**](PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID | +| [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet | +| [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data | +| [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image | + + + +## addPet + +> Pet addPet(pet) + +Add a new pet to the store + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + + PetApi apiInstance = new PetApi(defaultClient); + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store + try { + Pet result = apiInstance.addPet(pet); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#addPet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | + +### Return type + +[**Pet**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: application/json, application/xml +- **Accept**: application/xml, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **405** | Invalid input | - | + + +## deletePet + +> deletePet(petId, apiKey) + +Deletes a pet + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | Pet id to delete + String apiKey = "apiKey_example"; // String | + try { + apiInstance.deletePet(petId, apiKey); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#deletePet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| Pet id to delete | | +| **apiKey** | **String**| | [optional] | + +### Return type + +null (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid pet value | - | + + +## findPetsByStatus + +> List<Pet> findPetsByStatus(status) + +Finds Pets by status + +Multiple status values can be provided with comma separated strings + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + + PetApi apiInstance = new PetApi(defaultClient); + List status = Arrays.asList("available"); // List | Status values that need to be considered for filter + try { + List result = apiInstance.findPetsByStatus(status); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#findPetsByStatus"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] | + +### Return type + +[**List<Pet>**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid status value | - | + + +## findPetsByTags + +> List<Pet> findPetsByTags(tags) + +Finds Pets by tags + +Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + + PetApi apiInstance = new PetApi(defaultClient); + List tags = Arrays.asList(); // List | Tags to filter by + try { + List result = apiInstance.findPetsByTags(tags); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#findPetsByTags"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tags** | [**List<String>**](String.md)| Tags to filter by | | + +### Return type + +[**List<Pet>**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid tag value | - | + + +## getPetById + +> Pet getPetById(petId) + +Find pet by ID + +Returns a single pet + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to return + try { + Pet result = apiInstance.getPetById(petId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#getPetById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to return | | + +### Return type + +[**Pet**](Pet.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | + + +## updatePet + +> Pet updatePet(pet) + +Update an existing pet + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + + PetApi apiInstance = new PetApi(defaultClient); + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store + try { + Pet result = apiInstance.updatePet(pet); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#updatePet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | + +### Return type + +[**Pet**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: application/json, application/xml +- **Accept**: application/xml, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Pet not found | - | +| **405** | Validation exception | - | + + +## updatePetWithForm + +> updatePetWithForm(petId, name, status) + +Updates a pet in the store with form data + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet that needs to be updated + String name = "name_example"; // String | Updated name of the pet + String status = "status_example"; // String | Updated status of the pet + try { + apiInstance.updatePetWithForm(petId, name, status); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#updatePetWithForm"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet that needs to be updated | | +| **name** | **String**| Updated name of the pet | [optional] | +| **status** | **String**| Updated status of the pet | [optional] | + +### Return type + +null (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **405** | Invalid input | - | + + +## uploadFile + +> ModelApiResponse uploadFile(petId, additionalMetadata, _file) + +uploads an image + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PetApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure OAuth2 access token for authorization: petstore_auth + OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); + petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + + PetApi apiInstance = new PetApi(defaultClient); + Long petId = 56L; // Long | ID of pet to update + String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server + File _file = new File("/path/to/file"); // File | file to upload + try { + ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, _file); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **petId** | **Long**| ID of pet to update | | +| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | +| **_file** | **File**| file to upload | [optional] | + +### Return type + +[**ModelApiResponse**](ModelApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: multipart/form-data +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + diff --git a/samples/client/others/java/restclient-enum-in-multipart/docs/PetWithTypesObjectNullAndRef.md b/samples/client/others/java/restclient-enum-in-multipart/docs/PetWithTypesObjectNullAndRef.md new file mode 100644 index 000000000000..618d36cc0b19 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/docs/PetWithTypesObjectNullAndRef.md @@ -0,0 +1,13 @@ + + +# PetWithTypesObjectNullAndRef + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**firstProperty** | [**Pet**](Pet.md) | | [optional] | + + + diff --git a/samples/client/others/java/restclient-enum-in-multipart/docs/RefRefToPathLevelParameterOneofRefToOneofParameter.md b/samples/client/others/java/restclient-enum-in-multipart/docs/RefRefToPathLevelParameterOneofRefToOneofParameter.md new file mode 100644 index 000000000000..1d06eb272969 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/docs/RefRefToPathLevelParameterOneofRefToOneofParameter.md @@ -0,0 +1,12 @@ + + +# RefRefToPathLevelParameterOneofRefToOneofParameter + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + diff --git a/samples/client/others/java/restclient-enum-in-multipart/docs/RefToRefParameterAnyofRefToAnyofParameter.md b/samples/client/others/java/restclient-enum-in-multipart/docs/RefToRefParameterAnyofRefToAnyofParameter.md new file mode 100644 index 000000000000..c204a306bfaa --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/docs/RefToRefParameterAnyofRefToAnyofParameter.md @@ -0,0 +1,12 @@ + + +# RefToRefParameterAnyofRefToAnyofParameter + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + diff --git a/samples/client/others/java/restclient-enum-in-multipart/docs/SelfReferenceAdditionalProperties.md b/samples/client/others/java/restclient-enum-in-multipart/docs/SelfReferenceAdditionalProperties.md new file mode 100644 index 000000000000..310e589185c1 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/docs/SelfReferenceAdditionalProperties.md @@ -0,0 +1,13 @@ + + +# SelfReferenceAdditionalProperties + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**dummy** | **String** | | [optional] | + + + diff --git a/samples/client/others/java/restclient-enum-in-multipart/docs/SelfReferenceAnyOf.md b/samples/client/others/java/restclient-enum-in-multipart/docs/SelfReferenceAnyOf.md new file mode 100644 index 000000000000..9a7831510eb9 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/docs/SelfReferenceAnyOf.md @@ -0,0 +1,12 @@ + + +# SelfReferenceAnyOf + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + diff --git a/samples/client/others/java/restclient-enum-in-multipart/docs/SelfReferenceOneOf.md b/samples/client/others/java/restclient-enum-in-multipart/docs/SelfReferenceOneOf.md new file mode 100644 index 000000000000..37de9abb5d4a --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/docs/SelfReferenceOneOf.md @@ -0,0 +1,12 @@ + + +# SelfReferenceOneOf + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + diff --git a/samples/client/others/java/restclient-enum-in-multipart/docs/SimpleModelWithArrayProperty.md b/samples/client/others/java/restclient-enum-in-multipart/docs/SimpleModelWithArrayProperty.md new file mode 100644 index 000000000000..17737af5ceb2 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/docs/SimpleModelWithArrayProperty.md @@ -0,0 +1,13 @@ + + +# SimpleModelWithArrayProperty + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayOfStrings** | **List<String>** | | | + + + diff --git a/samples/client/others/java/restclient-enum-in-multipart/docs/StoreApi.md b/samples/client/others/java/restclient-enum-in-multipart/docs/StoreApi.md new file mode 100644 index 000000000000..bacbaeef1403 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/docs/StoreApi.md @@ -0,0 +1,282 @@ +# StoreApi + +All URIs are relative to *http://petstore.swagger.io/v2* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID | +| [**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status | +| [**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID | +| [**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet | + + + +## deleteOrder + +> deleteOrder(orderId) + +Delete purchase order by ID + +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + StoreApi apiInstance = new StoreApi(defaultClient); + String orderId = "orderId_example"; // String | ID of the order that needs to be deleted + try { + apiInstance.deleteOrder(orderId); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#deleteOrder"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **String**| ID of the order that needs to be deleted | | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + + +## getInventory + +> Map<String, Integer> getInventory() + +Returns pet inventories by status + +Returns a map of status codes to quantities + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + StoreApi apiInstance = new StoreApi(defaultClient); + try { + Map result = apiInstance.getInventory(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#getInventory"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +**Map<String, Integer>** + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + + +## getOrderById + +> Order getOrderById(orderId) + +Find purchase order by ID + +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + StoreApi apiInstance = new StoreApi(defaultClient); + Long orderId = 56L; // Long | ID of pet that needs to be fetched + try { + Order result = apiInstance.getOrderById(orderId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#getOrderById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderId** | **Long**| ID of pet that needs to be fetched | | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid ID supplied | - | +| **404** | Order not found | - | + + +## placeOrder + +> Order placeOrder(order) + +Place an order for a pet + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.StoreApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + StoreApi apiInstance = new StoreApi(defaultClient); + Order order = new Order(); // Order | order placed for purchasing the pet + try { + Order result = apiInstance.placeOrder(order); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StoreApi#placeOrder"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **order** | [**Order**](Order.md)| order placed for purchasing the pet | | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/xml, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid Order | - | + diff --git a/samples/client/others/java/restclient-enum-in-multipart/docs/StringOrInt.md b/samples/client/others/java/restclient-enum-in-multipart/docs/StringOrInt.md new file mode 100644 index 000000000000..5a3bda343bb0 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/docs/StringOrInt.md @@ -0,0 +1,13 @@ + + +# StringOrInt + +string or int + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + diff --git a/samples/client/others/java/restclient-enum-in-multipart/docs/Tag.md b/samples/client/others/java/restclient-enum-in-multipart/docs/Tag.md new file mode 100644 index 000000000000..abfde4afb501 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/docs/Tag.md @@ -0,0 +1,15 @@ + + +# Tag + +A tag for a pet + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | [optional] | + + + diff --git a/samples/client/others/java/restclient-enum-in-multipart/docs/User.md b/samples/client/others/java/restclient-enum-in-multipart/docs/User.md new file mode 100644 index 000000000000..426845227bd3 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/docs/User.md @@ -0,0 +1,21 @@ + + +# User + +A User who is purchasing from the pet store + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**username** | **String** | | [optional] | +|**firstName** | **String** | | [optional] | +|**lastName** | **String** | | [optional] | +|**email** | **String** | | [optional] | +|**password** | **String** | | [optional] | +|**phone** | **String** | | [optional] | +|**userStatus** | **Integer** | User Status | [optional] | + + + diff --git a/samples/client/others/java/restclient-enum-in-multipart/docs/UserApi.md b/samples/client/others/java/restclient-enum-in-multipart/docs/UserApi.md new file mode 100644 index 000000000000..e1c575fab3f7 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/docs/UserApi.md @@ -0,0 +1,585 @@ +# UserApi + +All URIs are relative to *http://petstore.swagger.io/v2* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createUser**](UserApi.md#createUser) | **POST** /user | Create user | +| [**createUsersWithArrayInput**](UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array | +| [**createUsersWithListInput**](UserApi.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array | +| [**deleteUser**](UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user | +| [**getUserByName**](UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name | +| [**loginUser**](UserApi.md#loginUser) | **GET** /user/login | Logs user into the system | +| [**logoutUser**](UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session | +| [**updateUser**](UserApi.md#updateUser) | **PUT** /user/{username} | Updated user | + + + +## createUser + +> createUser(user) + +Create user + +This can only be done by the logged in user. + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + UserApi apiInstance = new UserApi(defaultClient); + User user = new User(); // User | Created user object + try { + apiInstance.createUser(user); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **user** | [**User**](User.md)| Created user object | | + +### Return type + +null (empty response body) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + + +## createUsersWithArrayInput + +> createUsersWithArrayInput(user) + +Creates list of users with given input array + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + UserApi apiInstance = new UserApi(defaultClient); + List user = Arrays.asList(); // List | List of user object + try { + apiInstance.createUsersWithArrayInput(user); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **user** | [**List<User>**](User.md)| List of user object | | + +### Return type + +null (empty response body) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + + +## createUsersWithListInput + +> createUsersWithListInput(user) + +Creates list of users with given input array + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + UserApi apiInstance = new UserApi(defaultClient); + List user = Arrays.asList(); // List | List of user object + try { + apiInstance.createUsersWithListInput(user); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createUsersWithListInput"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **user** | [**List<User>**](User.md)| List of user object | | + +### Return type + +null (empty response body) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + + +## deleteUser + +> deleteUser(username) + +Delete user + +This can only be done by the logged in user. + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The name that needs to be deleted + try { + apiInstance.deleteUser(username); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#deleteUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be deleted | | + +### Return type + +null (empty response body) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + + +## getUserByName + +> User getUserByName(username) + +Get user by user name + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing. + try { + User result = apiInstance.getUserByName(username); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#getUserByName"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The name that needs to be fetched. Use user1 for testing. | | + +### Return type + +[**User**](User.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + + +## loginUser + +> String loginUser(username, password) + +Logs user into the system + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | The user name for login + String password = "password_example"; // String | The password for login in clear text + try { + String result = apiInstance.loginUser(username, password); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#loginUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| The user name for login | | +| **password** | **String**| The password for login in clear text | | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * Set-Cookie - Cookie authentication key for use with the `api_key` apiKey authentication.
* X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
| +| **400** | Invalid username/password supplied | - | + + +## logoutUser + +> logoutUser() + +Logs out current logged in user session + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + UserApi apiInstance = new UserApi(defaultClient); + try { + apiInstance.logoutUser(); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#logoutUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +null (empty response body) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | successful operation | - | + + +## updateUser + +> updateUser(username, user) + +Updated user + +This can only be done by the logged in user. + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UserApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io/v2"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); + + UserApi apiInstance = new UserApi(defaultClient); + String username = "username_example"; // String | name that need to be deleted + User user = new User(); // User | Updated user object + try { + apiInstance.updateUser(username, user); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#updateUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| name that need to be deleted | | +| **user** | [**User**](User.md)| Updated user object | | + +### Return type + +null (empty response body) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid user supplied | - | +| **404** | User not found | - | + diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/api/DefaultApi.java b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/api/DefaultApi.java new file mode 100644 index 000000000000..373cfee20c16 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/api/DefaultApi.java @@ -0,0 +1,116 @@ +package org.openapitools.client.api; + +import org.openapitools.client.ApiClient; + +import org.openapitools.client.model.FakeWebhooksSourcesDeletedPostRequest; + +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Objects; +import java.util.Arrays; +import java.util.stream.Collectors; + +import org.springframework.core.io.FileSystemResource; +import org.springframework.core.ParameterizedTypeReference; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.util.LinkedMultiValueMap; +import org.springframework.util.MultiValueMap; +import org.springframework.web.client.RestClient.ResponseSpec; +import org.springframework.web.client.RestClientResponseException; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") +public class DefaultApi { + private ApiClient apiClient; + + public DefaultApi() { + this(new ApiClient()); + } + + public DefaultApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * + * + *

200 - successful operation + *

405 - Invalid input + * @param fakeWebhooksSourcesDeletedPostRequest The fakeWebhooksSourcesDeletedPostRequest parameter + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + private ResponseSpec fakeWebhooksSourcesDeletedPostRequestCreation(@jakarta.annotation.Nullable FakeWebhooksSourcesDeletedPostRequest fakeWebhooksSourcesDeletedPostRequest) throws RestClientResponseException { + Object postBody = fakeWebhooksSourcesDeletedPostRequest; + // create path and map variables + final Map pathParams = new HashMap<>(); + + final MultiValueMap queryParams = new LinkedMultiValueMap<>(); + final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap<>(); + final MultiValueMap formParams = new LinkedMultiValueMap<>(); + + final String[] localVarAccepts = { }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { + "application/json" + }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return apiClient.invokeAPI("/fake/webhooks/sources/deleted", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + + /** + * + * + *

200 - successful operation + *

405 - Invalid input + * @param fakeWebhooksSourcesDeletedPostRequest The fakeWebhooksSourcesDeletedPostRequest parameter + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public void fakeWebhooksSourcesDeletedPost(@jakarta.annotation.Nullable FakeWebhooksSourcesDeletedPostRequest fakeWebhooksSourcesDeletedPostRequest) throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + fakeWebhooksSourcesDeletedPostRequestCreation(fakeWebhooksSourcesDeletedPostRequest).body(localVarReturnType); + } + + /** + * + * + *

200 - successful operation + *

405 - Invalid input + * @param fakeWebhooksSourcesDeletedPostRequest The fakeWebhooksSourcesDeletedPostRequest parameter + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseEntity fakeWebhooksSourcesDeletedPostWithHttpInfo(@jakarta.annotation.Nullable FakeWebhooksSourcesDeletedPostRequest fakeWebhooksSourcesDeletedPostRequest) throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return fakeWebhooksSourcesDeletedPostRequestCreation(fakeWebhooksSourcesDeletedPostRequest).toEntity(localVarReturnType); + } + + /** + * + * + *

200 - successful operation + *

405 - Invalid input + * @param fakeWebhooksSourcesDeletedPostRequest The fakeWebhooksSourcesDeletedPostRequest parameter + * @return ResponseSpec + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseSpec fakeWebhooksSourcesDeletedPostWithResponseSpec(@jakarta.annotation.Nullable FakeWebhooksSourcesDeletedPostRequest fakeWebhooksSourcesDeletedPostRequest) throws RestClientResponseException { + return fakeWebhooksSourcesDeletedPostRequestCreation(fakeWebhooksSourcesDeletedPostRequest); + } +} diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/api/FakeApi.java new file mode 100644 index 000000000000..f06ae85eb3e6 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/api/FakeApi.java @@ -0,0 +1,862 @@ +package org.openapitools.client.api; + +import org.openapitools.client.ApiClient; + +import org.openapitools.client.model.CodesEnum; +import org.openapitools.client.model.RefRefToPathLevelParameterOneofRefToOneofParameter; +import org.openapitools.client.model.RefToRefParameterAnyofRefToAnyofParameter; +import java.util.UUID; + +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Objects; +import java.util.Arrays; +import java.util.stream.Collectors; + +import org.springframework.core.io.FileSystemResource; +import org.springframework.core.ParameterizedTypeReference; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.util.LinkedMultiValueMap; +import org.springframework.util.MultiValueMap; +import org.springframework.web.client.RestClient.ResponseSpec; +import org.springframework.web.client.RestClientResponseException; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") +public class FakeApi { + private ApiClient apiClient; + + public FakeApi() { + this(new ApiClient()); + } + + public FakeApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * + * + *

200 - + * @return Object + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + private ResponseSpec fakeInlineSchemaAnyofPath1GetRequestCreation() throws RestClientResponseException { + Object postBody = null; + // create path and map variables + final Map pathParams = new HashMap<>(); + + final MultiValueMap queryParams = new LinkedMultiValueMap<>(); + final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap<>(); + final MultiValueMap formParams = new LinkedMultiValueMap<>(); + + final String[] localVarAccepts = { + "application/json" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return apiClient.invokeAPI("/fake/inline/schema/anyof/path1", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + + /** + * + * + *

200 - + * @return Object + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public Object fakeInlineSchemaAnyofPath1Get() throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return fakeInlineSchemaAnyofPath1GetRequestCreation().body(localVarReturnType); + } + + /** + * + * + *

200 - + * @return ResponseEntity<Object> + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseEntity fakeInlineSchemaAnyofPath1GetWithHttpInfo() throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return fakeInlineSchemaAnyofPath1GetRequestCreation().toEntity(localVarReturnType); + } + + /** + * + * + *

200 - + * @return ResponseSpec + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseSpec fakeInlineSchemaAnyofPath1GetWithResponseSpec() throws RestClientResponseException { + return fakeInlineSchemaAnyofPath1GetRequestCreation(); + } + + /** + * + * + *

200 - + * @return Object + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + private ResponseSpec fakeInlineSchemaAnyofPath2GetRequestCreation() throws RestClientResponseException { + Object postBody = null; + // create path and map variables + final Map pathParams = new HashMap<>(); + + final MultiValueMap queryParams = new LinkedMultiValueMap<>(); + final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap<>(); + final MultiValueMap formParams = new LinkedMultiValueMap<>(); + + final String[] localVarAccepts = { + "application/json" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return apiClient.invokeAPI("/fake/inline/schema/anyof/path2", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + + /** + * + * + *

200 - + * @return Object + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public Object fakeInlineSchemaAnyofPath2Get() throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return fakeInlineSchemaAnyofPath2GetRequestCreation().body(localVarReturnType); + } + + /** + * + * + *

200 - + * @return ResponseEntity<Object> + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseEntity fakeInlineSchemaAnyofPath2GetWithHttpInfo() throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return fakeInlineSchemaAnyofPath2GetRequestCreation().toEntity(localVarReturnType); + } + + /** + * + * + *

200 - + * @return ResponseSpec + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseSpec fakeInlineSchemaAnyofPath2GetWithResponseSpec() throws RestClientResponseException { + return fakeInlineSchemaAnyofPath2GetRequestCreation(); + } + + /** + * + * + *

200 - + * @return List<Object> + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + private ResponseSpec fakeInlineSchemaAnyofPath3GetRequestCreation() throws RestClientResponseException { + Object postBody = null; + // create path and map variables + final Map pathParams = new HashMap<>(); + + final MultiValueMap queryParams = new LinkedMultiValueMap<>(); + final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap<>(); + final MultiValueMap formParams = new LinkedMultiValueMap<>(); + + final String[] localVarAccepts = { + "application/json" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference> localVarReturnType = new ParameterizedTypeReference<>() {}; + return apiClient.invokeAPI("/fake/inline/schema/anyof/path3", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + + /** + * + * + *

200 - + * @return List<Object> + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public List fakeInlineSchemaAnyofPath3Get() throws RestClientResponseException { + ParameterizedTypeReference> localVarReturnType = new ParameterizedTypeReference<>() {}; + return fakeInlineSchemaAnyofPath3GetRequestCreation().body(localVarReturnType); + } + + /** + * + * + *

200 - + * @return ResponseEntity<List<Object>> + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseEntity> fakeInlineSchemaAnyofPath3GetWithHttpInfo() throws RestClientResponseException { + ParameterizedTypeReference> localVarReturnType = new ParameterizedTypeReference<>() {}; + return fakeInlineSchemaAnyofPath3GetRequestCreation().toEntity(localVarReturnType); + } + + /** + * + * + *

200 - + * @return ResponseSpec + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseSpec fakeInlineSchemaAnyofPath3GetWithResponseSpec() throws RestClientResponseException { + return fakeInlineSchemaAnyofPath3GetRequestCreation(); + } + + /** + * op1 + * + *

201 - Successful Response + *

422 - Validation Error + * @return Object + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + private ResponseSpec op1RequestCreation() throws RestClientResponseException { + Object postBody = null; + // create path and map variables + final Map pathParams = new HashMap<>(); + + final MultiValueMap queryParams = new LinkedMultiValueMap<>(); + final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap<>(); + final MultiValueMap formParams = new LinkedMultiValueMap<>(); + + final String[] localVarAccepts = { + "application/json" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return apiClient.invokeAPI("/fake/api/changeowner", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + + /** + * op1 + * + *

201 - Successful Response + *

422 - Validation Error + * @return Object + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public Object op1() throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return op1RequestCreation().body(localVarReturnType); + } + + /** + * op1 + * + *

201 - Successful Response + *

422 - Validation Error + * @return ResponseEntity<Object> + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseEntity op1WithHttpInfo() throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return op1RequestCreation().toEntity(localVarReturnType); + } + + /** + * op1 + * + *

201 - Successful Response + *

422 - Validation Error + * @return ResponseSpec + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseSpec op1WithResponseSpec() throws RestClientResponseException { + return op1RequestCreation(); + } + + /** + * op2 + * + *

201 - Successful Response + *

422 - Validation Error + * @return Object + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + private ResponseSpec op2RequestCreation() throws RestClientResponseException { + Object postBody = null; + // create path and map variables + final Map pathParams = new HashMap<>(); + + final MultiValueMap queryParams = new LinkedMultiValueMap<>(); + final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap<>(); + final MultiValueMap formParams = new LinkedMultiValueMap<>(); + + final String[] localVarAccepts = { + "application/json" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return apiClient.invokeAPI("/fake/api/changename", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + + /** + * op2 + * + *

201 - Successful Response + *

422 - Validation Error + * @return Object + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public Object op2() throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return op2RequestCreation().body(localVarReturnType); + } + + /** + * op2 + * + *

201 - Successful Response + *

422 - Validation Error + * @return ResponseEntity<Object> + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseEntity op2WithHttpInfo() throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return op2RequestCreation().toEntity(localVarReturnType); + } + + /** + * op2 + * + *

201 - Successful Response + *

422 - Validation Error + * @return ResponseSpec + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseSpec op2WithResponseSpec() throws RestClientResponseException { + return op2RequestCreation(); + } + + /** + * op3 + * + *

200 - Successful Response + * @param queryEnum query enum test + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + private ResponseSpec op3RequestCreation(@jakarta.annotation.Nonnull List queryEnum) throws RestClientResponseException { + Object postBody = null; + // verify the required parameter 'queryEnum' is set + if (queryEnum == null) { + throw new RestClientResponseException("Missing the required parameter 'queryEnum' when calling op3", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); + } + // create path and map variables + final Map pathParams = new HashMap<>(); + + final MultiValueMap queryParams = new LinkedMultiValueMap<>(); + final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap<>(); + final MultiValueMap formParams = new LinkedMultiValueMap<>(); + + queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("multi".toUpperCase(Locale.ROOT)), "query_enum", queryEnum)); + + final String[] localVarAccepts = { }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return apiClient.invokeAPI("/fake/api/query/enum", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + + /** + * op3 + * + *

200 - Successful Response + * @param queryEnum query enum test + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public void op3(@jakarta.annotation.Nonnull List queryEnum) throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + op3RequestCreation(queryEnum).body(localVarReturnType); + } + + /** + * op3 + * + *

200 - Successful Response + * @param queryEnum query enum test + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseEntity op3WithHttpInfo(@jakarta.annotation.Nonnull List queryEnum) throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return op3RequestCreation(queryEnum).toEntity(localVarReturnType); + } + + /** + * op3 + * + *

200 - Successful Response + * @param queryEnum query enum test + * @return ResponseSpec + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseSpec op3WithResponseSpec(@jakarta.annotation.Nonnull List queryEnum) throws RestClientResponseException { + return op3RequestCreation(queryEnum); + } + + /** + * + * + *

200 - required to pass validation + * @param refToUuid to test ref to parameter (uuid) + * @return String + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + private ResponseSpec refToRefParameterRequestCreation(@jakarta.annotation.Nonnull UUID refToUuid) throws RestClientResponseException { + Object postBody = null; + // verify the required parameter 'refToUuid' is set + if (refToUuid == null) { + throw new RestClientResponseException("Missing the required parameter 'refToUuid' when calling refToRefParameter", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); + } + // create path and map variables + final Map pathParams = new HashMap<>(); + + final MultiValueMap queryParams = new LinkedMultiValueMap<>(); + final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap<>(); + final MultiValueMap formParams = new LinkedMultiValueMap<>(); + + if (refToUuid != null) + headerParams.add("ref_to_uuid", apiClient.parameterToString(refToUuid)); + final String[] localVarAccepts = { + "text/plain" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return apiClient.invokeAPI("/ref/ref_to_parameter", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + + /** + * + * + *

200 - required to pass validation + * @param refToUuid to test ref to parameter (uuid) + * @return String + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public String refToRefParameter(@jakarta.annotation.Nonnull UUID refToUuid) throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return refToRefParameterRequestCreation(refToUuid).body(localVarReturnType); + } + + /** + * + * + *

200 - required to pass validation + * @param refToUuid to test ref to parameter (uuid) + * @return ResponseEntity<String> + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseEntity refToRefParameterWithHttpInfo(@jakarta.annotation.Nonnull UUID refToUuid) throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return refToRefParameterRequestCreation(refToUuid).toEntity(localVarReturnType); + } + + /** + * + * + *

200 - required to pass validation + * @param refToUuid to test ref to parameter (uuid) + * @return ResponseSpec + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseSpec refToRefParameterWithResponseSpec(@jakarta.annotation.Nonnull UUID refToUuid) throws RestClientResponseException { + return refToRefParameterRequestCreation(refToUuid); + } + + /** + * + * to test $ref to operation level parameters + *

200 - Successful Response + * @param refToAnyof to test ref to parameter (anyof) + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + private ResponseSpec refToRefParameterAnyofRequestCreation(@jakarta.annotation.Nonnull RefToRefParameterAnyofRefToAnyofParameter refToAnyof) throws RestClientResponseException { + Object postBody = null; + // verify the required parameter 'refToAnyof' is set + if (refToAnyof == null) { + throw new RestClientResponseException("Missing the required parameter 'refToAnyof' when calling refToRefParameterAnyof", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); + } + // create path and map variables + final Map pathParams = new HashMap<>(); + + final MultiValueMap queryParams = new LinkedMultiValueMap<>(); + final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap<>(); + final MultiValueMap formParams = new LinkedMultiValueMap<>(); + + if (refToAnyof != null) + headerParams.add("ref_to_anyof", apiClient.parameterToString(refToAnyof)); + final String[] localVarAccepts = { }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return apiClient.invokeAPI("/ref/ref_to_operation_level_parameter_oneof", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + + /** + * + * to test $ref to operation level parameters + *

200 - Successful Response + * @param refToAnyof to test ref to parameter (anyof) + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public void refToRefParameterAnyof(@jakarta.annotation.Nonnull RefToRefParameterAnyofRefToAnyofParameter refToAnyof) throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + refToRefParameterAnyofRequestCreation(refToAnyof).body(localVarReturnType); + } + + /** + * + * to test $ref to operation level parameters + *

200 - Successful Response + * @param refToAnyof to test ref to parameter (anyof) + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseEntity refToRefParameterAnyofWithHttpInfo(@jakarta.annotation.Nonnull RefToRefParameterAnyofRefToAnyofParameter refToAnyof) throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return refToRefParameterAnyofRequestCreation(refToAnyof).toEntity(localVarReturnType); + } + + /** + * + * to test $ref to operation level parameters + *

200 - Successful Response + * @param refToAnyof to test ref to parameter (anyof) + * @return ResponseSpec + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseSpec refToRefParameterAnyofWithResponseSpec(@jakarta.annotation.Nonnull RefToRefParameterAnyofRefToAnyofParameter refToAnyof) throws RestClientResponseException { + return refToRefParameterAnyofRequestCreation(refToAnyof); + } + + /** + * + * to test $ref to path level parameters + *

200 - Successful Response + * @param refToOneof to test ref to parameter (oneof) + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + private ResponseSpec refToRefParameterOneofRequestCreation(@jakarta.annotation.Nonnull RefRefToPathLevelParameterOneofRefToOneofParameter refToOneof) throws RestClientResponseException { + Object postBody = null; + // verify the required parameter 'refToOneof' is set + if (refToOneof == null) { + throw new RestClientResponseException("Missing the required parameter 'refToOneof' when calling refToRefParameterOneof", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); + } + // create path and map variables + final Map pathParams = new HashMap<>(); + + final MultiValueMap queryParams = new LinkedMultiValueMap<>(); + final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap<>(); + final MultiValueMap formParams = new LinkedMultiValueMap<>(); + + if (refToOneof != null) + headerParams.add("ref_to_oneof", apiClient.parameterToString(refToOneof)); + final String[] localVarAccepts = { }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return apiClient.invokeAPI("/ref/ref_to_path_level_parameter_oneof", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + + /** + * + * to test $ref to path level parameters + *

200 - Successful Response + * @param refToOneof to test ref to parameter (oneof) + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public void refToRefParameterOneof(@jakarta.annotation.Nonnull RefRefToPathLevelParameterOneofRefToOneofParameter refToOneof) throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + refToRefParameterOneofRequestCreation(refToOneof).body(localVarReturnType); + } + + /** + * + * to test $ref to path level parameters + *

200 - Successful Response + * @param refToOneof to test ref to parameter (oneof) + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseEntity refToRefParameterOneofWithHttpInfo(@jakarta.annotation.Nonnull RefRefToPathLevelParameterOneofRefToOneofParameter refToOneof) throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return refToRefParameterOneofRequestCreation(refToOneof).toEntity(localVarReturnType); + } + + /** + * + * to test $ref to path level parameters + *

200 - Successful Response + * @param refToOneof to test ref to parameter (oneof) + * @return ResponseSpec + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseSpec refToRefParameterOneofWithResponseSpec(@jakarta.annotation.Nonnull RefRefToPathLevelParameterOneofRefToOneofParameter refToOneof) throws RestClientResponseException { + return refToRefParameterOneofRequestCreation(refToOneof); + } + + /** + * + * + *

200 - required to pass validation + * @return String + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + private ResponseSpec responseNoRefRequestCreation() throws RestClientResponseException { + Object postBody = null; + // create path and map variables + final Map pathParams = new HashMap<>(); + + final MultiValueMap queryParams = new LinkedMultiValueMap<>(); + final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap<>(); + final MultiValueMap formParams = new LinkedMultiValueMap<>(); + + final String[] localVarAccepts = { + "text/plain" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return apiClient.invokeAPI("/no_ref", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + + /** + * + * + *

200 - required to pass validation + * @return String + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public String responseNoRef() throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return responseNoRefRequestCreation().body(localVarReturnType); + } + + /** + * + * + *

200 - required to pass validation + * @return ResponseEntity<String> + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseEntity responseNoRefWithHttpInfo() throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return responseNoRefRequestCreation().toEntity(localVarReturnType); + } + + /** + * + * + *

200 - required to pass validation + * @return ResponseSpec + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseSpec responseNoRefWithResponseSpec() throws RestClientResponseException { + return responseNoRefRequestCreation(); + } + + /** + * + * + *

200 - required to pass validation + * @return String + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + private ResponseSpec responseRefToNoRefRequestCreation() throws RestClientResponseException { + Object postBody = null; + // create path and map variables + final Map pathParams = new HashMap<>(); + + final MultiValueMap queryParams = new LinkedMultiValueMap<>(); + final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap<>(); + final MultiValueMap formParams = new LinkedMultiValueMap<>(); + + final String[] localVarAccepts = { + "text/plain" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return apiClient.invokeAPI("/ref/no_ref", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + + /** + * + * + *

200 - required to pass validation + * @return String + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public String responseRefToNoRef() throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return responseRefToNoRefRequestCreation().body(localVarReturnType); + } + + /** + * + * + *

200 - required to pass validation + * @return ResponseEntity<String> + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseEntity responseRefToNoRefWithHttpInfo() throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return responseRefToNoRefRequestCreation().toEntity(localVarReturnType); + } + + /** + * + * + *

200 - required to pass validation + * @return ResponseSpec + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseSpec responseRefToNoRefWithResponseSpec() throws RestClientResponseException { + return responseRefToNoRefRequestCreation(); + } + + /** + * + * + *

200 - required to pass validation + * @return String + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + private ResponseSpec responseRefToRefRequestCreation() throws RestClientResponseException { + Object postBody = null; + // create path and map variables + final Map pathParams = new HashMap<>(); + + final MultiValueMap queryParams = new LinkedMultiValueMap<>(); + final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap<>(); + final MultiValueMap formParams = new LinkedMultiValueMap<>(); + + final String[] localVarAccepts = { + "text/plain" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return apiClient.invokeAPI("/ref/ref", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + + /** + * + * + *

200 - required to pass validation + * @return String + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public String responseRefToRef() throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return responseRefToRefRequestCreation().body(localVarReturnType); + } + + /** + * + * + *

200 - required to pass validation + * @return ResponseEntity<String> + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseEntity responseRefToRefWithHttpInfo() throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return responseRefToRefRequestCreation().toEntity(localVarReturnType); + } + + /** + * + * + *

200 - required to pass validation + * @return ResponseSpec + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseSpec responseRefToRefWithResponseSpec() throws RestClientResponseException { + return responseRefToRefRequestCreation(); + } +} diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/api/PetApi.java new file mode 100644 index 000000000000..3ac9094db93b --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/api/PetApi.java @@ -0,0 +1,716 @@ +package org.openapitools.client.api; + +import org.openapitools.client.ApiClient; + +import java.io.File; +import org.openapitools.client.model.ModelApiResponse; +import org.openapitools.client.model.Pet; + +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Objects; +import java.util.Arrays; +import java.util.stream.Collectors; + +import org.springframework.core.io.FileSystemResource; +import org.springframework.core.ParameterizedTypeReference; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.util.LinkedMultiValueMap; +import org.springframework.util.MultiValueMap; +import org.springframework.web.client.RestClient.ResponseSpec; +import org.springframework.web.client.RestClientResponseException; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") +public class PetApi { + private ApiClient apiClient; + + public PetApi() { + this(new ApiClient()); + } + + public PetApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Add a new pet to the store + * + *

200 - successful operation + *

405 - Invalid input + * @param pet Pet object that needs to be added to the store + * @return Pet + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + private ResponseSpec addPetRequestCreation(@jakarta.annotation.Nonnull Pet pet) throws RestClientResponseException { + Object postBody = pet; + // verify the required parameter 'pet' is set + if (pet == null) { + throw new RestClientResponseException("Missing the required parameter 'pet' when calling addPet", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); + } + // create path and map variables + final Map pathParams = new HashMap<>(); + + final MultiValueMap queryParams = new LinkedMultiValueMap<>(); + final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap<>(); + final MultiValueMap formParams = new LinkedMultiValueMap<>(); + + final String[] localVarAccepts = { + "application/xml", "application/json" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { + "application/json", "application/xml" + }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "petstore_auth" }; + + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return apiClient.invokeAPI("/pet", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + + /** + * Add a new pet to the store + * + *

200 - successful operation + *

405 - Invalid input + * @param pet Pet object that needs to be added to the store + * @return Pet + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public Pet addPet(@jakarta.annotation.Nonnull Pet pet) throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return addPetRequestCreation(pet).body(localVarReturnType); + } + + /** + * Add a new pet to the store + * + *

200 - successful operation + *

405 - Invalid input + * @param pet Pet object that needs to be added to the store + * @return ResponseEntity<Pet> + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseEntity addPetWithHttpInfo(@jakarta.annotation.Nonnull Pet pet) throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return addPetRequestCreation(pet).toEntity(localVarReturnType); + } + + /** + * Add a new pet to the store + * + *

200 - successful operation + *

405 - Invalid input + * @param pet Pet object that needs to be added to the store + * @return ResponseSpec + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseSpec addPetWithResponseSpec(@jakarta.annotation.Nonnull Pet pet) throws RestClientResponseException { + return addPetRequestCreation(pet); + } + + /** + * Deletes a pet + * + *

400 - Invalid pet value + * @param petId Pet id to delete + * @param apiKey The apiKey parameter + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + private ResponseSpec deletePetRequestCreation(@jakarta.annotation.Nonnull Long petId, @jakarta.annotation.Nullable String apiKey) throws RestClientResponseException { + Object postBody = null; + // verify the required parameter 'petId' is set + if (petId == null) { + throw new RestClientResponseException("Missing the required parameter 'petId' when calling deletePet", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); + } + // create path and map variables + final Map pathParams = new HashMap<>(); + + pathParams.put("petId", petId); + + final MultiValueMap queryParams = new LinkedMultiValueMap<>(); + final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap<>(); + final MultiValueMap formParams = new LinkedMultiValueMap<>(); + + if (apiKey != null) + headerParams.add("api_key", apiClient.parameterToString(apiKey)); + final String[] localVarAccepts = { }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "petstore_auth" }; + + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return apiClient.invokeAPI("/pet/{petId}", HttpMethod.DELETE, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + + /** + * Deletes a pet + * + *

400 - Invalid pet value + * @param petId Pet id to delete + * @param apiKey The apiKey parameter + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public void deletePet(@jakarta.annotation.Nonnull Long petId, @jakarta.annotation.Nullable String apiKey) throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + deletePetRequestCreation(petId, apiKey).body(localVarReturnType); + } + + /** + * Deletes a pet + * + *

400 - Invalid pet value + * @param petId Pet id to delete + * @param apiKey The apiKey parameter + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseEntity deletePetWithHttpInfo(@jakarta.annotation.Nonnull Long petId, @jakarta.annotation.Nullable String apiKey) throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return deletePetRequestCreation(petId, apiKey).toEntity(localVarReturnType); + } + + /** + * Deletes a pet + * + *

400 - Invalid pet value + * @param petId Pet id to delete + * @param apiKey The apiKey parameter + * @return ResponseSpec + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseSpec deletePetWithResponseSpec(@jakarta.annotation.Nonnull Long petId, @jakarta.annotation.Nullable String apiKey) throws RestClientResponseException { + return deletePetRequestCreation(petId, apiKey); + } + + /** + * Finds Pets by status + * Multiple status values can be provided with comma separated strings + *

200 - successful operation + *

400 - Invalid status value + * @param status Status values that need to be considered for filter + * @return List<Pet> + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + private ResponseSpec findPetsByStatusRequestCreation(@jakarta.annotation.Nonnull List status) throws RestClientResponseException { + Object postBody = null; + // verify the required parameter 'status' is set + if (status == null) { + throw new RestClientResponseException("Missing the required parameter 'status' when calling findPetsByStatus", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); + } + // create path and map variables + final Map pathParams = new HashMap<>(); + + final MultiValueMap queryParams = new LinkedMultiValueMap<>(); + final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap<>(); + final MultiValueMap formParams = new LinkedMultiValueMap<>(); + + queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("csv".toUpperCase(Locale.ROOT)), "status", status)); + + final String[] localVarAccepts = { + "application/xml", "application/json" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "petstore_auth" }; + + ParameterizedTypeReference> localVarReturnType = new ParameterizedTypeReference<>() {}; + return apiClient.invokeAPI("/pet/findByStatus", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + + /** + * Finds Pets by status + * Multiple status values can be provided with comma separated strings + *

200 - successful operation + *

400 - Invalid status value + * @param status Status values that need to be considered for filter + * @return List<Pet> + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public List findPetsByStatus(@jakarta.annotation.Nonnull List status) throws RestClientResponseException { + ParameterizedTypeReference> localVarReturnType = new ParameterizedTypeReference<>() {}; + return findPetsByStatusRequestCreation(status).body(localVarReturnType); + } + + /** + * Finds Pets by status + * Multiple status values can be provided with comma separated strings + *

200 - successful operation + *

400 - Invalid status value + * @param status Status values that need to be considered for filter + * @return ResponseEntity<List<Pet>> + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseEntity> findPetsByStatusWithHttpInfo(@jakarta.annotation.Nonnull List status) throws RestClientResponseException { + ParameterizedTypeReference> localVarReturnType = new ParameterizedTypeReference<>() {}; + return findPetsByStatusRequestCreation(status).toEntity(localVarReturnType); + } + + /** + * Finds Pets by status + * Multiple status values can be provided with comma separated strings + *

200 - successful operation + *

400 - Invalid status value + * @param status Status values that need to be considered for filter + * @return ResponseSpec + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseSpec findPetsByStatusWithResponseSpec(@jakarta.annotation.Nonnull List status) throws RestClientResponseException { + return findPetsByStatusRequestCreation(status); + } + + /** + * Finds Pets by tags + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + *

200 - successful operation + *

400 - Invalid tag value + * @param tags Tags to filter by + * @return List<Pet> + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + * @deprecated + */ + @Deprecated + private ResponseSpec findPetsByTagsRequestCreation(@jakarta.annotation.Nonnull List tags) throws RestClientResponseException { + Object postBody = null; + // verify the required parameter 'tags' is set + if (tags == null) { + throw new RestClientResponseException("Missing the required parameter 'tags' when calling findPetsByTags", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); + } + // create path and map variables + final Map pathParams = new HashMap<>(); + + final MultiValueMap queryParams = new LinkedMultiValueMap<>(); + final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap<>(); + final MultiValueMap formParams = new LinkedMultiValueMap<>(); + + queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("csv".toUpperCase(Locale.ROOT)), "tags", tags)); + + final String[] localVarAccepts = { + "application/xml", "application/json" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "petstore_auth" }; + + ParameterizedTypeReference> localVarReturnType = new ParameterizedTypeReference<>() {}; + return apiClient.invokeAPI("/pet/findByTags", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + + /** + * Finds Pets by tags + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + *

200 - successful operation + *

400 - Invalid tag value + * @param tags Tags to filter by + * @return List<Pet> + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public List findPetsByTags(@jakarta.annotation.Nonnull List tags) throws RestClientResponseException { + ParameterizedTypeReference> localVarReturnType = new ParameterizedTypeReference<>() {}; + return findPetsByTagsRequestCreation(tags).body(localVarReturnType); + } + + /** + * Finds Pets by tags + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + *

200 - successful operation + *

400 - Invalid tag value + * @param tags Tags to filter by + * @return ResponseEntity<List<Pet>> + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseEntity> findPetsByTagsWithHttpInfo(@jakarta.annotation.Nonnull List tags) throws RestClientResponseException { + ParameterizedTypeReference> localVarReturnType = new ParameterizedTypeReference<>() {}; + return findPetsByTagsRequestCreation(tags).toEntity(localVarReturnType); + } + + /** + * Finds Pets by tags + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + *

200 - successful operation + *

400 - Invalid tag value + * @param tags Tags to filter by + * @return ResponseSpec + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseSpec findPetsByTagsWithResponseSpec(@jakarta.annotation.Nonnull List tags) throws RestClientResponseException { + return findPetsByTagsRequestCreation(tags); + } + + /** + * Find pet by ID + * Returns a single pet + *

200 - successful operation + *

400 - Invalid ID supplied + *

404 - Pet not found + * @param petId ID of pet to return + * @return Pet + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + private ResponseSpec getPetByIdRequestCreation(@jakarta.annotation.Nonnull Long petId) throws RestClientResponseException { + Object postBody = null; + // verify the required parameter 'petId' is set + if (petId == null) { + throw new RestClientResponseException("Missing the required parameter 'petId' when calling getPetById", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); + } + // create path and map variables + final Map pathParams = new HashMap<>(); + + pathParams.put("petId", petId); + + final MultiValueMap queryParams = new LinkedMultiValueMap<>(); + final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap<>(); + final MultiValueMap formParams = new LinkedMultiValueMap<>(); + + final String[] localVarAccepts = { + "application/xml", "application/json" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "api_key" }; + + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return apiClient.invokeAPI("/pet/{petId}", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + + /** + * Find pet by ID + * Returns a single pet + *

200 - successful operation + *

400 - Invalid ID supplied + *

404 - Pet not found + * @param petId ID of pet to return + * @return Pet + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public Pet getPetById(@jakarta.annotation.Nonnull Long petId) throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return getPetByIdRequestCreation(petId).body(localVarReturnType); + } + + /** + * Find pet by ID + * Returns a single pet + *

200 - successful operation + *

400 - Invalid ID supplied + *

404 - Pet not found + * @param petId ID of pet to return + * @return ResponseEntity<Pet> + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseEntity getPetByIdWithHttpInfo(@jakarta.annotation.Nonnull Long petId) throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return getPetByIdRequestCreation(petId).toEntity(localVarReturnType); + } + + /** + * Find pet by ID + * Returns a single pet + *

200 - successful operation + *

400 - Invalid ID supplied + *

404 - Pet not found + * @param petId ID of pet to return + * @return ResponseSpec + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseSpec getPetByIdWithResponseSpec(@jakarta.annotation.Nonnull Long petId) throws RestClientResponseException { + return getPetByIdRequestCreation(petId); + } + + /** + * Update an existing pet + * + *

200 - successful operation + *

400 - Invalid ID supplied + *

404 - Pet not found + *

405 - Validation exception + * @param pet Pet object that needs to be added to the store + * @return Pet + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + * API documentation for the updatePet operation + * @see Update an existing pet Documentation + */ + private ResponseSpec updatePetRequestCreation(@jakarta.annotation.Nonnull Pet pet) throws RestClientResponseException { + Object postBody = pet; + // verify the required parameter 'pet' is set + if (pet == null) { + throw new RestClientResponseException("Missing the required parameter 'pet' when calling updatePet", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); + } + // create path and map variables + final Map pathParams = new HashMap<>(); + + final MultiValueMap queryParams = new LinkedMultiValueMap<>(); + final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap<>(); + final MultiValueMap formParams = new LinkedMultiValueMap<>(); + + final String[] localVarAccepts = { + "application/xml", "application/json" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { + "application/json", "application/xml" + }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "petstore_auth" }; + + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return apiClient.invokeAPI("/pet", HttpMethod.PUT, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + + /** + * Update an existing pet + * + *

200 - successful operation + *

400 - Invalid ID supplied + *

404 - Pet not found + *

405 - Validation exception + * @param pet Pet object that needs to be added to the store + * @return Pet + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + * API documentation for the updatePet operation + * @see Update an existing pet Documentation + */ + public Pet updatePet(@jakarta.annotation.Nonnull Pet pet) throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return updatePetRequestCreation(pet).body(localVarReturnType); + } + + /** + * Update an existing pet + * + *

200 - successful operation + *

400 - Invalid ID supplied + *

404 - Pet not found + *

405 - Validation exception + * @param pet Pet object that needs to be added to the store + * @return ResponseEntity<Pet> + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + * API documentation for the updatePet operation + * @see Update an existing pet Documentation + */ + public ResponseEntity updatePetWithHttpInfo(@jakarta.annotation.Nonnull Pet pet) throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return updatePetRequestCreation(pet).toEntity(localVarReturnType); + } + + /** + * Update an existing pet + * + *

200 - successful operation + *

400 - Invalid ID supplied + *

404 - Pet not found + *

405 - Validation exception + * @param pet Pet object that needs to be added to the store + * @return ResponseSpec + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + * API documentation for the updatePet operation + * @see Update an existing pet Documentation + */ + public ResponseSpec updatePetWithResponseSpec(@jakarta.annotation.Nonnull Pet pet) throws RestClientResponseException { + return updatePetRequestCreation(pet); + } + + /** + * Updates a pet in the store with form data + * + *

405 - Invalid input + * @param petId ID of pet that needs to be updated + * @param name Updated name of the pet + * @param status Updated status of the pet + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + private ResponseSpec updatePetWithFormRequestCreation(@jakarta.annotation.Nonnull Long petId, @jakarta.annotation.Nullable String name, @jakarta.annotation.Nullable String status) throws RestClientResponseException { + Object postBody = null; + // verify the required parameter 'petId' is set + if (petId == null) { + throw new RestClientResponseException("Missing the required parameter 'petId' when calling updatePetWithForm", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); + } + // create path and map variables + final Map pathParams = new HashMap<>(); + + pathParams.put("petId", petId); + + final MultiValueMap queryParams = new LinkedMultiValueMap<>(); + final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap<>(); + final MultiValueMap formParams = new LinkedMultiValueMap<>(); + + if (name != null) + formParams.add("name", name); + if (status != null) + formParams.add("status", status); + + final String[] localVarAccepts = { }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { + "application/x-www-form-urlencoded" + }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "petstore_auth" }; + + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return apiClient.invokeAPI("/pet/{petId}", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + + /** + * Updates a pet in the store with form data + * + *

405 - Invalid input + * @param petId ID of pet that needs to be updated + * @param name Updated name of the pet + * @param status Updated status of the pet + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public void updatePetWithForm(@jakarta.annotation.Nonnull Long petId, @jakarta.annotation.Nullable String name, @jakarta.annotation.Nullable String status) throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + updatePetWithFormRequestCreation(petId, name, status).body(localVarReturnType); + } + + /** + * Updates a pet in the store with form data + * + *

405 - Invalid input + * @param petId ID of pet that needs to be updated + * @param name Updated name of the pet + * @param status Updated status of the pet + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseEntity updatePetWithFormWithHttpInfo(@jakarta.annotation.Nonnull Long petId, @jakarta.annotation.Nullable String name, @jakarta.annotation.Nullable String status) throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return updatePetWithFormRequestCreation(petId, name, status).toEntity(localVarReturnType); + } + + /** + * Updates a pet in the store with form data + * + *

405 - Invalid input + * @param petId ID of pet that needs to be updated + * @param name Updated name of the pet + * @param status Updated status of the pet + * @return ResponseSpec + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseSpec updatePetWithFormWithResponseSpec(@jakarta.annotation.Nonnull Long petId, @jakarta.annotation.Nullable String name, @jakarta.annotation.Nullable String status) throws RestClientResponseException { + return updatePetWithFormRequestCreation(petId, name, status); + } + + /** + * uploads an image + * + *

200 - successful operation + * @param petId ID of pet to update + * @param additionalMetadata Additional data to pass to server + * @param _file file to upload + * @return ModelApiResponse + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + private ResponseSpec uploadFileRequestCreation(@jakarta.annotation.Nonnull Long petId, @jakarta.annotation.Nullable String additionalMetadata, @jakarta.annotation.Nullable File _file) throws RestClientResponseException { + Object postBody = null; + // verify the required parameter 'petId' is set + if (petId == null) { + throw new RestClientResponseException("Missing the required parameter 'petId' when calling uploadFile", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); + } + // create path and map variables + final Map pathParams = new HashMap<>(); + + pathParams.put("petId", petId); + + final MultiValueMap queryParams = new LinkedMultiValueMap<>(); + final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap<>(); + final MultiValueMap formParams = new LinkedMultiValueMap<>(); + + if (additionalMetadata != null) + formParams.add("additionalMetadata", additionalMetadata); + if (_file != null) + formParams.add("file", new FileSystemResource(_file)); + + final String[] localVarAccepts = { + "application/json" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { + "multipart/form-data" + }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "petstore_auth" }; + + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return apiClient.invokeAPI("/pet/{petId}/uploadImage", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + + /** + * uploads an image + * + *

200 - successful operation + * @param petId ID of pet to update + * @param additionalMetadata Additional data to pass to server + * @param _file file to upload + * @return ModelApiResponse + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ModelApiResponse uploadFile(@jakarta.annotation.Nonnull Long petId, @jakarta.annotation.Nullable String additionalMetadata, @jakarta.annotation.Nullable File _file) throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return uploadFileRequestCreation(petId, additionalMetadata, _file).body(localVarReturnType); + } + + /** + * uploads an image + * + *

200 - successful operation + * @param petId ID of pet to update + * @param additionalMetadata Additional data to pass to server + * @param _file file to upload + * @return ResponseEntity<ModelApiResponse> + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseEntity uploadFileWithHttpInfo(@jakarta.annotation.Nonnull Long petId, @jakarta.annotation.Nullable String additionalMetadata, @jakarta.annotation.Nullable File _file) throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return uploadFileRequestCreation(petId, additionalMetadata, _file).toEntity(localVarReturnType); + } + + /** + * uploads an image + * + *

200 - successful operation + * @param petId ID of pet to update + * @param additionalMetadata Additional data to pass to server + * @param _file file to upload + * @return ResponseSpec + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseSpec uploadFileWithResponseSpec(@jakarta.annotation.Nonnull Long petId, @jakarta.annotation.Nullable String additionalMetadata, @jakarta.annotation.Nullable File _file) throws RestClientResponseException { + return uploadFileRequestCreation(petId, additionalMetadata, _file); + } +} diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/api/StoreApi.java new file mode 100644 index 000000000000..d88f5aa54dae --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/api/StoreApi.java @@ -0,0 +1,347 @@ +package org.openapitools.client.api; + +import org.openapitools.client.ApiClient; + +import org.openapitools.client.model.Order; + +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Objects; +import java.util.Arrays; +import java.util.stream.Collectors; + +import org.springframework.core.io.FileSystemResource; +import org.springframework.core.ParameterizedTypeReference; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.util.LinkedMultiValueMap; +import org.springframework.util.MultiValueMap; +import org.springframework.web.client.RestClient.ResponseSpec; +import org.springframework.web.client.RestClientResponseException; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") +public class StoreApi { + private ApiClient apiClient; + + public StoreApi() { + this(new ApiClient()); + } + + public StoreApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Delete purchase order by ID + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + *

400 - Invalid ID supplied + *

404 - Order not found + * @param orderId ID of the order that needs to be deleted + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + private ResponseSpec deleteOrderRequestCreation(@jakarta.annotation.Nonnull String orderId) throws RestClientResponseException { + Object postBody = null; + // verify the required parameter 'orderId' is set + if (orderId == null) { + throw new RestClientResponseException("Missing the required parameter 'orderId' when calling deleteOrder", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); + } + // create path and map variables + final Map pathParams = new HashMap<>(); + + pathParams.put("orderId", orderId); + + final MultiValueMap queryParams = new LinkedMultiValueMap<>(); + final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap<>(); + final MultiValueMap formParams = new LinkedMultiValueMap<>(); + + final String[] localVarAccepts = { }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return apiClient.invokeAPI("/store/order/{orderId}", HttpMethod.DELETE, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + + /** + * Delete purchase order by ID + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + *

400 - Invalid ID supplied + *

404 - Order not found + * @param orderId ID of the order that needs to be deleted + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public void deleteOrder(@jakarta.annotation.Nonnull String orderId) throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + deleteOrderRequestCreation(orderId).body(localVarReturnType); + } + + /** + * Delete purchase order by ID + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + *

400 - Invalid ID supplied + *

404 - Order not found + * @param orderId ID of the order that needs to be deleted + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseEntity deleteOrderWithHttpInfo(@jakarta.annotation.Nonnull String orderId) throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return deleteOrderRequestCreation(orderId).toEntity(localVarReturnType); + } + + /** + * Delete purchase order by ID + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + *

400 - Invalid ID supplied + *

404 - Order not found + * @param orderId ID of the order that needs to be deleted + * @return ResponseSpec + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseSpec deleteOrderWithResponseSpec(@jakarta.annotation.Nonnull String orderId) throws RestClientResponseException { + return deleteOrderRequestCreation(orderId); + } + + /** + * Returns pet inventories by status + * Returns a map of status codes to quantities + *

200 - successful operation + * @return Map<String, Integer> + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + private ResponseSpec getInventoryRequestCreation() throws RestClientResponseException { + Object postBody = null; + // create path and map variables + final Map pathParams = new HashMap<>(); + + final MultiValueMap queryParams = new LinkedMultiValueMap<>(); + final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap<>(); + final MultiValueMap formParams = new LinkedMultiValueMap<>(); + + final String[] localVarAccepts = { + "application/json" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "api_key" }; + + ParameterizedTypeReference> localVarReturnType = new ParameterizedTypeReference<>() {}; + return apiClient.invokeAPI("/store/inventory", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + + /** + * Returns pet inventories by status + * Returns a map of status codes to quantities + *

200 - successful operation + * @return Map<String, Integer> + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public Map getInventory() throws RestClientResponseException { + ParameterizedTypeReference> localVarReturnType = new ParameterizedTypeReference<>() {}; + return getInventoryRequestCreation().body(localVarReturnType); + } + + /** + * Returns pet inventories by status + * Returns a map of status codes to quantities + *

200 - successful operation + * @return ResponseEntity<Map<String, Integer>> + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseEntity> getInventoryWithHttpInfo() throws RestClientResponseException { + ParameterizedTypeReference> localVarReturnType = new ParameterizedTypeReference<>() {}; + return getInventoryRequestCreation().toEntity(localVarReturnType); + } + + /** + * Returns pet inventories by status + * Returns a map of status codes to quantities + *

200 - successful operation + * @return ResponseSpec + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseSpec getInventoryWithResponseSpec() throws RestClientResponseException { + return getInventoryRequestCreation(); + } + + /** + * Find purchase order by ID + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions + *

200 - successful operation + *

400 - Invalid ID supplied + *

404 - Order not found + * @param orderId ID of pet that needs to be fetched + * @return Order + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + private ResponseSpec getOrderByIdRequestCreation(@jakarta.annotation.Nonnull Long orderId) throws RestClientResponseException { + Object postBody = null; + // verify the required parameter 'orderId' is set + if (orderId == null) { + throw new RestClientResponseException("Missing the required parameter 'orderId' when calling getOrderById", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); + } + // create path and map variables + final Map pathParams = new HashMap<>(); + + pathParams.put("orderId", orderId); + + final MultiValueMap queryParams = new LinkedMultiValueMap<>(); + final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap<>(); + final MultiValueMap formParams = new LinkedMultiValueMap<>(); + + final String[] localVarAccepts = { + "application/xml", "application/json" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return apiClient.invokeAPI("/store/order/{orderId}", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + + /** + * Find purchase order by ID + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions + *

200 - successful operation + *

400 - Invalid ID supplied + *

404 - Order not found + * @param orderId ID of pet that needs to be fetched + * @return Order + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public Order getOrderById(@jakarta.annotation.Nonnull Long orderId) throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return getOrderByIdRequestCreation(orderId).body(localVarReturnType); + } + + /** + * Find purchase order by ID + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions + *

200 - successful operation + *

400 - Invalid ID supplied + *

404 - Order not found + * @param orderId ID of pet that needs to be fetched + * @return ResponseEntity<Order> + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseEntity getOrderByIdWithHttpInfo(@jakarta.annotation.Nonnull Long orderId) throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return getOrderByIdRequestCreation(orderId).toEntity(localVarReturnType); + } + + /** + * Find purchase order by ID + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions + *

200 - successful operation + *

400 - Invalid ID supplied + *

404 - Order not found + * @param orderId ID of pet that needs to be fetched + * @return ResponseSpec + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseSpec getOrderByIdWithResponseSpec(@jakarta.annotation.Nonnull Long orderId) throws RestClientResponseException { + return getOrderByIdRequestCreation(orderId); + } + + /** + * Place an order for a pet + * + *

200 - successful operation + *

400 - Invalid Order + * @param order order placed for purchasing the pet + * @return Order + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + private ResponseSpec placeOrderRequestCreation(@jakarta.annotation.Nonnull Order order) throws RestClientResponseException { + Object postBody = order; + // verify the required parameter 'order' is set + if (order == null) { + throw new RestClientResponseException("Missing the required parameter 'order' when calling placeOrder", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); + } + // create path and map variables + final Map pathParams = new HashMap<>(); + + final MultiValueMap queryParams = new LinkedMultiValueMap<>(); + final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap<>(); + final MultiValueMap formParams = new LinkedMultiValueMap<>(); + + final String[] localVarAccepts = { + "application/xml", "application/json" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { + "application/json" + }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return apiClient.invokeAPI("/store/order", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + + /** + * Place an order for a pet + * + *

200 - successful operation + *

400 - Invalid Order + * @param order order placed for purchasing the pet + * @return Order + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public Order placeOrder(@jakarta.annotation.Nonnull Order order) throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return placeOrderRequestCreation(order).body(localVarReturnType); + } + + /** + * Place an order for a pet + * + *

200 - successful operation + *

400 - Invalid Order + * @param order order placed for purchasing the pet + * @return ResponseEntity<Order> + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseEntity placeOrderWithHttpInfo(@jakarta.annotation.Nonnull Order order) throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return placeOrderRequestCreation(order).toEntity(localVarReturnType); + } + + /** + * Place an order for a pet + * + *

200 - successful operation + *

400 - Invalid Order + * @param order order placed for purchasing the pet + * @return ResponseSpec + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseSpec placeOrderWithResponseSpec(@jakarta.annotation.Nonnull Order order) throws RestClientResponseException { + return placeOrderRequestCreation(order); + } +} diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/api/UserApi.java new file mode 100644 index 000000000000..faef6b175a95 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/api/UserApi.java @@ -0,0 +1,646 @@ +package org.openapitools.client.api; + +import org.openapitools.client.ApiClient; + +import java.time.OffsetDateTime; +import org.openapitools.client.model.User; + +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Objects; +import java.util.Arrays; +import java.util.stream.Collectors; + +import org.springframework.core.io.FileSystemResource; +import org.springframework.core.ParameterizedTypeReference; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.util.LinkedMultiValueMap; +import org.springframework.util.MultiValueMap; +import org.springframework.web.client.RestClient.ResponseSpec; +import org.springframework.web.client.RestClientResponseException; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") +public class UserApi { + private ApiClient apiClient; + + public UserApi() { + this(new ApiClient()); + } + + public UserApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Create user + * This can only be done by the logged in user. + *

0 - successful operation + * @param user Created user object + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + private ResponseSpec createUserRequestCreation(@jakarta.annotation.Nonnull User user) throws RestClientResponseException { + Object postBody = user; + // verify the required parameter 'user' is set + if (user == null) { + throw new RestClientResponseException("Missing the required parameter 'user' when calling createUser", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); + } + // create path and map variables + final Map pathParams = new HashMap<>(); + + final MultiValueMap queryParams = new LinkedMultiValueMap<>(); + final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap<>(); + final MultiValueMap formParams = new LinkedMultiValueMap<>(); + + final String[] localVarAccepts = { }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { + "application/json" + }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "api_key" }; + + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return apiClient.invokeAPI("/user", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + + /** + * Create user + * This can only be done by the logged in user. + *

0 - successful operation + * @param user Created user object + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public void createUser(@jakarta.annotation.Nonnull User user) throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + createUserRequestCreation(user).body(localVarReturnType); + } + + /** + * Create user + * This can only be done by the logged in user. + *

0 - successful operation + * @param user Created user object + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseEntity createUserWithHttpInfo(@jakarta.annotation.Nonnull User user) throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return createUserRequestCreation(user).toEntity(localVarReturnType); + } + + /** + * Create user + * This can only be done by the logged in user. + *

0 - successful operation + * @param user Created user object + * @return ResponseSpec + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseSpec createUserWithResponseSpec(@jakarta.annotation.Nonnull User user) throws RestClientResponseException { + return createUserRequestCreation(user); + } + + /** + * Creates list of users with given input array + * + *

0 - successful operation + * @param user List of user object + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + private ResponseSpec createUsersWithArrayInputRequestCreation(@jakarta.annotation.Nonnull List user) throws RestClientResponseException { + Object postBody = user; + // verify the required parameter 'user' is set + if (user == null) { + throw new RestClientResponseException("Missing the required parameter 'user' when calling createUsersWithArrayInput", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); + } + // create path and map variables + final Map pathParams = new HashMap<>(); + + final MultiValueMap queryParams = new LinkedMultiValueMap<>(); + final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap<>(); + final MultiValueMap formParams = new LinkedMultiValueMap<>(); + + final String[] localVarAccepts = { }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { + "application/json" + }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "api_key" }; + + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return apiClient.invokeAPI("/user/createWithArray", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + + /** + * Creates list of users with given input array + * + *

0 - successful operation + * @param user List of user object + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public void createUsersWithArrayInput(@jakarta.annotation.Nonnull List user) throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + createUsersWithArrayInputRequestCreation(user).body(localVarReturnType); + } + + /** + * Creates list of users with given input array + * + *

0 - successful operation + * @param user List of user object + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseEntity createUsersWithArrayInputWithHttpInfo(@jakarta.annotation.Nonnull List user) throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return createUsersWithArrayInputRequestCreation(user).toEntity(localVarReturnType); + } + + /** + * Creates list of users with given input array + * + *

0 - successful operation + * @param user List of user object + * @return ResponseSpec + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseSpec createUsersWithArrayInputWithResponseSpec(@jakarta.annotation.Nonnull List user) throws RestClientResponseException { + return createUsersWithArrayInputRequestCreation(user); + } + + /** + * Creates list of users with given input array + * + *

0 - successful operation + * @param user List of user object + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + private ResponseSpec createUsersWithListInputRequestCreation(@jakarta.annotation.Nonnull List user) throws RestClientResponseException { + Object postBody = user; + // verify the required parameter 'user' is set + if (user == null) { + throw new RestClientResponseException("Missing the required parameter 'user' when calling createUsersWithListInput", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); + } + // create path and map variables + final Map pathParams = new HashMap<>(); + + final MultiValueMap queryParams = new LinkedMultiValueMap<>(); + final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap<>(); + final MultiValueMap formParams = new LinkedMultiValueMap<>(); + + final String[] localVarAccepts = { }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { + "application/json" + }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "api_key" }; + + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return apiClient.invokeAPI("/user/createWithList", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + + /** + * Creates list of users with given input array + * + *

0 - successful operation + * @param user List of user object + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public void createUsersWithListInput(@jakarta.annotation.Nonnull List user) throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + createUsersWithListInputRequestCreation(user).body(localVarReturnType); + } + + /** + * Creates list of users with given input array + * + *

0 - successful operation + * @param user List of user object + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseEntity createUsersWithListInputWithHttpInfo(@jakarta.annotation.Nonnull List user) throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return createUsersWithListInputRequestCreation(user).toEntity(localVarReturnType); + } + + /** + * Creates list of users with given input array + * + *

0 - successful operation + * @param user List of user object + * @return ResponseSpec + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseSpec createUsersWithListInputWithResponseSpec(@jakarta.annotation.Nonnull List user) throws RestClientResponseException { + return createUsersWithListInputRequestCreation(user); + } + + /** + * Delete user + * This can only be done by the logged in user. + *

400 - Invalid username supplied + *

404 - User not found + * @param username The name that needs to be deleted + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + private ResponseSpec deleteUserRequestCreation(@jakarta.annotation.Nonnull String username) throws RestClientResponseException { + Object postBody = null; + // verify the required parameter 'username' is set + if (username == null) { + throw new RestClientResponseException("Missing the required parameter 'username' when calling deleteUser", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); + } + // create path and map variables + final Map pathParams = new HashMap<>(); + + pathParams.put("username", username); + + final MultiValueMap queryParams = new LinkedMultiValueMap<>(); + final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap<>(); + final MultiValueMap formParams = new LinkedMultiValueMap<>(); + + final String[] localVarAccepts = { }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "api_key" }; + + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return apiClient.invokeAPI("/user/{username}", HttpMethod.DELETE, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + + /** + * Delete user + * This can only be done by the logged in user. + *

400 - Invalid username supplied + *

404 - User not found + * @param username The name that needs to be deleted + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public void deleteUser(@jakarta.annotation.Nonnull String username) throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + deleteUserRequestCreation(username).body(localVarReturnType); + } + + /** + * Delete user + * This can only be done by the logged in user. + *

400 - Invalid username supplied + *

404 - User not found + * @param username The name that needs to be deleted + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseEntity deleteUserWithHttpInfo(@jakarta.annotation.Nonnull String username) throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return deleteUserRequestCreation(username).toEntity(localVarReturnType); + } + + /** + * Delete user + * This can only be done by the logged in user. + *

400 - Invalid username supplied + *

404 - User not found + * @param username The name that needs to be deleted + * @return ResponseSpec + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseSpec deleteUserWithResponseSpec(@jakarta.annotation.Nonnull String username) throws RestClientResponseException { + return deleteUserRequestCreation(username); + } + + /** + * Get user by user name + * + *

200 - successful operation + *

400 - Invalid username supplied + *

404 - User not found + * @param username The name that needs to be fetched. Use user1 for testing. + * @return User + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + private ResponseSpec getUserByNameRequestCreation(@jakarta.annotation.Nonnull String username) throws RestClientResponseException { + Object postBody = null; + // verify the required parameter 'username' is set + if (username == null) { + throw new RestClientResponseException("Missing the required parameter 'username' when calling getUserByName", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); + } + // create path and map variables + final Map pathParams = new HashMap<>(); + + pathParams.put("username", username); + + final MultiValueMap queryParams = new LinkedMultiValueMap<>(); + final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap<>(); + final MultiValueMap formParams = new LinkedMultiValueMap<>(); + + final String[] localVarAccepts = { + "application/xml", "application/json" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return apiClient.invokeAPI("/user/{username}", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + + /** + * Get user by user name + * + *

200 - successful operation + *

400 - Invalid username supplied + *

404 - User not found + * @param username The name that needs to be fetched. Use user1 for testing. + * @return User + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public User getUserByName(@jakarta.annotation.Nonnull String username) throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return getUserByNameRequestCreation(username).body(localVarReturnType); + } + + /** + * Get user by user name + * + *

200 - successful operation + *

400 - Invalid username supplied + *

404 - User not found + * @param username The name that needs to be fetched. Use user1 for testing. + * @return ResponseEntity<User> + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseEntity getUserByNameWithHttpInfo(@jakarta.annotation.Nonnull String username) throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return getUserByNameRequestCreation(username).toEntity(localVarReturnType); + } + + /** + * Get user by user name + * + *

200 - successful operation + *

400 - Invalid username supplied + *

404 - User not found + * @param username The name that needs to be fetched. Use user1 for testing. + * @return ResponseSpec + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseSpec getUserByNameWithResponseSpec(@jakarta.annotation.Nonnull String username) throws RestClientResponseException { + return getUserByNameRequestCreation(username); + } + + /** + * Logs user into the system + * + *

200 - successful operation + *

400 - Invalid username/password supplied + * @param username The user name for login + * @param password The password for login in clear text + * @return String + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + private ResponseSpec loginUserRequestCreation(@jakarta.annotation.Nonnull String username, @jakarta.annotation.Nonnull String password) throws RestClientResponseException { + Object postBody = null; + // verify the required parameter 'username' is set + if (username == null) { + throw new RestClientResponseException("Missing the required parameter 'username' when calling loginUser", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); + } + // verify the required parameter 'password' is set + if (password == null) { + throw new RestClientResponseException("Missing the required parameter 'password' when calling loginUser", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); + } + // create path and map variables + final Map pathParams = new HashMap<>(); + + final MultiValueMap queryParams = new LinkedMultiValueMap<>(); + final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap<>(); + final MultiValueMap formParams = new LinkedMultiValueMap<>(); + + queryParams.putAll(apiClient.parameterToMultiValueMap(null, "username", username)); + queryParams.putAll(apiClient.parameterToMultiValueMap(null, "password", password)); + + final String[] localVarAccepts = { + "application/xml", "application/json" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return apiClient.invokeAPI("/user/login", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + + /** + * Logs user into the system + * + *

200 - successful operation + *

400 - Invalid username/password supplied + * @param username The user name for login + * @param password The password for login in clear text + * @return String + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public String loginUser(@jakarta.annotation.Nonnull String username, @jakarta.annotation.Nonnull String password) throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return loginUserRequestCreation(username, password).body(localVarReturnType); + } + + /** + * Logs user into the system + * + *

200 - successful operation + *

400 - Invalid username/password supplied + * @param username The user name for login + * @param password The password for login in clear text + * @return ResponseEntity<String> + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseEntity loginUserWithHttpInfo(@jakarta.annotation.Nonnull String username, @jakarta.annotation.Nonnull String password) throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return loginUserRequestCreation(username, password).toEntity(localVarReturnType); + } + + /** + * Logs user into the system + * + *

200 - successful operation + *

400 - Invalid username/password supplied + * @param username The user name for login + * @param password The password for login in clear text + * @return ResponseSpec + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseSpec loginUserWithResponseSpec(@jakarta.annotation.Nonnull String username, @jakarta.annotation.Nonnull String password) throws RestClientResponseException { + return loginUserRequestCreation(username, password); + } + + /** + * Logs out current logged in user session + * + *

0 - successful operation + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + private ResponseSpec logoutUserRequestCreation() throws RestClientResponseException { + Object postBody = null; + // create path and map variables + final Map pathParams = new HashMap<>(); + + final MultiValueMap queryParams = new LinkedMultiValueMap<>(); + final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap<>(); + final MultiValueMap formParams = new LinkedMultiValueMap<>(); + + final String[] localVarAccepts = { }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "api_key" }; + + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return apiClient.invokeAPI("/user/logout", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + + /** + * Logs out current logged in user session + * + *

0 - successful operation + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public void logoutUser() throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + logoutUserRequestCreation().body(localVarReturnType); + } + + /** + * Logs out current logged in user session + * + *

0 - successful operation + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseEntity logoutUserWithHttpInfo() throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return logoutUserRequestCreation().toEntity(localVarReturnType); + } + + /** + * Logs out current logged in user session + * + *

0 - successful operation + * @return ResponseSpec + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseSpec logoutUserWithResponseSpec() throws RestClientResponseException { + return logoutUserRequestCreation(); + } + + /** + * Updated user + * This can only be done by the logged in user. + *

400 - Invalid user supplied + *

404 - User not found + * @param username name that need to be deleted + * @param user Updated user object + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + private ResponseSpec updateUserRequestCreation(@jakarta.annotation.Nonnull String username, @jakarta.annotation.Nonnull User user) throws RestClientResponseException { + Object postBody = user; + // verify the required parameter 'username' is set + if (username == null) { + throw new RestClientResponseException("Missing the required parameter 'username' when calling updateUser", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); + } + // verify the required parameter 'user' is set + if (user == null) { + throw new RestClientResponseException("Missing the required parameter 'user' when calling updateUser", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); + } + // create path and map variables + final Map pathParams = new HashMap<>(); + + pathParams.put("username", username); + + final MultiValueMap queryParams = new LinkedMultiValueMap<>(); + final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap<>(); + final MultiValueMap formParams = new LinkedMultiValueMap<>(); + + final String[] localVarAccepts = { }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { + "application/json" + }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "api_key" }; + + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return apiClient.invokeAPI("/user/{username}", HttpMethod.PUT, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + + /** + * Updated user + * This can only be done by the logged in user. + *

400 - Invalid user supplied + *

404 - User not found + * @param username name that need to be deleted + * @param user Updated user object + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public void updateUser(@jakarta.annotation.Nonnull String username, @jakarta.annotation.Nonnull User user) throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + updateUserRequestCreation(username, user).body(localVarReturnType); + } + + /** + * Updated user + * This can only be done by the logged in user. + *

400 - Invalid user supplied + *

404 - User not found + * @param username name that need to be deleted + * @param user Updated user object + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseEntity updateUserWithHttpInfo(@jakarta.annotation.Nonnull String username, @jakarta.annotation.Nonnull User user) throws RestClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {}; + return updateUserRequestCreation(username, user).toEntity(localVarReturnType); + } + + /** + * Updated user + * This can only be done by the logged in user. + *

400 - Invalid user supplied + *

404 - User not found + * @param username name that need to be deleted + * @param user Updated user object + * @return ResponseSpec + * @throws RestClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseSpec updateUserWithResponseSpec(@jakarta.annotation.Nonnull String username, @jakarta.annotation.Nonnull User user) throws RestClientResponseException { + return updateUserRequestCreation(username, user); + } +} diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/auth/OAuth.java b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/auth/OAuth.java new file mode 100644 index 000000000000..0f2bfc138ba9 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/auth/OAuth.java @@ -0,0 +1,61 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.auth; + +import java.util.Optional; +import java.util.function.Supplier; +import org.springframework.http.HttpHeaders; +import org.springframework.util.MultiValueMap; + +/** + * Provides support for RFC 6750 - Bearer Token usage for OAUTH 2.0 Authorization. + */ +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") +public class OAuth implements Authentication { + private Supplier tokenSupplier; + + /** + * Returns the bearer token used for Authorization. + * + * @return The bearer token + */ + public String getAccessToken() { + return tokenSupplier.get(); + } + + /** + * Sets the bearer access token used for Authorization. + * + * @param accessToken The bearer token to send in the Authorization header + */ + public void setAccessToken(String accessToken) { + setAccessToken(() -> accessToken); + } + + /** + * Sets the supplier of bearer tokens used for Authorization. + * + * @param tokenSupplier The supplier of bearer tokens to send in the Authorization header + */ + public void setAccessToken(Supplier tokenSupplier) { + this.tokenSupplier = tokenSupplier; + } + + @Override + public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { + Optional.ofNullable(tokenSupplier).map(Supplier::get).ifPresent(accessToken -> + headerParams.add(HttpHeaders.AUTHORIZATION, "Bearer " + accessToken) + ); + } +} diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/auth/OAuthFlow.java b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/auth/OAuthFlow.java new file mode 100644 index 000000000000..dc1f3bda8de9 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/auth/OAuthFlow.java @@ -0,0 +1,18 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.auth; + +public enum OAuthFlow { + accessCode, implicit, password, application +} \ No newline at end of file diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/AllOfSimpleModel.java b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/AllOfSimpleModel.java new file mode 100644 index 000000000000..a7ce7e1073c8 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/AllOfSimpleModel.java @@ -0,0 +1,114 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonIgnore; + +/** + * AllOfSimpleModel + */ +@JsonPropertyOrder({ + AllOfSimpleModel.JSON_PROPERTY_ARRAY_OF_STRINGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") +public class AllOfSimpleModel { + public static final String JSON_PROPERTY_ARRAY_OF_STRINGS = "arrayOfStrings"; + @jakarta.annotation.Nonnull + private List arrayOfStrings = new ArrayList<>(); + + public AllOfSimpleModel() { + } + + public AllOfSimpleModel arrayOfStrings(@jakarta.annotation.Nonnull List arrayOfStrings) { + + this.arrayOfStrings = arrayOfStrings; + return this; + } + + public AllOfSimpleModel addArrayOfStringsItem(String arrayOfStringsItem) { + if (this.arrayOfStrings == null) { + this.arrayOfStrings = new ArrayList<>(); + } + this.arrayOfStrings.add(arrayOfStringsItem); + return this; + } + + /** + * Get arrayOfStrings + * @return arrayOfStrings + */ + @jakarta.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_ARRAY_OF_STRINGS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getArrayOfStrings() { + return arrayOfStrings; + } + + + @JsonProperty(value = JSON_PROPERTY_ARRAY_OF_STRINGS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setArrayOfStrings(@jakarta.annotation.Nonnull List arrayOfStrings) { + this.arrayOfStrings = arrayOfStrings; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AllOfSimpleModel allOfSimpleModel = (AllOfSimpleModel) o; + return Objects.equals(this.arrayOfStrings, allOfSimpleModel.arrayOfStrings); + } + + @Override + public int hashCode() { + return Objects.hash(arrayOfStrings); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AllOfSimpleModel {\n"); + sb.append(" arrayOfStrings: ").append(toIndentedString(arrayOfStrings)).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) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/Animal.java new file mode 100644 index 000000000000..c10859d1394e --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/Animal.java @@ -0,0 +1,148 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonIgnore; + +/** + * Animal + */ +@JsonPropertyOrder({ + Animal.JSON_PROPERTY_CLASS_NAME, + Animal.JSON_PROPERTY_COLOR +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = Cat.class, name = "Cat"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog"), +}) + +public class Animal { + public static final String JSON_PROPERTY_CLASS_NAME = "className"; + // The discriminator does not have Nullability-annotation since it is added during serialization by the @JsonTypeName annotation + protected String className; + + public static final String JSON_PROPERTY_COLOR = "color"; + @jakarta.annotation.Nullable + protected String color = "red"; + + public Animal() { + } + + public Animal className(@jakarta.annotation.Nonnull String className) { + + this.className = className; + return this; + } + + /** + * Get className + * @return className + */ + @jakarta.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_CLASS_NAME, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getClassName() { + return className; + } + + + @JsonProperty(value = JSON_PROPERTY_CLASS_NAME, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setClassName(@jakarta.annotation.Nonnull String className) { + this.className = className; + } + + public Animal color(@jakarta.annotation.Nullable String color) { + + this.color = color; + return this; + } + + /** + * Get color + * @return color + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_COLOR, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getColor() { + return color; + } + + + @JsonProperty(value = JSON_PROPERTY_COLOR, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setColor(@jakarta.annotation.Nullable String color) { + this.color = color; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Animal animal = (Animal) o; + return Objects.equals(this.className, animal.className) && + Objects.equals(this.color, animal.color); + } + + @Override + public int hashCode() { + return Objects.hash(className, color); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Animal {\n"); + sb.append(" className: ").append(toIndentedString(className)).append("\n"); + sb.append(" color: ").append(toIndentedString(color)).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) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/AnyTypeTest.java b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/AnyTypeTest.java new file mode 100644 index 000000000000..b2cc7daae632 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/AnyTypeTest.java @@ -0,0 +1,210 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonIgnore; + +/** + * AnyTypeTest + */ +@JsonPropertyOrder({ + AnyTypeTest.JSON_PROPERTY_ANY_TYPE_PROPERTY, + AnyTypeTest.JSON_PROPERTY_ARRAY_PROP, + AnyTypeTest.JSON_PROPERTY_REF_ARRAY_PREFIX_ITEMS +}) +@JsonTypeName("any_type_test") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") +public class AnyTypeTest { + public static final String JSON_PROPERTY_ANY_TYPE_PROPERTY = "any_type_property"; + @jakarta.annotation.Nullable + private JsonNullable anyTypeProperty = JsonNullable.of(null); + + public static final String JSON_PROPERTY_ARRAY_PROP = "array_prop"; + @jakarta.annotation.Nullable + private List arrayProp = new ArrayList<>(); + + public static final String JSON_PROPERTY_REF_ARRAY_PREFIX_ITEMS = "ref_array_prefix_items"; + @jakarta.annotation.Nullable + private List refArrayPrefixItems = new ArrayList<>(); + + public AnyTypeTest() { + } + + public AnyTypeTest anyTypeProperty(@jakarta.annotation.Nullable Object anyTypeProperty) { + this.anyTypeProperty = JsonNullable.of(anyTypeProperty); + + return this; + } + + /** + * Get anyTypeProperty + * @return anyTypeProperty + */ + @jakarta.annotation.Nullable + @JsonIgnore + + public Object getAnyTypeProperty() { + return anyTypeProperty.orElse(null); + } + + @JsonProperty(value = JSON_PROPERTY_ANY_TYPE_PROPERTY, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getAnyTypeProperty_JsonNullable() { + return anyTypeProperty; + } + + @JsonProperty(JSON_PROPERTY_ANY_TYPE_PROPERTY) + public void setAnyTypeProperty_JsonNullable(JsonNullable anyTypeProperty) { + this.anyTypeProperty = anyTypeProperty; + } + + public void setAnyTypeProperty(@jakarta.annotation.Nullable Object anyTypeProperty) { + this.anyTypeProperty = JsonNullable.of(anyTypeProperty); + } + + public AnyTypeTest arrayProp(@jakarta.annotation.Nullable List arrayProp) { + + this.arrayProp = arrayProp; + return this; + } + + public AnyTypeTest addArrayPropItem(String arrayPropItem) { + if (this.arrayProp == null) { + this.arrayProp = new ArrayList<>(); + } + this.arrayProp.add(arrayPropItem); + return this; + } + + /** + * test array in 3.1 spec + * @return arrayProp + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_ARRAY_PROP, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getArrayProp() { + return arrayProp; + } + + + @JsonProperty(value = JSON_PROPERTY_ARRAY_PROP, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setArrayProp(@jakarta.annotation.Nullable List arrayProp) { + this.arrayProp = arrayProp; + } + + public AnyTypeTest refArrayPrefixItems(@jakarta.annotation.Nullable List refArrayPrefixItems) { + + this.refArrayPrefixItems = refArrayPrefixItems; + return this; + } + + public AnyTypeTest addRefArrayPrefixItemsItem(Object refArrayPrefixItemsItem) { + if (this.refArrayPrefixItems == null) { + this.refArrayPrefixItems = new ArrayList<>(); + } + this.refArrayPrefixItems.add(refArrayPrefixItemsItem); + return this; + } + + /** + * An item that was added to the queue. + * @return refArrayPrefixItems + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_REF_ARRAY_PREFIX_ITEMS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getRefArrayPrefixItems() { + return refArrayPrefixItems; + } + + + @JsonProperty(value = JSON_PROPERTY_REF_ARRAY_PREFIX_ITEMS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRefArrayPrefixItems(@jakarta.annotation.Nullable List refArrayPrefixItems) { + this.refArrayPrefixItems = refArrayPrefixItems; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AnyTypeTest anyTypeTest = (AnyTypeTest) o; + return equalsNullable(this.anyTypeProperty, anyTypeTest.anyTypeProperty) && + Objects.equals(this.arrayProp, anyTypeTest.arrayProp) && + Objects.equals(this.refArrayPrefixItems, anyTypeTest.refArrayPrefixItems); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(anyTypeProperty), arrayProp, refArrayPrefixItems); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AnyTypeTest {\n"); + sb.append(" anyTypeProperty: ").append(toIndentedString(anyTypeProperty)).append("\n"); + sb.append(" arrayProp: ").append(toIndentedString(arrayProp)).append("\n"); + sb.append(" refArrayPrefixItems: ").append(toIndentedString(refArrayPrefixItems)).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) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/ArrayOfSameRef.java b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/ArrayOfSameRef.java new file mode 100644 index 000000000000..d7641a29f570 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/ArrayOfSameRef.java @@ -0,0 +1,196 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.client.model.Tag; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonIgnore; + +/** + * ArrayOfSameRef + */ +@JsonPropertyOrder({ + ArrayOfSameRef.JSON_PROPERTY_ARRAY_FOO_ONE, + ArrayOfSameRef.JSON_PROPERTY_ARRAY_FOO_TWO, + ArrayOfSameRef.JSON_PROPERTY_ARRAY_FOO_THREE +}) +@JsonTypeName("array_of_same_ref") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") +public class ArrayOfSameRef { + public static final String JSON_PROPERTY_ARRAY_FOO_ONE = "arrayFooOne"; + @jakarta.annotation.Nullable + private List arrayFooOne = new ArrayList<>(); + + public static final String JSON_PROPERTY_ARRAY_FOO_TWO = "arrayFooTwo"; + @jakarta.annotation.Nullable + private List arrayFooTwo = new ArrayList<>(); + + public static final String JSON_PROPERTY_ARRAY_FOO_THREE = "arrayFooThree"; + @jakarta.annotation.Nullable + private List arrayFooThree = new ArrayList<>(); + + public ArrayOfSameRef() { + } + + public ArrayOfSameRef arrayFooOne(@jakarta.annotation.Nullable List arrayFooOne) { + + this.arrayFooOne = arrayFooOne; + return this; + } + + public ArrayOfSameRef addArrayFooOneItem(Tag arrayFooOneItem) { + if (this.arrayFooOne == null) { + this.arrayFooOne = new ArrayList<>(); + } + this.arrayFooOne.add(arrayFooOneItem); + return this; + } + + /** + * Get arrayFooOne + * @return arrayFooOne + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_ARRAY_FOO_ONE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getArrayFooOne() { + return arrayFooOne; + } + + + @JsonProperty(value = JSON_PROPERTY_ARRAY_FOO_ONE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setArrayFooOne(@jakarta.annotation.Nullable List arrayFooOne) { + this.arrayFooOne = arrayFooOne; + } + + public ArrayOfSameRef arrayFooTwo(@jakarta.annotation.Nullable List arrayFooTwo) { + + this.arrayFooTwo = arrayFooTwo; + return this; + } + + public ArrayOfSameRef addArrayFooTwoItem(Tag arrayFooTwoItem) { + if (this.arrayFooTwo == null) { + this.arrayFooTwo = new ArrayList<>(); + } + this.arrayFooTwo.add(arrayFooTwoItem); + return this; + } + + /** + * Get arrayFooTwo + * @return arrayFooTwo + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_ARRAY_FOO_TWO, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getArrayFooTwo() { + return arrayFooTwo; + } + + + @JsonProperty(value = JSON_PROPERTY_ARRAY_FOO_TWO, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setArrayFooTwo(@jakarta.annotation.Nullable List arrayFooTwo) { + this.arrayFooTwo = arrayFooTwo; + } + + public ArrayOfSameRef arrayFooThree(@jakarta.annotation.Nullable List arrayFooThree) { + + this.arrayFooThree = arrayFooThree; + return this; + } + + public ArrayOfSameRef addArrayFooThreeItem(Tag arrayFooThreeItem) { + if (this.arrayFooThree == null) { + this.arrayFooThree = new ArrayList<>(); + } + this.arrayFooThree.add(arrayFooThreeItem); + return this; + } + + /** + * Get arrayFooThree + * @return arrayFooThree + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_ARRAY_FOO_THREE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getArrayFooThree() { + return arrayFooThree; + } + + + @JsonProperty(value = JSON_PROPERTY_ARRAY_FOO_THREE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setArrayFooThree(@jakarta.annotation.Nullable List arrayFooThree) { + this.arrayFooThree = arrayFooThree; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArrayOfSameRef arrayOfSameRef = (ArrayOfSameRef) o; + return Objects.equals(this.arrayFooOne, arrayOfSameRef.arrayFooOne) && + Objects.equals(this.arrayFooTwo, arrayOfSameRef.arrayFooTwo) && + Objects.equals(this.arrayFooThree, arrayOfSameRef.arrayFooThree); + } + + @Override + public int hashCode() { + return Objects.hash(arrayFooOne, arrayFooTwo, arrayFooThree); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArrayOfSameRef {\n"); + sb.append(" arrayFooOne: ").append(toIndentedString(arrayFooOne)).append("\n"); + sb.append(" arrayFooTwo: ").append(toIndentedString(arrayFooTwo)).append("\n"); + sb.append(" arrayFooThree: ").append(toIndentedString(arrayFooThree)).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) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/Cat.java new file mode 100644 index 000000000000..841b267b6aff --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/Cat.java @@ -0,0 +1,128 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.client.model.Animal; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonIgnore; + +/** + * Cat + */ +@JsonPropertyOrder({ + Cat.JSON_PROPERTY_DECLAWED +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) + +public class Cat extends Animal { + public static final String JSON_PROPERTY_DECLAWED = "declawed"; + @jakarta.annotation.Nullable + private Boolean declawed; + + public Cat() { + + } + + public Cat declawed(@jakarta.annotation.Nullable Boolean declawed) { + + this.declawed = declawed; + return this; + } + + /** + * Get declawed + * @return declawed + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_DECLAWED, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getDeclawed() { + return declawed; + } + + + @JsonProperty(value = JSON_PROPERTY_DECLAWED, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDeclawed(@jakarta.annotation.Nullable Boolean declawed) { + this.declawed = declawed; + } + + + @Override + public Cat className(@jakarta.annotation.Nonnull String className) { + this.setClassName(className); + return this; + } + + @Override + public Cat color(@jakarta.annotation.Nullable String color) { + this.setColor(color); + return this; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Cat cat = (Cat) o; + return Objects.equals(this.declawed, cat.declawed) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(declawed, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Cat {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" declawed: ").append(toIndentedString(declawed)).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) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/Category.java b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/Category.java new file mode 100644 index 000000000000..d0136291aa6c --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/Category.java @@ -0,0 +1,135 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonIgnore; + +/** + * A category for a pet + */ +@JsonPropertyOrder({ + Category.JSON_PROPERTY_ID, + Category.JSON_PROPERTY_NAME +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") +public class Category { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nullable + private Long id; + + public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nullable + private String name; + + public Category() { + } + + public Category id(@jakarta.annotation.Nullable Long id) { + + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getId() { + return id; + } + + + @JsonProperty(value = JSON_PROPERTY_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(@jakarta.annotation.Nullable Long id) { + this.id = id; + } + + public Category name(@jakarta.annotation.Nullable String name) { + + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_NAME, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getName() { + return name; + } + + + @JsonProperty(value = JSON_PROPERTY_NAME, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(@jakarta.annotation.Nullable String name) { + this.name = name; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Category category = (Category) o; + return Objects.equals(this.id, category.id) && + Objects.equals(this.name, category.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Category {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/CircularReference1.java b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/CircularReference1.java new file mode 100644 index 000000000000..54f53f68cf90 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/CircularReference1.java @@ -0,0 +1,105 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.client.model.CircularReference2; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonIgnore; + +/** + * CircularReference1 + */ +@JsonPropertyOrder({ + CircularReference1.JSON_PROPERTY_PROP1 +}) +@JsonTypeName("circular_reference_1") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") +public class CircularReference1 { + public static final String JSON_PROPERTY_PROP1 = "prop1"; + @jakarta.annotation.Nullable + private CircularReference2 prop1; + + public CircularReference1() { + } + + public CircularReference1 prop1(@jakarta.annotation.Nullable CircularReference2 prop1) { + + this.prop1 = prop1; + return this; + } + + /** + * Get prop1 + * @return prop1 + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_PROP1, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CircularReference2 getProp1() { + return prop1; + } + + + @JsonProperty(value = JSON_PROPERTY_PROP1, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setProp1(@jakarta.annotation.Nullable CircularReference2 prop1) { + this.prop1 = prop1; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CircularReference1 circularReference1 = (CircularReference1) o; + return Objects.equals(this.prop1, circularReference1.prop1); + } + + @Override + public int hashCode() { + return Objects.hash(prop1); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CircularReference1 {\n"); + sb.append(" prop1: ").append(toIndentedString(prop1)).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) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/CircularReference2.java b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/CircularReference2.java new file mode 100644 index 000000000000..df9b24c116cf --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/CircularReference2.java @@ -0,0 +1,105 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.client.model.CircularReference3; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonIgnore; + +/** + * CircularReference2 + */ +@JsonPropertyOrder({ + CircularReference2.JSON_PROPERTY_PROP1 +}) +@JsonTypeName("circular_reference_2") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") +public class CircularReference2 { + public static final String JSON_PROPERTY_PROP1 = "prop1"; + @jakarta.annotation.Nullable + private CircularReference3 prop1; + + public CircularReference2() { + } + + public CircularReference2 prop1(@jakarta.annotation.Nullable CircularReference3 prop1) { + + this.prop1 = prop1; + return this; + } + + /** + * Get prop1 + * @return prop1 + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_PROP1, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CircularReference3 getProp1() { + return prop1; + } + + + @JsonProperty(value = JSON_PROPERTY_PROP1, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setProp1(@jakarta.annotation.Nullable CircularReference3 prop1) { + this.prop1 = prop1; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CircularReference2 circularReference2 = (CircularReference2) o; + return Objects.equals(this.prop1, circularReference2.prop1); + } + + @Override + public int hashCode() { + return Objects.hash(prop1); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CircularReference2 {\n"); + sb.append(" prop1: ").append(toIndentedString(prop1)).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) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/CircularReference3.java b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/CircularReference3.java new file mode 100644 index 000000000000..f610cc654a16 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/CircularReference3.java @@ -0,0 +1,105 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.client.model.CircularReference1; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonIgnore; + +/** + * CircularReference3 + */ +@JsonPropertyOrder({ + CircularReference3.JSON_PROPERTY_PROP1 +}) +@JsonTypeName("circular_reference_3") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") +public class CircularReference3 { + public static final String JSON_PROPERTY_PROP1 = "prop1"; + @jakarta.annotation.Nullable + private CircularReference1 prop1; + + public CircularReference3() { + } + + public CircularReference3 prop1(@jakarta.annotation.Nullable CircularReference1 prop1) { + + this.prop1 = prop1; + return this; + } + + /** + * Get prop1 + * @return prop1 + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_PROP1, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CircularReference1 getProp1() { + return prop1; + } + + + @JsonProperty(value = JSON_PROPERTY_PROP1, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setProp1(@jakarta.annotation.Nullable CircularReference1 prop1) { + this.prop1 = prop1; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CircularReference3 circularReference3 = (CircularReference3) o; + return Objects.equals(this.prop1, circularReference3.prop1); + } + + @Override + public int hashCode() { + return Objects.hash(prop1); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CircularReference3 {\n"); + sb.append(" prop1: ").append(toIndentedString(prop1)).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) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/CodesEnum.java b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/CodesEnum.java new file mode 100644 index 000000000000..56d9b8b2e688 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/CodesEnum.java @@ -0,0 +1,62 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonIgnore; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets CodesEnum + */ +public enum CodesEnum { + + CODE_1("Code 1"), + + CODE_2("Code 2"), + + CODE_3("Code 3"); + + private String value; + + CodesEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static CodesEnum fromValue(String value) { + for (CodesEnum b : CodesEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/Dog.java new file mode 100644 index 000000000000..054d05ce48a9 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/Dog.java @@ -0,0 +1,128 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.client.model.Animal; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonIgnore; + +/** + * Dog + */ +@JsonPropertyOrder({ + Dog.JSON_PROPERTY_BREED +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) + +public class Dog extends Animal { + public static final String JSON_PROPERTY_BREED = "breed"; + @jakarta.annotation.Nullable + private String breed; + + public Dog() { + + } + + public Dog breed(@jakarta.annotation.Nullable String breed) { + + this.breed = breed; + return this; + } + + /** + * Get breed + * @return breed + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_BREED, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBreed() { + return breed; + } + + + @JsonProperty(value = JSON_PROPERTY_BREED, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBreed(@jakarta.annotation.Nullable String breed) { + this.breed = breed; + } + + + @Override + public Dog className(@jakarta.annotation.Nonnull String className) { + this.setClassName(className); + return this; + } + + @Override + public Dog color(@jakarta.annotation.Nullable String color) { + this.setColor(color); + return this; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Dog dog = (Dog) o; + return Objects.equals(this.breed, dog.breed) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(breed, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Dog {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" breed: ").append(toIndentedString(breed)).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) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/FakeWebhooksSourcesDeletedPostRequest.java b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/FakeWebhooksSourcesDeletedPostRequest.java new file mode 100644 index 000000000000..72237b1dab52 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/FakeWebhooksSourcesDeletedPostRequest.java @@ -0,0 +1,170 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import org.openapitools.client.model.FakeWebhooksSourcesDeletedPostRequestEvent; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonIgnore; + +/** + * inline schema in webhooks + */ +@JsonPropertyOrder({ + FakeWebhooksSourcesDeletedPostRequest.JSON_PROPERTY_EVENT_TIMESTAMP, + FakeWebhooksSourcesDeletedPostRequest.JSON_PROPERTY_EVENT_TYPE, + FakeWebhooksSourcesDeletedPostRequest.JSON_PROPERTY_EVENT +}) +@JsonTypeName("_fake_webhooks_sources_deleted_post_request") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") +public class FakeWebhooksSourcesDeletedPostRequest { + public static final String JSON_PROPERTY_EVENT_TIMESTAMP = "event_timestamp"; + @jakarta.annotation.Nonnull + private OffsetDateTime eventTimestamp; + + public static final String JSON_PROPERTY_EVENT_TYPE = "event_type"; + @jakarta.annotation.Nonnull + private String eventType; + + public static final String JSON_PROPERTY_EVENT = "event"; + @jakarta.annotation.Nonnull + private FakeWebhooksSourcesDeletedPostRequestEvent event; + + public FakeWebhooksSourcesDeletedPostRequest() { + } + + public FakeWebhooksSourcesDeletedPostRequest eventTimestamp(@jakarta.annotation.Nonnull OffsetDateTime eventTimestamp) { + + this.eventTimestamp = eventTimestamp; + return this; + } + + /** + * Get eventTimestamp + * @return eventTimestamp + */ + @jakarta.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_EVENT_TIMESTAMP, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OffsetDateTime getEventTimestamp() { + return eventTimestamp; + } + + + @JsonProperty(value = JSON_PROPERTY_EVENT_TIMESTAMP, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEventTimestamp(@jakarta.annotation.Nonnull OffsetDateTime eventTimestamp) { + this.eventTimestamp = eventTimestamp; + } + + public FakeWebhooksSourcesDeletedPostRequest eventType(@jakarta.annotation.Nonnull String eventType) { + + this.eventType = eventType; + return this; + } + + /** + * Get eventType + * @return eventType + */ + @jakarta.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_EVENT_TYPE, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getEventType() { + return eventType; + } + + + @JsonProperty(value = JSON_PROPERTY_EVENT_TYPE, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEventType(@jakarta.annotation.Nonnull String eventType) { + this.eventType = eventType; + } + + public FakeWebhooksSourcesDeletedPostRequest event(@jakarta.annotation.Nonnull FakeWebhooksSourcesDeletedPostRequestEvent event) { + + this.event = event; + return this; + } + + /** + * Get event + * @return event + */ + @jakarta.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_EVENT, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public FakeWebhooksSourcesDeletedPostRequestEvent getEvent() { + return event; + } + + + @JsonProperty(value = JSON_PROPERTY_EVENT, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEvent(@jakarta.annotation.Nonnull FakeWebhooksSourcesDeletedPostRequestEvent event) { + this.event = event; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FakeWebhooksSourcesDeletedPostRequest fakeWebhooksSourcesDeletedPostRequest = (FakeWebhooksSourcesDeletedPostRequest) o; + return Objects.equals(this.eventTimestamp, fakeWebhooksSourcesDeletedPostRequest.eventTimestamp) && + Objects.equals(this.eventType, fakeWebhooksSourcesDeletedPostRequest.eventType) && + Objects.equals(this.event, fakeWebhooksSourcesDeletedPostRequest.event); + } + + @Override + public int hashCode() { + return Objects.hash(eventTimestamp, eventType, event); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FakeWebhooksSourcesDeletedPostRequest {\n"); + sb.append(" eventTimestamp: ").append(toIndentedString(eventTimestamp)).append("\n"); + sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); + sb.append(" event: ").append(toIndentedString(event)).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) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/FakeWebhooksSourcesDeletedPostRequestEvent.java b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/FakeWebhooksSourcesDeletedPostRequestEvent.java new file mode 100644 index 000000000000..cd2da49a20de --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/FakeWebhooksSourcesDeletedPostRequestEvent.java @@ -0,0 +1,104 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonIgnore; + +/** + * FakeWebhooksSourcesDeletedPostRequestEvent + */ +@JsonPropertyOrder({ + FakeWebhooksSourcesDeletedPostRequestEvent.JSON_PROPERTY_EVENT_ID +}) +@JsonTypeName("_fake_webhooks_sources_deleted_post_request_event") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") +public class FakeWebhooksSourcesDeletedPostRequestEvent { + public static final String JSON_PROPERTY_EVENT_ID = "event_id"; + @jakarta.annotation.Nonnull + private String eventId; + + public FakeWebhooksSourcesDeletedPostRequestEvent() { + } + + public FakeWebhooksSourcesDeletedPostRequestEvent eventId(@jakarta.annotation.Nonnull String eventId) { + + this.eventId = eventId; + return this; + } + + /** + * Get eventId + * @return eventId + */ + @jakarta.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_EVENT_ID, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getEventId() { + return eventId; + } + + + @JsonProperty(value = JSON_PROPERTY_EVENT_ID, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEventId(@jakarta.annotation.Nonnull String eventId) { + this.eventId = eventId; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FakeWebhooksSourcesDeletedPostRequestEvent fakeWebhooksSourcesDeletedPostRequestEvent = (FakeWebhooksSourcesDeletedPostRequestEvent) o; + return Objects.equals(this.eventId, fakeWebhooksSourcesDeletedPostRequestEvent.eventId); + } + + @Override + public int hashCode() { + return Objects.hash(eventId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FakeWebhooksSourcesDeletedPostRequestEvent {\n"); + sb.append(" eventId: ").append(toIndentedString(eventId)).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) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/ModelApiResponse.java new file mode 100644 index 000000000000..04d9b691ad9e --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -0,0 +1,168 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonIgnore; + +/** + * Describes the result of uploading an image resource + */ +@JsonPropertyOrder({ + ModelApiResponse.JSON_PROPERTY_CODE, + ModelApiResponse.JSON_PROPERTY_TYPE, + ModelApiResponse.JSON_PROPERTY_MESSAGE +}) +@JsonTypeName("ApiResponse") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") +public class ModelApiResponse { + public static final String JSON_PROPERTY_CODE = "code"; + @jakarta.annotation.Nullable + private Integer code; + + public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nullable + private String type; + + public static final String JSON_PROPERTY_MESSAGE = "message"; + @jakarta.annotation.Nullable + private String message; + + public ModelApiResponse() { + } + + public ModelApiResponse code(@jakarta.annotation.Nullable Integer code) { + + this.code = code; + return this; + } + + /** + * Get code + * @return code + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_CODE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getCode() { + return code; + } + + + @JsonProperty(value = JSON_PROPERTY_CODE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCode(@jakarta.annotation.Nullable Integer code) { + this.code = code; + } + + public ModelApiResponse type(@jakarta.annotation.Nullable String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_TYPE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getType() { + return type; + } + + + @JsonProperty(value = JSON_PROPERTY_TYPE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(@jakarta.annotation.Nullable String type) { + this.type = type; + } + + public ModelApiResponse message(@jakarta.annotation.Nullable String message) { + + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_MESSAGE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMessage() { + return message; + } + + + @JsonProperty(value = JSON_PROPERTY_MESSAGE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMessage(@jakarta.annotation.Nullable String message) { + this.message = message; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelApiResponse _apiResponse = (ModelApiResponse) o; + return Objects.equals(this.code, _apiResponse.code) && + Objects.equals(this.type, _apiResponse.type) && + Objects.equals(this.message, _apiResponse.message); + } + + @Override + public int hashCode() { + return Objects.hash(code, type, message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelApiResponse {\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/OneOfStringOrInt.java b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/OneOfStringOrInt.java new file mode 100644 index 000000000000..02f6632af067 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/OneOfStringOrInt.java @@ -0,0 +1,66 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonIgnore; + +/** + * string or int (onefOf) + */ +@JsonPropertyOrder({ +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") +public class OneOfStringOrInt { + public OneOfStringOrInt() { + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + return Objects.hash(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OneOfStringOrInt {\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) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/Order.java b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/Order.java new file mode 100644 index 000000000000..d2122228b5dc --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/Order.java @@ -0,0 +1,301 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonIgnore; + +/** + * An order for a pets from the pet store + */ +@JsonPropertyOrder({ + Order.JSON_PROPERTY_ID, + Order.JSON_PROPERTY_PET_ID, + Order.JSON_PROPERTY_QUANTITY, + Order.JSON_PROPERTY_SHIP_DATE, + Order.JSON_PROPERTY_STATUS, + Order.JSON_PROPERTY_COMPLETE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") +public class Order { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nullable + private Long id; + + public static final String JSON_PROPERTY_PET_ID = "petId"; + @jakarta.annotation.Nullable + private Long petId; + + public static final String JSON_PROPERTY_QUANTITY = "quantity"; + @jakarta.annotation.Nullable + private Integer quantity; + + public static final String JSON_PROPERTY_SHIP_DATE = "shipDate"; + @jakarta.annotation.Nullable + private OffsetDateTime shipDate; + + /** + * Order Status + */ + public enum StatusEnum { + PLACED(String.valueOf("placed")), + + APPROVED(String.valueOf("approved")), + + DELIVERED(String.valueOf("delivered")); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + @jakarta.annotation.Nullable + private StatusEnum status; + + public static final String JSON_PROPERTY_COMPLETE = "complete"; + @jakarta.annotation.Nullable + private Boolean complete = false; + + public Order() { + } + + public Order id(@jakarta.annotation.Nullable Long id) { + + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getId() { + return id; + } + + + @JsonProperty(value = JSON_PROPERTY_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(@jakarta.annotation.Nullable Long id) { + this.id = id; + } + + public Order petId(@jakarta.annotation.Nullable Long petId) { + + this.petId = petId; + return this; + } + + /** + * Get petId + * @return petId + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_PET_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getPetId() { + return petId; + } + + + @JsonProperty(value = JSON_PROPERTY_PET_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPetId(@jakarta.annotation.Nullable Long petId) { + this.petId = petId; + } + + public Order quantity(@jakarta.annotation.Nullable Integer quantity) { + + this.quantity = quantity; + return this; + } + + /** + * Get quantity + * @return quantity + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_QUANTITY, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getQuantity() { + return quantity; + } + + + @JsonProperty(value = JSON_PROPERTY_QUANTITY, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setQuantity(@jakarta.annotation.Nullable Integer quantity) { + this.quantity = quantity; + } + + public Order shipDate(@jakarta.annotation.Nullable OffsetDateTime shipDate) { + + this.shipDate = shipDate; + return this; + } + + /** + * Get shipDate + * @return shipDate + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_SHIP_DATE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getShipDate() { + return shipDate; + } + + + @JsonProperty(value = JSON_PROPERTY_SHIP_DATE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShipDate(@jakarta.annotation.Nullable OffsetDateTime shipDate) { + this.shipDate = shipDate; + } + + public Order status(@jakarta.annotation.Nullable StatusEnum status) { + + this.status = status; + return this; + } + + /** + * Order Status + * @return status + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_STATUS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public StatusEnum getStatus() { + return status; + } + + + @JsonProperty(value = JSON_PROPERTY_STATUS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@jakarta.annotation.Nullable StatusEnum status) { + this.status = status; + } + + public Order complete(@jakarta.annotation.Nullable Boolean complete) { + + this.complete = complete; + return this; + } + + /** + * Get complete + * @return complete + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_COMPLETE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getComplete() { + return complete; + } + + + @JsonProperty(value = JSON_PROPERTY_COMPLETE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setComplete(@jakarta.annotation.Nullable Boolean complete) { + this.complete = complete; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Order order = (Order) o; + return Objects.equals(this.id, order.id) && + Objects.equals(this.petId, order.petId) && + Objects.equals(this.quantity, order.quantity) && + Objects.equals(this.shipDate, order.shipDate) && + Objects.equals(this.status, order.status) && + Objects.equals(this.complete, order.complete); + } + + @Override + public int hashCode() { + return Objects.hash(id, petId, quantity, shipDate, status, complete); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Order {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/Pet.java new file mode 100644 index 000000000000..e9f28c775b2c --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/Pet.java @@ -0,0 +1,323 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.client.model.Category; +import org.openapitools.client.model.Tag; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonIgnore; + +/** + * A pet for sale in the pet store + */ +@JsonPropertyOrder({ + Pet.JSON_PROPERTY_ID, + Pet.JSON_PROPERTY_CATEGORY, + Pet.JSON_PROPERTY_NAME, + Pet.JSON_PROPERTY_PHOTO_URLS, + Pet.JSON_PROPERTY_TAGS, + Pet.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") +public class Pet { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nullable + private Long id; + + public static final String JSON_PROPERTY_CATEGORY = "category"; + @jakarta.annotation.Nullable + private Category category; + + public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull + private String name; + + public static final String JSON_PROPERTY_PHOTO_URLS = "photoUrls"; + @jakarta.annotation.Nonnull + private List photoUrls = new ArrayList<>(); + + public static final String JSON_PROPERTY_TAGS = "tags"; + @jakarta.annotation.Nullable + private List tags = new ArrayList<>(); + + /** + * pet status in the store + */ + public enum StatusEnum { + AVAILABLE(String.valueOf("available")), + + PENDING(String.valueOf("pending")), + + SOLD(String.valueOf("sold")); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + @jakarta.annotation.Nullable + private StatusEnum status; + + public Pet() { + } + + public Pet id(@jakarta.annotation.Nullable Long id) { + + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getId() { + return id; + } + + + @JsonProperty(value = JSON_PROPERTY_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(@jakarta.annotation.Nullable Long id) { + this.id = id; + } + + public Pet category(@jakarta.annotation.Nullable Category category) { + + this.category = category; + return this; + } + + /** + * Get category + * @return category + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_CATEGORY, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Category getCategory() { + return category; + } + + + @JsonProperty(value = JSON_PROPERTY_CATEGORY, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCategory(@jakarta.annotation.Nullable Category category) { + this.category = category; + } + + public Pet name(@jakarta.annotation.Nonnull String name) { + + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_NAME, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(value = JSON_PROPERTY_NAME, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@jakarta.annotation.Nonnull String name) { + this.name = name; + } + + public Pet photoUrls(@jakarta.annotation.Nonnull List photoUrls) { + + this.photoUrls = photoUrls; + return this; + } + + public Pet addPhotoUrlsItem(String photoUrlsItem) { + if (this.photoUrls == null) { + this.photoUrls = new ArrayList<>(); + } + this.photoUrls.add(photoUrlsItem); + return this; + } + + /** + * Get photoUrls + * @return photoUrls + */ + @jakarta.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_PHOTO_URLS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getPhotoUrls() { + return photoUrls; + } + + + @JsonProperty(value = JSON_PROPERTY_PHOTO_URLS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPhotoUrls(@jakarta.annotation.Nonnull List photoUrls) { + this.photoUrls = photoUrls; + } + + public Pet tags(@jakarta.annotation.Nullable List tags) { + + this.tags = tags; + return this; + } + + public Pet addTagsItem(Tag tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Get tags + * @return tags + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_TAGS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getTags() { + return tags; + } + + + @JsonProperty(value = JSON_PROPERTY_TAGS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(@jakarta.annotation.Nullable List tags) { + this.tags = tags; + } + + public Pet status(@jakarta.annotation.Nullable StatusEnum status) { + + this.status = status; + return this; + } + + /** + * pet status in the store + * @return status + * @deprecated + */ + @Deprecated + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_STATUS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public StatusEnum getStatus() { + return status; + } + + + @JsonProperty(value = JSON_PROPERTY_STATUS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@jakarta.annotation.Nullable StatusEnum status) { + this.status = status; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Pet pet = (Pet) o; + return Objects.equals(this.id, pet.id) && + Objects.equals(this.category, pet.category) && + Objects.equals(this.name, pet.name) && + Objects.equals(this.photoUrls, pet.photoUrls) && + Objects.equals(this.tags, pet.tags) && + Objects.equals(this.status, pet.status); + } + + @Override + public int hashCode() { + return Objects.hash(id, category, name, photoUrls, tags, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Pet {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/PetWithTypesObjectNullAndRef.java b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/PetWithTypesObjectNullAndRef.java new file mode 100644 index 000000000000..d1705118ebe8 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/PetWithTypesObjectNullAndRef.java @@ -0,0 +1,104 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.client.model.Pet; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonIgnore; + +/** + * PetWithTypesObjectNullAndRef + */ +@JsonPropertyOrder({ + PetWithTypesObjectNullAndRef.JSON_PROPERTY_FIRST_PROPERTY +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") +public class PetWithTypesObjectNullAndRef { + public static final String JSON_PROPERTY_FIRST_PROPERTY = "first_property"; + @jakarta.annotation.Nullable + private Pet firstProperty; + + public PetWithTypesObjectNullAndRef() { + } + + public PetWithTypesObjectNullAndRef firstProperty(@jakarta.annotation.Nullable Pet firstProperty) { + + this.firstProperty = firstProperty; + return this; + } + + /** + * Get firstProperty + * @return firstProperty + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_FIRST_PROPERTY, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Pet getFirstProperty() { + return firstProperty; + } + + + @JsonProperty(value = JSON_PROPERTY_FIRST_PROPERTY, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFirstProperty(@jakarta.annotation.Nullable Pet firstProperty) { + this.firstProperty = firstProperty; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PetWithTypesObjectNullAndRef petWithTypesObjectNullAndRef = (PetWithTypesObjectNullAndRef) o; + return Objects.equals(this.firstProperty, petWithTypesObjectNullAndRef.firstProperty); + } + + @Override + public int hashCode() { + return Objects.hash(firstProperty); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PetWithTypesObjectNullAndRef {\n"); + sb.append(" firstProperty: ").append(toIndentedString(firstProperty)).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) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/RefRefToPathLevelParameterOneofRefToOneofParameter.java b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/RefRefToPathLevelParameterOneofRefToOneofParameter.java new file mode 100644 index 000000000000..07d35e4dfab5 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/RefRefToPathLevelParameterOneofRefToOneofParameter.java @@ -0,0 +1,68 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonIgnore; + +/** + * RefRefToPathLevelParameterOneofRefToOneofParameter + */ +@JsonPropertyOrder({ +}) +@JsonTypeName("_ref_ref_to_path_level_parameter_oneof_ref_to_oneof_parameter") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") +public class RefRefToPathLevelParameterOneofRefToOneofParameter { + public RefRefToPathLevelParameterOneofRefToOneofParameter() { + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + return Objects.hash(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RefRefToPathLevelParameterOneofRefToOneofParameter {\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) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/RefToRefParameterAnyofRefToAnyofParameter.java b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/RefToRefParameterAnyofRefToAnyofParameter.java new file mode 100644 index 000000000000..5f90cd3aad51 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/RefToRefParameterAnyofRefToAnyofParameter.java @@ -0,0 +1,69 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonIgnore; + +/** + * RefToRefParameterAnyofRefToAnyofParameter + */ +@JsonPropertyOrder({ +}) +@JsonTypeName("ref_to_ref_parameter_anyof_ref_to_anyof_parameter") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") +public class RefToRefParameterAnyofRefToAnyofParameter { + public RefToRefParameterAnyofRefToAnyofParameter() { + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + return Objects.hash(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RefToRefParameterAnyofRefToAnyofParameter {\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) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/SelfReferenceAdditionalProperties.java b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/SelfReferenceAdditionalProperties.java new file mode 100644 index 000000000000..6742160c9a92 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/SelfReferenceAdditionalProperties.java @@ -0,0 +1,152 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonIgnore; + +/** + * SelfReferenceAdditionalProperties + */ +@JsonPropertyOrder({ + SelfReferenceAdditionalProperties.JSON_PROPERTY_DUMMY +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") +public class SelfReferenceAdditionalProperties { + public static final String JSON_PROPERTY_DUMMY = "dummy"; + @jakarta.annotation.Nullable + private String dummy; + + public SelfReferenceAdditionalProperties() { + } + + public SelfReferenceAdditionalProperties dummy(@jakarta.annotation.Nullable String dummy) { + + this.dummy = dummy; + return this; + } + + /** + * Get dummy + * @return dummy + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_DUMMY, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDummy() { + return dummy; + } + + + @JsonProperty(value = JSON_PROPERTY_DUMMY, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDummy(@jakarta.annotation.Nullable String dummy) { + this.dummy = dummy; + } + + /** + * 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. + * @param key the name of the property + * @param value the value of the property + * @return self reference + */ + @JsonAnySetter + public SelfReferenceAdditionalProperties putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) properties. + * @return the additional (undeclared) properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * @param key the name of the property + * @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; + } + SelfReferenceAdditionalProperties selfReferenceAdditionalProperties = (SelfReferenceAdditionalProperties) o; + return Objects.equals(this.dummy, selfReferenceAdditionalProperties.dummy) && + Objects.equals(this.additionalProperties, selfReferenceAdditionalProperties.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(dummy, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SelfReferenceAdditionalProperties {\n"); + sb.append(" dummy: ").append(toIndentedString(dummy)).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) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/SelfReferenceAnyOf.java b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/SelfReferenceAnyOf.java new file mode 100644 index 000000000000..a4e0e2de2a47 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/SelfReferenceAnyOf.java @@ -0,0 +1,66 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonIgnore; + +/** + * SelfReferenceAnyOf + */ +@JsonPropertyOrder({ +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") +public class SelfReferenceAnyOf { + public SelfReferenceAnyOf() { + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + return Objects.hash(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SelfReferenceAnyOf {\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) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/SelfReferenceOneOf.java b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/SelfReferenceOneOf.java new file mode 100644 index 000000000000..34e297ded77d --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/SelfReferenceOneOf.java @@ -0,0 +1,66 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonIgnore; + +/** + * SelfReferenceOneOf + */ +@JsonPropertyOrder({ +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") +public class SelfReferenceOneOf { + public SelfReferenceOneOf() { + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + return Objects.hash(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SelfReferenceOneOf {\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) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/SimpleModelWithArrayProperty.java b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/SimpleModelWithArrayProperty.java new file mode 100644 index 000000000000..7b208573f4c1 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/SimpleModelWithArrayProperty.java @@ -0,0 +1,114 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonIgnore; + +/** + * SimpleModelWithArrayProperty + */ +@JsonPropertyOrder({ + SimpleModelWithArrayProperty.JSON_PROPERTY_ARRAY_OF_STRINGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") +public class SimpleModelWithArrayProperty { + public static final String JSON_PROPERTY_ARRAY_OF_STRINGS = "arrayOfStrings"; + @jakarta.annotation.Nonnull + private List arrayOfStrings = new ArrayList<>(); + + public SimpleModelWithArrayProperty() { + } + + public SimpleModelWithArrayProperty arrayOfStrings(@jakarta.annotation.Nonnull List arrayOfStrings) { + + this.arrayOfStrings = arrayOfStrings; + return this; + } + + public SimpleModelWithArrayProperty addArrayOfStringsItem(String arrayOfStringsItem) { + if (this.arrayOfStrings == null) { + this.arrayOfStrings = new ArrayList<>(); + } + this.arrayOfStrings.add(arrayOfStringsItem); + return this; + } + + /** + * Get arrayOfStrings + * @return arrayOfStrings + */ + @jakarta.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_ARRAY_OF_STRINGS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getArrayOfStrings() { + return arrayOfStrings; + } + + + @JsonProperty(value = JSON_PROPERTY_ARRAY_OF_STRINGS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setArrayOfStrings(@jakarta.annotation.Nonnull List arrayOfStrings) { + this.arrayOfStrings = arrayOfStrings; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SimpleModelWithArrayProperty simpleModelWithArrayProperty = (SimpleModelWithArrayProperty) o; + return Objects.equals(this.arrayOfStrings, simpleModelWithArrayProperty.arrayOfStrings); + } + + @Override + public int hashCode() { + return Objects.hash(arrayOfStrings); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SimpleModelWithArrayProperty {\n"); + sb.append(" arrayOfStrings: ").append(toIndentedString(arrayOfStrings)).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) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/StringOrInt.java b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/StringOrInt.java new file mode 100644 index 000000000000..3bd2b3a743f6 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/StringOrInt.java @@ -0,0 +1,66 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonIgnore; + +/** + * string or int + */ +@JsonPropertyOrder({ +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") +public class StringOrInt { + public StringOrInt() { + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + return Objects.hash(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StringOrInt {\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) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/Tag.java new file mode 100644 index 000000000000..20670e2a9aa3 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/Tag.java @@ -0,0 +1,135 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonIgnore; + +/** + * A tag for a pet + */ +@JsonPropertyOrder({ + Tag.JSON_PROPERTY_ID, + Tag.JSON_PROPERTY_NAME +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") +public class Tag { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nullable + private Long id; + + public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nullable + private String name; + + public Tag() { + } + + public Tag id(@jakarta.annotation.Nullable Long id) { + + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getId() { + return id; + } + + + @JsonProperty(value = JSON_PROPERTY_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(@jakarta.annotation.Nullable Long id) { + this.id = id; + } + + public Tag name(@jakarta.annotation.Nullable String name) { + + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_NAME, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getName() { + return name; + } + + + @JsonProperty(value = JSON_PROPERTY_NAME, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(@jakarta.annotation.Nullable String name) { + this.name = name; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Tag tag = (Tag) o; + return Objects.equals(this.id, tag.id) && + Objects.equals(this.name, tag.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Tag {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/User.java b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/User.java new file mode 100644 index 000000000000..12be6870f832 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/main/java/org/openapitools/client/model/User.java @@ -0,0 +1,327 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonIgnore; + +/** + * A User who is purchasing from the pet store + */ +@JsonPropertyOrder({ + User.JSON_PROPERTY_ID, + User.JSON_PROPERTY_USERNAME, + User.JSON_PROPERTY_FIRST_NAME, + User.JSON_PROPERTY_LAST_NAME, + User.JSON_PROPERTY_EMAIL, + User.JSON_PROPERTY_PASSWORD, + User.JSON_PROPERTY_PHONE, + User.JSON_PROPERTY_USER_STATUS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT") +public class User { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nullable + private Long id; + + public static final String JSON_PROPERTY_USERNAME = "username"; + @jakarta.annotation.Nullable + private String username; + + public static final String JSON_PROPERTY_FIRST_NAME = "firstName"; + @jakarta.annotation.Nullable + private String firstName; + + public static final String JSON_PROPERTY_LAST_NAME = "lastName"; + @jakarta.annotation.Nullable + private String lastName; + + public static final String JSON_PROPERTY_EMAIL = "email"; + @jakarta.annotation.Nullable + private String email; + + public static final String JSON_PROPERTY_PASSWORD = "password"; + @jakarta.annotation.Nullable + private String password; + + public static final String JSON_PROPERTY_PHONE = "phone"; + @jakarta.annotation.Nullable + private String phone; + + public static final String JSON_PROPERTY_USER_STATUS = "userStatus"; + @jakarta.annotation.Nullable + private Integer userStatus; + + public User() { + } + + public User id(@jakarta.annotation.Nullable Long id) { + + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getId() { + return id; + } + + + @JsonProperty(value = JSON_PROPERTY_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(@jakarta.annotation.Nullable Long id) { + this.id = id; + } + + public User username(@jakarta.annotation.Nullable String username) { + + this.username = username; + return this; + } + + /** + * Get username + * @return username + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_USERNAME, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getUsername() { + return username; + } + + + @JsonProperty(value = JSON_PROPERTY_USERNAME, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUsername(@jakarta.annotation.Nullable String username) { + this.username = username; + } + + public User firstName(@jakarta.annotation.Nullable String firstName) { + + this.firstName = firstName; + return this; + } + + /** + * Get firstName + * @return firstName + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_FIRST_NAME, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getFirstName() { + return firstName; + } + + + @JsonProperty(value = JSON_PROPERTY_FIRST_NAME, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFirstName(@jakarta.annotation.Nullable String firstName) { + this.firstName = firstName; + } + + public User lastName(@jakarta.annotation.Nullable String lastName) { + + this.lastName = lastName; + return this; + } + + /** + * Get lastName + * @return lastName + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_LAST_NAME, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getLastName() { + return lastName; + } + + + @JsonProperty(value = JSON_PROPERTY_LAST_NAME, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLastName(@jakarta.annotation.Nullable String lastName) { + this.lastName = lastName; + } + + public User email(@jakarta.annotation.Nullable String email) { + + this.email = email; + return this; + } + + /** + * Get email + * @return email + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_EMAIL, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEmail() { + return email; + } + + + @JsonProperty(value = JSON_PROPERTY_EMAIL, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEmail(@jakarta.annotation.Nullable String email) { + this.email = email; + } + + public User password(@jakarta.annotation.Nullable String password) { + + this.password = password; + return this; + } + + /** + * Get password + * @return password + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_PASSWORD, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPassword() { + return password; + } + + + @JsonProperty(value = JSON_PROPERTY_PASSWORD, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPassword(@jakarta.annotation.Nullable String password) { + this.password = password; + } + + public User phone(@jakarta.annotation.Nullable String phone) { + + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_PHONE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPhone() { + return phone; + } + + + @JsonProperty(value = JSON_PROPERTY_PHONE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPhone(@jakarta.annotation.Nullable String phone) { + this.phone = phone; + } + + public User userStatus(@jakarta.annotation.Nullable Integer userStatus) { + + this.userStatus = userStatus; + return this; + } + + /** + * User Status + * @return userStatus + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_USER_STATUS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getUserStatus() { + return userStatus; + } + + + @JsonProperty(value = JSON_PROPERTY_USER_STATUS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUserStatus(@jakarta.annotation.Nullable Integer userStatus) { + this.userStatus = userStatus; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + User user = (User) o; + return Objects.equals(this.id, user.id) && + Objects.equals(this.username, user.username) && + Objects.equals(this.firstName, user.firstName) && + Objects.equals(this.lastName, user.lastName) && + Objects.equals(this.email, user.email) && + Objects.equals(this.password, user.password) && + Objects.equals(this.phone, user.phone) && + Objects.equals(this.userStatus, user.userStatus); + } + + @Override + public int hashCode() { + return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class User {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/api/DefaultApiTest.java b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/api/DefaultApiTest.java new file mode 100644 index 000000000000..37f211006610 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/api/DefaultApiTest.java @@ -0,0 +1,48 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.api; + +import org.openapitools.client.model.FakeWebhooksSourcesDeletedPostRequest; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * API tests for DefaultApi + */ +@Disabled +public class DefaultApiTest { + + private final DefaultApi api = new DefaultApi(); + + + /** + * + * + * + */ + @Test + public void fakeWebhooksSourcesDeletedPostTest() { + FakeWebhooksSourcesDeletedPostRequest fakeWebhooksSourcesDeletedPostRequest = null; + api.fakeWebhooksSourcesDeletedPost(fakeWebhooksSourcesDeletedPostRequest); + + // TODO: test validations + } + +} \ No newline at end of file diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/api/FakeApiTest.java b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/api/FakeApiTest.java new file mode 100644 index 000000000000..eca5f326d973 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/api/FakeApiTest.java @@ -0,0 +1,186 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.api; + +import org.openapitools.client.model.CodesEnum; +import org.openapitools.client.model.RefRefToPathLevelParameterOneofRefToOneofParameter; +import org.openapitools.client.model.RefToRefParameterAnyofRefToAnyofParameter; +import java.util.UUID; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * API tests for FakeApi + */ +@Disabled +public class FakeApiTest { + + private final FakeApi api = new FakeApi(); + + + /** + * + * + * + */ + @Test + public void fakeInlineSchemaAnyofPath1GetTest() { + Object response = api.fakeInlineSchemaAnyofPath1Get(); + + // TODO: test validations + } + + /** + * + * + * + */ + @Test + public void fakeInlineSchemaAnyofPath2GetTest() { + Object response = api.fakeInlineSchemaAnyofPath2Get(); + + // TODO: test validations + } + + /** + * + * + * + */ + @Test + public void fakeInlineSchemaAnyofPath3GetTest() { + List response = api.fakeInlineSchemaAnyofPath3Get(); + + // TODO: test validations + } + + /** + * op1 + * + * + */ + @Test + public void op1Test() { + Object response = api.op1(); + + // TODO: test validations + } + + /** + * op2 + * + * + */ + @Test + public void op2Test() { + Object response = api.op2(); + + // TODO: test validations + } + + /** + * op3 + * + * + */ + @Test + public void op3Test() { + List queryEnum = null; + api.op3(queryEnum); + + // TODO: test validations + } + + /** + * + * + * + */ + @Test + public void refToRefParameterTest() { + UUID refToUuid = null; + String response = api.refToRefParameter(refToUuid); + + // TODO: test validations + } + + /** + * + * + * to test $ref to operation level parameters + */ + @Test + public void refToRefParameterAnyofTest() { + RefToRefParameterAnyofRefToAnyofParameter refToAnyof = null; + api.refToRefParameterAnyof(refToAnyof); + + // TODO: test validations + } + + /** + * + * + * to test $ref to path level parameters + */ + @Test + public void refToRefParameterOneofTest() { + RefRefToPathLevelParameterOneofRefToOneofParameter refToOneof = null; + api.refToRefParameterOneof(refToOneof); + + // TODO: test validations + } + + /** + * + * + * + */ + @Test + public void responseNoRefTest() { + String response = api.responseNoRef(); + + // TODO: test validations + } + + /** + * + * + * + */ + @Test + public void responseRefToNoRefTest() { + String response = api.responseRefToNoRef(); + + // TODO: test validations + } + + /** + * + * + * + */ + @Test + public void responseRefToRefTest() { + String response = api.responseRefToRef(); + + // TODO: test validations + } + +} \ No newline at end of file diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/api/PetApiTest.java b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/api/PetApiTest.java new file mode 100644 index 000000000000..2668608514d0 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/api/PetApiTest.java @@ -0,0 +1,146 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.api; + +import java.io.File; +import org.openapitools.client.model.ModelApiResponse; +import org.openapitools.client.model.Pet; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * API tests for PetApi + */ +@Disabled +public class PetApiTest { + + private final PetApi api = new PetApi(); + + + /** + * Add a new pet to the store + * + * + */ + @Test + public void addPetTest() { + Pet pet = null; + Pet response = api.addPet(pet); + + // TODO: test validations + } + + /** + * Deletes a pet + * + * + */ + @Test + public void deletePetTest() { + Long petId = null; + String apiKey = null; + api.deletePet(petId, apiKey); + + // TODO: test validations + } + + /** + * Finds Pets by status + * + * Multiple status values can be provided with comma separated strings + */ + @Test + public void findPetsByStatusTest() { + List status = null; + List response = api.findPetsByStatus(status); + + // TODO: test validations + } + + /** + * Finds Pets by tags + * + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + */ + @Test + public void findPetsByTagsTest() { + List tags = null; + List response = api.findPetsByTags(tags); + + // TODO: test validations + } + + /** + * Find pet by ID + * + * Returns a single pet + */ + @Test + public void getPetByIdTest() { + Long petId = null; + Pet response = api.getPetById(petId); + + // TODO: test validations + } + + /** + * Update an existing pet + * + * + */ + @Test + public void updatePetTest() { + Pet pet = null; + Pet response = api.updatePet(pet); + + // TODO: test validations + } + + /** + * Updates a pet in the store with form data + * + * + */ + @Test + public void updatePetWithFormTest() { + Long petId = null; + String name = null; + String status = null; + api.updatePetWithForm(petId, name, status); + + // TODO: test validations + } + + /** + * uploads an image + * + * + */ + @Test + public void uploadFileTest() { + Long petId = null; + String additionalMetadata = null; + File _file = null; + ModelApiResponse response = api.uploadFile(petId, additionalMetadata, _file); + + // TODO: test validations + } + +} \ No newline at end of file diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/api/StoreApiTest.java new file mode 100644 index 000000000000..bfa406a617ee --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -0,0 +1,86 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.api; + +import org.openapitools.client.model.Order; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * API tests for StoreApi + */ +@Disabled +public class StoreApiTest { + + private final StoreApi api = new StoreApi(); + + + /** + * Delete purchase order by ID + * + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + */ + @Test + public void deleteOrderTest() { + String orderId = null; + api.deleteOrder(orderId); + + // TODO: test validations + } + + /** + * Returns pet inventories by status + * + * Returns a map of status codes to quantities + */ + @Test + public void getInventoryTest() { + Map response = api.getInventory(); + + // TODO: test validations + } + + /** + * Find purchase order by ID + * + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions + */ + @Test + public void getOrderByIdTest() { + Long orderId = null; + Order response = api.getOrderById(orderId); + + // TODO: test validations + } + + /** + * Place an order for a pet + * + * + */ + @Test + public void placeOrderTest() { + Order order = null; + Order response = api.placeOrder(order); + + // TODO: test validations + } + +} \ No newline at end of file diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/api/UserApiTest.java b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/api/UserApiTest.java new file mode 100644 index 000000000000..4e4efa4f0bd6 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/api/UserApiTest.java @@ -0,0 +1,141 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.api; + +import java.time.OffsetDateTime; +import org.openapitools.client.model.User; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * API tests for UserApi + */ +@Disabled +public class UserApiTest { + + private final UserApi api = new UserApi(); + + + /** + * Create user + * + * This can only be done by the logged in user. + */ + @Test + public void createUserTest() { + User user = null; + api.createUser(user); + + // TODO: test validations + } + + /** + * Creates list of users with given input array + * + * + */ + @Test + public void createUsersWithArrayInputTest() { + List user = null; + api.createUsersWithArrayInput(user); + + // TODO: test validations + } + + /** + * Creates list of users with given input array + * + * + */ + @Test + public void createUsersWithListInputTest() { + List user = null; + api.createUsersWithListInput(user); + + // TODO: test validations + } + + /** + * Delete user + * + * This can only be done by the logged in user. + */ + @Test + public void deleteUserTest() { + String username = null; + api.deleteUser(username); + + // TODO: test validations + } + + /** + * Get user by user name + * + * + */ + @Test + public void getUserByNameTest() { + String username = null; + User response = api.getUserByName(username); + + // TODO: test validations + } + + /** + * Logs user into the system + * + * + */ + @Test + public void loginUserTest() { + String username = null; + String password = null; + String response = api.loginUser(username, password); + + // TODO: test validations + } + + /** + * Logs out current logged in user session + * + * + */ + @Test + public void logoutUserTest() { + api.logoutUser(); + + // TODO: test validations + } + + /** + * Updated user + * + * This can only be done by the logged in user. + */ + @Test + public void updateUserTest() { + String username = null; + User user = null; + api.updateUser(username, user); + + // TODO: test validations + } + +} \ No newline at end of file diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/AllOfSimpleModelTest.java b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/AllOfSimpleModelTest.java new file mode 100644 index 000000000000..4c458f57fd1c --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/AllOfSimpleModelTest.java @@ -0,0 +1,50 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for AllOfSimpleModel + */ +class AllOfSimpleModelTest { + private final AllOfSimpleModel model = new AllOfSimpleModel(); + + /** + * Model tests for AllOfSimpleModel + */ + @Test + void testAllOfSimpleModel() { + // TODO: test AllOfSimpleModel + } + + /** + * Test the property 'arrayOfStrings' + */ + @Test + void arrayOfStringsTest() { + // TODO: test arrayOfStrings + } + +} diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/AnimalTest.java b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/AnimalTest.java new file mode 100644 index 000000000000..260bcbc5dfef --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/AnimalTest.java @@ -0,0 +1,58 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Animal + */ +class AnimalTest { + private final Animal model = new Animal(); + + /** + * Model tests for Animal + */ + @Test + void testAnimal() { + // TODO: test Animal + } + + /** + * Test the property 'className' + */ + @Test + void classNameTest() { + // TODO: test className + } + + /** + * Test the property 'color' + */ + @Test + void colorTest() { + // TODO: test color + } + +} diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/AnyTypeTestTest.java b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/AnyTypeTestTest.java new file mode 100644 index 000000000000..b35b413254e4 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/AnyTypeTestTest.java @@ -0,0 +1,70 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for AnyTypeTest + */ +class AnyTypeTestTest { + private final AnyTypeTest model = new AnyTypeTest(); + + /** + * Model tests for AnyTypeTest + */ + @Test + void testAnyTypeTest() { + // TODO: test AnyTypeTest + } + + /** + * Test the property 'anyTypeProperty' + */ + @Test + void anyTypePropertyTest() { + // TODO: test anyTypeProperty + } + + /** + * Test the property 'arrayProp' + */ + @Test + void arrayPropTest() { + // TODO: test arrayProp + } + + /** + * Test the property 'refArrayPrefixItems' + */ + @Test + void refArrayPrefixItemsTest() { + // TODO: test refArrayPrefixItems + } + +} diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/ArrayOfSameRefTest.java b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/ArrayOfSameRefTest.java new file mode 100644 index 000000000000..de5b449f4078 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/ArrayOfSameRefTest.java @@ -0,0 +1,67 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.client.model.Tag; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ArrayOfSameRef + */ +class ArrayOfSameRefTest { + private final ArrayOfSameRef model = new ArrayOfSameRef(); + + /** + * Model tests for ArrayOfSameRef + */ + @Test + void testArrayOfSameRef() { + // TODO: test ArrayOfSameRef + } + + /** + * Test the property 'arrayFooOne' + */ + @Test + void arrayFooOneTest() { + // TODO: test arrayFooOne + } + + /** + * Test the property 'arrayFooTwo' + */ + @Test + void arrayFooTwoTest() { + // TODO: test arrayFooTwo + } + + /** + * Test the property 'arrayFooThree' + */ + @Test + void arrayFooThreeTest() { + // TODO: test arrayFooThree + } + +} diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/CatTest.java b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/CatTest.java new file mode 100644 index 000000000000..3a724c296beb --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/CatTest.java @@ -0,0 +1,67 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.client.model.Animal; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Cat + */ +class CatTest { + private final Cat model = new Cat(); + + /** + * Model tests for Cat + */ + @Test + void testCat() { + // TODO: test Cat + } + + /** + * Test the property 'className' + */ + @Test + void classNameTest() { + // TODO: test className + } + + /** + * Test the property 'color' + */ + @Test + void colorTest() { + // TODO: test color + } + + /** + * Test the property 'declawed' + */ + @Test + void declawedTest() { + // TODO: test declawed + } + +} diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/CategoryTest.java b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/CategoryTest.java new file mode 100644 index 000000000000..9e6ed37ba429 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/CategoryTest.java @@ -0,0 +1,55 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Category + */ +class CategoryTest { + private final Category model = new Category(); + + /** + * Model tests for Category + */ + @Test + void testCategory() { + // TODO: test Category + } + + /** + * Test the property 'id' + */ + @Test + void idTest() { + // TODO: test id + } + + /** + * Test the property 'name' + */ + @Test + void nameTest() { + // TODO: test name + } + +} diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/CircularReference1Test.java b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/CircularReference1Test.java new file mode 100644 index 000000000000..1618613128b2 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/CircularReference1Test.java @@ -0,0 +1,48 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.client.model.CircularReference2; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for CircularReference1 + */ +class CircularReference1Test { + private final CircularReference1 model = new CircularReference1(); + + /** + * Model tests for CircularReference1 + */ + @Test + void testCircularReference1() { + // TODO: test CircularReference1 + } + + /** + * Test the property 'prop1' + */ + @Test + void prop1Test() { + // TODO: test prop1 + } + +} diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/CircularReference2Test.java b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/CircularReference2Test.java new file mode 100644 index 000000000000..f98b66ae1ee2 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/CircularReference2Test.java @@ -0,0 +1,48 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.client.model.CircularReference3; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for CircularReference2 + */ +class CircularReference2Test { + private final CircularReference2 model = new CircularReference2(); + + /** + * Model tests for CircularReference2 + */ + @Test + void testCircularReference2() { + // TODO: test CircularReference2 + } + + /** + * Test the property 'prop1' + */ + @Test + void prop1Test() { + // TODO: test prop1 + } + +} diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/CircularReference3Test.java b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/CircularReference3Test.java new file mode 100644 index 000000000000..0acd0e317162 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/CircularReference3Test.java @@ -0,0 +1,48 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.client.model.CircularReference1; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for CircularReference3 + */ +class CircularReference3Test { + private final CircularReference3 model = new CircularReference3(); + + /** + * Model tests for CircularReference3 + */ + @Test + void testCircularReference3() { + // TODO: test CircularReference3 + } + + /** + * Test the property 'prop1' + */ + @Test + void prop1Test() { + // TODO: test prop1 + } + +} diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/CodesEnumTest.java b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/CodesEnumTest.java new file mode 100644 index 000000000000..c212eb1fc6d0 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/CodesEnumTest.java @@ -0,0 +1,32 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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 org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for CodesEnum + */ +class CodesEnumTest { + /** + * Model tests for CodesEnum + */ + @Test + void testCodesEnum() { + // TODO: test CodesEnum + } + +} diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/DogTest.java b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/DogTest.java new file mode 100644 index 000000000000..cc607f3ef37f --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/DogTest.java @@ -0,0 +1,67 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.client.model.Animal; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Dog + */ +class DogTest { + private final Dog model = new Dog(); + + /** + * Model tests for Dog + */ + @Test + void testDog() { + // TODO: test Dog + } + + /** + * Test the property 'className' + */ + @Test + void classNameTest() { + // TODO: test className + } + + /** + * Test the property 'color' + */ + @Test + void colorTest() { + // TODO: test color + } + + /** + * Test the property 'breed' + */ + @Test + void breedTest() { + // TODO: test breed + } + +} diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/FakeWebhooksSourcesDeletedPostRequestEventTest.java b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/FakeWebhooksSourcesDeletedPostRequestEventTest.java new file mode 100644 index 000000000000..e7245d005d7e --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/FakeWebhooksSourcesDeletedPostRequestEventTest.java @@ -0,0 +1,47 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for FakeWebhooksSourcesDeletedPostRequestEvent + */ +class FakeWebhooksSourcesDeletedPostRequestEventTest { + private final FakeWebhooksSourcesDeletedPostRequestEvent model = new FakeWebhooksSourcesDeletedPostRequestEvent(); + + /** + * Model tests for FakeWebhooksSourcesDeletedPostRequestEvent + */ + @Test + void testFakeWebhooksSourcesDeletedPostRequestEvent() { + // TODO: test FakeWebhooksSourcesDeletedPostRequestEvent + } + + /** + * Test the property 'eventId' + */ + @Test + void eventIdTest() { + // TODO: test eventId + } + +} diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/FakeWebhooksSourcesDeletedPostRequestTest.java b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/FakeWebhooksSourcesDeletedPostRequestTest.java new file mode 100644 index 000000000000..63e573a78a14 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/FakeWebhooksSourcesDeletedPostRequestTest.java @@ -0,0 +1,65 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import org.openapitools.client.model.FakeWebhooksSourcesDeletedPostRequestEvent; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for FakeWebhooksSourcesDeletedPostRequest + */ +class FakeWebhooksSourcesDeletedPostRequestTest { + private final FakeWebhooksSourcesDeletedPostRequest model = new FakeWebhooksSourcesDeletedPostRequest(); + + /** + * Model tests for FakeWebhooksSourcesDeletedPostRequest + */ + @Test + void testFakeWebhooksSourcesDeletedPostRequest() { + // TODO: test FakeWebhooksSourcesDeletedPostRequest + } + + /** + * Test the property 'eventTimestamp' + */ + @Test + void eventTimestampTest() { + // TODO: test eventTimestamp + } + + /** + * Test the property 'eventType' + */ + @Test + void eventTypeTest() { + // TODO: test eventType + } + + /** + * Test the property 'event' + */ + @Test + void eventTest() { + // TODO: test event + } + +} diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java new file mode 100644 index 000000000000..8107defb722e --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java @@ -0,0 +1,63 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ModelApiResponse + */ +class ModelApiResponseTest { + private final ModelApiResponse model = new ModelApiResponse(); + + /** + * Model tests for ModelApiResponse + */ + @Test + void testModelApiResponse() { + // TODO: test ModelApiResponse + } + + /** + * Test the property 'code' + */ + @Test + void codeTest() { + // TODO: test code + } + + /** + * Test the property 'type' + */ + @Test + void typeTest() { + // TODO: test type + } + + /** + * Test the property 'message' + */ + @Test + void messageTest() { + // TODO: test message + } + +} diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/OneOfStringOrIntTest.java b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/OneOfStringOrIntTest.java new file mode 100644 index 000000000000..d682b2b290d4 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/OneOfStringOrIntTest.java @@ -0,0 +1,34 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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 org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OneOfStringOrInt + */ +class OneOfStringOrIntTest { + private final OneOfStringOrInt model = new OneOfStringOrInt(); + + /** + * Model tests for OneOfStringOrInt + */ + @Test + void testOneOfStringOrInt() { + // TODO: test OneOfStringOrInt + } + +} diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/OrderTest.java b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/OrderTest.java new file mode 100644 index 000000000000..d816dfd6d7ee --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/OrderTest.java @@ -0,0 +1,88 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Order + */ +class OrderTest { + private final Order model = new Order(); + + /** + * Model tests for Order + */ + @Test + void testOrder() { + // TODO: test Order + } + + /** + * Test the property 'id' + */ + @Test + void idTest() { + // TODO: test id + } + + /** + * Test the property 'petId' + */ + @Test + void petIdTest() { + // TODO: test petId + } + + /** + * Test the property 'quantity' + */ + @Test + void quantityTest() { + // TODO: test quantity + } + + /** + * Test the property 'shipDate' + */ + @Test + void shipDateTest() { + // TODO: test shipDate + } + + /** + * Test the property 'status' + */ + @Test + void statusTest() { + // TODO: test status + } + + /** + * Test the property 'complete' + */ + @Test + void completeTest() { + // TODO: test complete + } + +} diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/PetTest.java b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/PetTest.java new file mode 100644 index 000000000000..84aff8adbf96 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/PetTest.java @@ -0,0 +1,92 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.client.model.Category; +import org.openapitools.client.model.Tag; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Pet + */ +class PetTest { + private final Pet model = new Pet(); + + /** + * Model tests for Pet + */ + @Test + void testPet() { + // TODO: test Pet + } + + /** + * Test the property 'id' + */ + @Test + void idTest() { + // TODO: test id + } + + /** + * Test the property 'category' + */ + @Test + void categoryTest() { + // TODO: test category + } + + /** + * Test the property 'name' + */ + @Test + void nameTest() { + // TODO: test name + } + + /** + * Test the property 'photoUrls' + */ + @Test + void photoUrlsTest() { + // TODO: test photoUrls + } + + /** + * Test the property 'tags' + */ + @Test + void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'status' + */ + @Test + void statusTest() { + // TODO: test status + } + +} diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/PetWithTypesObjectNullAndRefTest.java b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/PetWithTypesObjectNullAndRefTest.java new file mode 100644 index 000000000000..719f559edeee --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/PetWithTypesObjectNullAndRefTest.java @@ -0,0 +1,48 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.client.model.Pet; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for PetWithTypesObjectNullAndRef + */ +class PetWithTypesObjectNullAndRefTest { + private final PetWithTypesObjectNullAndRef model = new PetWithTypesObjectNullAndRef(); + + /** + * Model tests for PetWithTypesObjectNullAndRef + */ + @Test + void testPetWithTypesObjectNullAndRef() { + // TODO: test PetWithTypesObjectNullAndRef + } + + /** + * Test the property 'firstProperty' + */ + @Test + void firstPropertyTest() { + // TODO: test firstProperty + } + +} diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/RefRefToPathLevelParameterOneofRefToOneofParameterTest.java b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/RefRefToPathLevelParameterOneofRefToOneofParameterTest.java new file mode 100644 index 000000000000..5fe32b65edd0 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/RefRefToPathLevelParameterOneofRefToOneofParameterTest.java @@ -0,0 +1,35 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.fasterxml.jackson.annotation.JsonTypeName; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for RefRefToPathLevelParameterOneofRefToOneofParameter + */ +class RefRefToPathLevelParameterOneofRefToOneofParameterTest { + private final RefRefToPathLevelParameterOneofRefToOneofParameter model = new RefRefToPathLevelParameterOneofRefToOneofParameter(); + + /** + * Model tests for RefRefToPathLevelParameterOneofRefToOneofParameter + */ + @Test + void testRefRefToPathLevelParameterOneofRefToOneofParameter() { + // TODO: test RefRefToPathLevelParameterOneofRefToOneofParameter + } + +} diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/RefToRefParameterAnyofRefToAnyofParameterTest.java b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/RefToRefParameterAnyofRefToAnyofParameterTest.java new file mode 100644 index 000000000000..2dfa864a7e7f --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/RefToRefParameterAnyofRefToAnyofParameterTest.java @@ -0,0 +1,36 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for RefToRefParameterAnyofRefToAnyofParameter + */ +class RefToRefParameterAnyofRefToAnyofParameterTest { + private final RefToRefParameterAnyofRefToAnyofParameter model = new RefToRefParameterAnyofRefToAnyofParameter(); + + /** + * Model tests for RefToRefParameterAnyofRefToAnyofParameter + */ + @Test + void testRefToRefParameterAnyofRefToAnyofParameter() { + // TODO: test RefToRefParameterAnyofRefToAnyofParameter + } + +} diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/SelfReferenceAdditionalPropertiesTest.java b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/SelfReferenceAdditionalPropertiesTest.java new file mode 100644 index 000000000000..66765851a881 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/SelfReferenceAdditionalPropertiesTest.java @@ -0,0 +1,47 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for SelfReferenceAdditionalProperties + */ +class SelfReferenceAdditionalPropertiesTest { + private final SelfReferenceAdditionalProperties model = new SelfReferenceAdditionalProperties(); + + /** + * Model tests for SelfReferenceAdditionalProperties + */ + @Test + void testSelfReferenceAdditionalProperties() { + // TODO: test SelfReferenceAdditionalProperties + } + + /** + * Test the property 'dummy' + */ + @Test + void dummyTest() { + // TODO: test dummy + } + +} diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/SelfReferenceAnyOfTest.java b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/SelfReferenceAnyOfTest.java new file mode 100644 index 000000000000..b8e4fbfbe499 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/SelfReferenceAnyOfTest.java @@ -0,0 +1,34 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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 org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for SelfReferenceAnyOf + */ +class SelfReferenceAnyOfTest { + private final SelfReferenceAnyOf model = new SelfReferenceAnyOf(); + + /** + * Model tests for SelfReferenceAnyOf + */ + @Test + void testSelfReferenceAnyOf() { + // TODO: test SelfReferenceAnyOf + } + +} diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/SelfReferenceOneOfTest.java b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/SelfReferenceOneOfTest.java new file mode 100644 index 000000000000..f1740f47402b --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/SelfReferenceOneOfTest.java @@ -0,0 +1,34 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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 org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for SelfReferenceOneOf + */ +class SelfReferenceOneOfTest { + private final SelfReferenceOneOf model = new SelfReferenceOneOf(); + + /** + * Model tests for SelfReferenceOneOf + */ + @Test + void testSelfReferenceOneOf() { + // TODO: test SelfReferenceOneOf + } + +} diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/SimpleModelWithArrayPropertyTest.java b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/SimpleModelWithArrayPropertyTest.java new file mode 100644 index 000000000000..92a2d93791eb --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/SimpleModelWithArrayPropertyTest.java @@ -0,0 +1,50 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for SimpleModelWithArrayProperty + */ +class SimpleModelWithArrayPropertyTest { + private final SimpleModelWithArrayProperty model = new SimpleModelWithArrayProperty(); + + /** + * Model tests for SimpleModelWithArrayProperty + */ + @Test + void testSimpleModelWithArrayProperty() { + // TODO: test SimpleModelWithArrayProperty + } + + /** + * Test the property 'arrayOfStrings' + */ + @Test + void arrayOfStringsTest() { + // TODO: test arrayOfStrings + } + +} diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/StringOrIntTest.java b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/StringOrIntTest.java new file mode 100644 index 000000000000..a24b27bd04e6 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/StringOrIntTest.java @@ -0,0 +1,34 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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 org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for StringOrInt + */ +class StringOrIntTest { + private final StringOrInt model = new StringOrInt(); + + /** + * Model tests for StringOrInt + */ + @Test + void testStringOrInt() { + // TODO: test StringOrInt + } + +} diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/TagTest.java b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/TagTest.java new file mode 100644 index 000000000000..20774cafe381 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/TagTest.java @@ -0,0 +1,55 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Tag + */ +class TagTest { + private final Tag model = new Tag(); + + /** + * Model tests for Tag + */ + @Test + void testTag() { + // TODO: test Tag + } + + /** + * Test the property 'id' + */ + @Test + void idTest() { + // TODO: test id + } + + /** + * Test the property 'name' + */ + @Test + void nameTest() { + // TODO: test name + } + +} diff --git a/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/UserTest.java b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/UserTest.java new file mode 100644 index 000000000000..25bc6abb64a7 --- /dev/null +++ b/samples/client/others/java/restclient-enum-in-multipart/src/test/java/org/openapitools/client/model/UserTest.java @@ -0,0 +1,103 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * 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.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for User + */ +class UserTest { + private final User model = new User(); + + /** + * Model tests for User + */ + @Test + void testUser() { + // TODO: test User + } + + /** + * Test the property 'id' + */ + @Test + void idTest() { + // TODO: test id + } + + /** + * Test the property 'username' + */ + @Test + void usernameTest() { + // TODO: test username + } + + /** + * Test the property 'firstName' + */ + @Test + void firstNameTest() { + // TODO: test firstName + } + + /** + * Test the property 'lastName' + */ + @Test + void lastNameTest() { + // TODO: test lastName + } + + /** + * Test the property 'email' + */ + @Test + void emailTest() { + // TODO: test email + } + + /** + * Test the property 'password' + */ + @Test + void passwordTest() { + // TODO: test password + } + + /** + * Test the property 'phone' + */ + @Test + void phoneTest() { + // TODO: test phone + } + + /** + * Test the property 'userStatus' + */ + @Test + void userStatusTest() { + // TODO: test userStatus + } + +} diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/api/FakeApi.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/api/FakeApi.java index d226da16948e..0f1053af3743 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/api/FakeApi.java @@ -12,7 +12,7 @@ import org.openapitools.model.FileSchemaTestClassDto; import java.time.LocalDate; import java.util.Map; -import org.springframework.lang.Nullable; +import org.jspecify.annotations.Nullable; import java.time.OffsetDateTime; import org.openapitools.model.OuterCompositeDto; import org.openapitools.model.UserDto; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/api/PetApi.java index dd7c3d5d2d09..7493d8a038bc 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/api/PetApi.java @@ -6,7 +6,7 @@ package org.openapitools.api; import org.openapitools.model.ApiResponseDto; -import org.springframework.lang.Nullable; +import org.jspecify.annotations.Nullable; import org.openapitools.model.PetDto; import org.openapitools.model.ResponseObjectWithDifferentFieldNamesDto; import java.util.Set; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesAnyTypeDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesAnyTypeDto.java index c559ed4caa74..c568e19edb7e 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesAnyTypeDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesAnyTypeDto.java @@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; -import org.springframework.lang.Nullable; +import org.jspecify.annotations.Nullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesArrayDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesArrayDto.java index fc99434acab5..822d8d4a582c 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesArrayDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesArrayDto.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.List; -import org.springframework.lang.Nullable; +import org.jspecify.annotations.Nullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesBooleanDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesBooleanDto.java index 3f496145ff73..223944df4fb1 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesBooleanDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesBooleanDto.java @@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; -import org.springframework.lang.Nullable; +import org.jspecify.annotations.Nullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java index 59cb79eca667..5a63d8fb7d8c 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java @@ -9,7 +9,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.springframework.lang.Nullable; +import org.jspecify.annotations.Nullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesIntegerDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesIntegerDto.java index 0482cf028a7c..398cff0d5d48 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesIntegerDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesIntegerDto.java @@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; -import org.springframework.lang.Nullable; +import org.jspecify.annotations.Nullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesNumberDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesNumberDto.java index 89f1fa28c6ad..22b81b39baea 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesNumberDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesNumberDto.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import java.math.BigDecimal; -import org.springframework.lang.Nullable; +import org.jspecify.annotations.Nullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesObjectDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesObjectDto.java index 187c8fa5afe3..d8394c24f65d 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesObjectDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesObjectDto.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.Map; -import org.springframework.lang.Nullable; +import org.jspecify.annotations.Nullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesStringDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesStringDto.java index 8bf74154da08..c135b71016bb 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesStringDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesStringDto.java @@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; -import org.springframework.lang.Nullable; +import org.jspecify.annotations.Nullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AnimalDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AnimalDto.java index 3fb3a3d9a33d..297058d2b67e 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AnimalDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AnimalDto.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -import org.springframework.lang.Nullable; +import org.jspecify.annotations.Nullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ApiResponseDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ApiResponseDto.java index c55bac6dc22f..21d37370c102 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ApiResponseDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ApiResponseDto.java @@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; -import org.springframework.lang.Nullable; +import org.jspecify.annotations.Nullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java index b2200269557f..88cee0224f21 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java @@ -9,7 +9,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import org.springframework.lang.Nullable; +import org.jspecify.annotations.Nullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java index aae7fc2e371c..b1c63cc4607e 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java @@ -9,7 +9,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import org.springframework.lang.Nullable; +import org.jspecify.annotations.Nullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayTestDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayTestDto.java index 20fc796f00f7..60e1d4562780 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayTestDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayTestDto.java @@ -8,8 +8,8 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import org.jspecify.annotations.Nullable; import org.openapitools.model.ReadOnlyFirstDto; -import org.springframework.lang.Nullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/BigCatDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/BigCatDto.java index b142fe9e907c..52a1caa75c01 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/BigCatDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/BigCatDto.java @@ -9,8 +9,8 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; +import org.jspecify.annotations.Nullable; import org.openapitools.model.CatDto; -import org.springframework.lang.Nullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/CapitalizationDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/CapitalizationDto.java index 95146dd963b7..67210e08f663 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/CapitalizationDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/CapitalizationDto.java @@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; -import org.springframework.lang.Nullable; +import org.jspecify.annotations.Nullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/CatDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/CatDto.java index b3a40809e8bb..7a64a3338cc3 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/CatDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/CatDto.java @@ -8,8 +8,8 @@ import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import org.jspecify.annotations.Nullable; import org.openapitools.model.AnimalDto; -import org.springframework.lang.Nullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/CategoryDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/CategoryDto.java index d7b74f7eb2e2..4633202bbe84 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/CategoryDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/CategoryDto.java @@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; -import org.springframework.lang.Nullable; +import org.jspecify.annotations.Nullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ChildWithNullableDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ChildWithNullableDto.java index 2db99fe4fc3a..81f6aaf75c6b 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ChildWithNullableDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ChildWithNullableDto.java @@ -9,8 +9,8 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; +import org.jspecify.annotations.Nullable; import org.openapitools.model.ParentWithNullableDto; -import org.springframework.lang.Nullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ClassModelDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ClassModelDto.java index 0214d0115d31..1ebd34cf7008 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ClassModelDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ClassModelDto.java @@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; -import org.springframework.lang.Nullable; +import org.jspecify.annotations.Nullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ClientDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ClientDto.java index 51f9c586b728..8be26b1923f4 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ClientDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ClientDto.java @@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; -import org.springframework.lang.Nullable; +import org.jspecify.annotations.Nullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java index 8d16a739fcd3..2e4fdbb23680 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java @@ -8,7 +8,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import org.springframework.lang.Nullable; +import org.jspecify.annotations.Nullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/DogDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/DogDto.java index d967a2f4836f..718ea8dd6e14 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/DogDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/DogDto.java @@ -8,8 +8,8 @@ import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import org.jspecify.annotations.Nullable; import org.openapitools.model.AnimalDto; -import org.springframework.lang.Nullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/EnumArraysDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/EnumArraysDto.java index 9fb27c6d2d98..942058854f1c 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/EnumArraysDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/EnumArraysDto.java @@ -9,7 +9,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import org.springframework.lang.Nullable; +import org.jspecify.annotations.Nullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/EnumTestDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/EnumTestDto.java index 36f6971bead3..c513e526a2fb 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/EnumTestDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/EnumTestDto.java @@ -6,8 +6,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; +import org.jspecify.annotations.Nullable; import org.openapitools.model.OuterEnumDto; -import org.springframework.lang.Nullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/FileDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/FileDto.java index 6156568204f0..3e011f47e503 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/FileDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/FileDto.java @@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; -import org.springframework.lang.Nullable; +import org.jspecify.annotations.Nullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java index fd779ee0be7b..b91513c5a9ea 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java @@ -8,8 +8,8 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import org.jspecify.annotations.Nullable; import org.openapitools.model.FileDto; -import org.springframework.lang.Nullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/FormatTestDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/FormatTestDto.java index 799a2483e5d9..28318a88de94 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/FormatTestDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/FormatTestDto.java @@ -10,8 +10,8 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; +import org.jspecify.annotations.Nullable; import org.springframework.format.annotation.DateTimeFormat; -import org.springframework.lang.Nullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/HasOnlyReadOnlyDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/HasOnlyReadOnlyDto.java index 67c61e820b2a..a925e634516f 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/HasOnlyReadOnlyDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/HasOnlyReadOnlyDto.java @@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; -import org.springframework.lang.Nullable; +import org.jspecify.annotations.Nullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ListDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ListDto.java index 59920e0e47e8..af125ae43eed 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ListDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ListDto.java @@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; -import org.springframework.lang.Nullable; +import org.jspecify.annotations.Nullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/MapTestDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/MapTestDto.java index a7f529b49cbb..7578b50eaf94 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/MapTestDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/MapTestDto.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.util.HashMap; import java.util.Map; -import org.springframework.lang.Nullable; +import org.jspecify.annotations.Nullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java index b86807071e6f..37bfb2f2af38 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java @@ -9,9 +9,9 @@ import java.util.HashMap; import java.util.Map; import java.util.UUID; +import org.jspecify.annotations.Nullable; import org.openapitools.model.AnimalDto; import org.springframework.format.annotation.DateTimeFormat; -import org.springframework.lang.Nullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/Model200ResponseDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/Model200ResponseDto.java index cb125398160f..029671b8ee6f 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/Model200ResponseDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/Model200ResponseDto.java @@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; -import org.springframework.lang.Nullable; +import org.jspecify.annotations.Nullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/NameDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/NameDto.java index 3184c53a41e8..50a37da2eee9 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/NameDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/NameDto.java @@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; -import org.springframework.lang.Nullable; +import org.jspecify.annotations.Nullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/NullableMapPropertyDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/NullableMapPropertyDto.java index 9849865b0dcb..07e782746ee6 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/NullableMapPropertyDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/NullableMapPropertyDto.java @@ -7,7 +7,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.HashMap; import java.util.Map; -import org.springframework.lang.Nullable; +import org.jspecify.annotations.Nullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/NumberOnlyDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/NumberOnlyDto.java index 60e0a87fa15e..3fcf7cbef3ed 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/NumberOnlyDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/NumberOnlyDto.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import java.math.BigDecimal; -import org.springframework.lang.Nullable; +import org.jspecify.annotations.Nullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/OrderDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/OrderDto.java index 86b3e44a8b77..7ac8519d8dd8 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/OrderDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/OrderDto.java @@ -7,8 +7,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.time.OffsetDateTime; +import org.jspecify.annotations.Nullable; import org.springframework.format.annotation.DateTimeFormat; -import org.springframework.lang.Nullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/OuterCompositeDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/OuterCompositeDto.java index 212f9a0f43ab..c6b6a267c861 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/OuterCompositeDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/OuterCompositeDto.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import java.math.BigDecimal; -import org.springframework.lang.Nullable; +import org.jspecify.annotations.Nullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ParentWithNullableDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ParentWithNullableDto.java index d00a29aaad84..1f6c2a885bda 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ParentWithNullableDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ParentWithNullableDto.java @@ -9,7 +9,7 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import org.springframework.lang.Nullable; +import org.jspecify.annotations.Nullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/PetDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/PetDto.java index 46576a0e0b99..3ce81b582171 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/PetDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/PetDto.java @@ -11,9 +11,9 @@ import java.util.LinkedHashSet; import java.util.List; import java.util.Set; +import org.jspecify.annotations.Nullable; import org.openapitools.model.CategoryDto; import org.openapitools.model.TagDto; -import org.springframework.lang.Nullable; import tools.jackson.databind.annotation.JsonDeserialize; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ReadOnlyFirstDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ReadOnlyFirstDto.java index e3d4a51b86c6..ed374cc7e66a 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ReadOnlyFirstDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ReadOnlyFirstDto.java @@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; -import org.springframework.lang.Nullable; +import org.jspecify.annotations.Nullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNamesDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNamesDto.java index 58a0322dfa8c..3864b4cf8cc1 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNamesDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNamesDto.java @@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; -import org.springframework.lang.Nullable; +import org.jspecify.annotations.Nullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ReturnDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ReturnDto.java index 4d20e8847acf..949b935c0552 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ReturnDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ReturnDto.java @@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; -import org.springframework.lang.Nullable; +import org.jspecify.annotations.Nullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/SpecialModelNameDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/SpecialModelNameDto.java index 6797ca0cfcdb..f2c4b025936a 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/SpecialModelNameDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/SpecialModelNameDto.java @@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; -import org.springframework.lang.Nullable; +import org.jspecify.annotations.Nullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/TagDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/TagDto.java index e6540c67b3cc..a348b84105c3 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/TagDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/TagDto.java @@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; -import org.springframework.lang.Nullable; +import org.jspecify.annotations.Nullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java index 6583dfae5d54..b1a85d357619 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java @@ -9,7 +9,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import org.springframework.lang.Nullable; +import org.jspecify.annotations.Nullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/TypeHolderExampleDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/TypeHolderExampleDto.java index b53a873600e6..d1e2475955c9 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/TypeHolderExampleDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/TypeHolderExampleDto.java @@ -9,7 +9,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import org.springframework.lang.Nullable; +import org.jspecify.annotations.Nullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/UserDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/UserDto.java index f62b212849bb..3cc96340175a 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/UserDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/UserDto.java @@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; -import org.springframework.lang.Nullable; +import org.jspecify.annotations.Nullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/XmlItemDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/XmlItemDto.java index 6c440e794383..42dbadbb301d 100644 --- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/XmlItemDto.java +++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/XmlItemDto.java @@ -9,7 +9,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import org.springframework.lang.Nullable; +import org.jspecify.annotations.Nullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; diff --git a/samples/openapi3/client/petstore/spring-cloud-4-with-optional/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud-4-with-optional/src/main/java/org/openapitools/api/PetApi.java index b18425a1cf47..e8ae7da2386b 100644 --- a/samples/openapi3/client/petstore/spring-cloud-4-with-optional/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-4-with-optional/src/main/java/org/openapitools/api/PetApi.java @@ -6,7 +6,7 @@ package org.openapitools.api; import org.openapitools.model.ModelApiResponse; -import org.springframework.lang.Nullable; +import org.jspecify.annotations.Nullable; import org.openapitools.model.Pet; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; diff --git a/samples/openapi3/client/petstore/spring-cloud-4-with-optional/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/client/petstore/spring-cloud-4-with-optional/src/main/java/org/openapitools/model/Category.java index c745379ec863..c6cb82e6c7b0 100644 --- a/samples/openapi3/client/petstore/spring-cloud-4-with-optional/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/client/petstore/spring-cloud-4-with-optional/src/main/java/org/openapitools/model/Category.java @@ -4,7 +4,7 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; -import org.springframework.lang.Nullable; +import org.jspecify.annotations.Nullable; import java.time.OffsetDateTime; import jakarta.validation.Valid; import jakarta.validation.constraints.*; diff --git a/samples/openapi3/client/petstore/spring-cloud-4-with-optional/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/client/petstore/spring-cloud-4-with-optional/src/main/java/org/openapitools/model/ModelApiResponse.java index a7cc7a8c076a..55e8f02171c7 100644 --- a/samples/openapi3/client/petstore/spring-cloud-4-with-optional/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/openapi3/client/petstore/spring-cloud-4-with-optional/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; -import org.springframework.lang.Nullable; +import org.jspecify.annotations.Nullable; import java.time.OffsetDateTime; import jakarta.validation.Valid; import jakarta.validation.constraints.*; diff --git a/samples/openapi3/client/petstore/spring-cloud-4-with-optional/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/client/petstore/spring-cloud-4-with-optional/src/main/java/org/openapitools/model/Order.java index 30c0a01327e0..b0ebd3a8ec20 100644 --- a/samples/openapi3/client/petstore/spring-cloud-4-with-optional/src/main/java/org/openapitools/model/Order.java +++ b/samples/openapi3/client/petstore/spring-cloud-4-with-optional/src/main/java/org/openapitools/model/Order.java @@ -6,8 +6,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import java.time.OffsetDateTime; +import org.jspecify.annotations.Nullable; import org.springframework.format.annotation.DateTimeFormat; -import org.springframework.lang.Nullable; import java.time.OffsetDateTime; import jakarta.validation.Valid; import jakarta.validation.constraints.*; diff --git a/samples/openapi3/client/petstore/spring-cloud-4-with-optional/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud-4-with-optional/src/main/java/org/openapitools/model/Pet.java index ea1025927377..de719b51e645 100644 --- a/samples/openapi3/client/petstore/spring-cloud-4-with-optional/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud-4-with-optional/src/main/java/org/openapitools/model/Pet.java @@ -8,9 +8,9 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import org.jspecify.annotations.Nullable; import org.openapitools.model.Category; import org.openapitools.model.Tag; -import org.springframework.lang.Nullable; import java.time.OffsetDateTime; import jakarta.validation.Valid; import jakarta.validation.constraints.*; diff --git a/samples/openapi3/client/petstore/spring-cloud-4-with-optional/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/client/petstore/spring-cloud-4-with-optional/src/main/java/org/openapitools/model/Tag.java index 4411b2f6db3b..fc688fa86f7f 100644 --- a/samples/openapi3/client/petstore/spring-cloud-4-with-optional/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/client/petstore/spring-cloud-4-with-optional/src/main/java/org/openapitools/model/Tag.java @@ -4,7 +4,7 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; -import org.springframework.lang.Nullable; +import org.jspecify.annotations.Nullable; import java.time.OffsetDateTime; import jakarta.validation.Valid; import jakarta.validation.constraints.*; diff --git a/samples/openapi3/client/petstore/spring-cloud-4-with-optional/src/main/java/org/openapitools/model/User.java b/samples/openapi3/client/petstore/spring-cloud-4-with-optional/src/main/java/org/openapitools/model/User.java index 940517699a34..4f16087ff2d8 100644 --- a/samples/openapi3/client/petstore/spring-cloud-4-with-optional/src/main/java/org/openapitools/model/User.java +++ b/samples/openapi3/client/petstore/spring-cloud-4-with-optional/src/main/java/org/openapitools/model/User.java @@ -4,7 +4,7 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; -import org.springframework.lang.Nullable; +import org.jspecify.annotations.Nullable; import java.time.OffsetDateTime; import jakarta.validation.Valid; import jakarta.validation.constraints.*; diff --git a/samples/openapi3/server/petstore/springboot-4/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-4/src/main/java/org/openapitools/api/PetApi.java index 68b37b9e4285..d3e05e21190e 100644 --- a/samples/openapi3/server/petstore/springboot-4/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-4/src/main/java/org/openapitools/api/PetApi.java @@ -6,7 +6,7 @@ package org.openapitools.api; import org.openapitools.model.ModelApiResponse; -import org.springframework.lang.Nullable; +import org.jspecify.annotations.Nullable; import org.openapitools.model.Pet; import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; diff --git a/samples/openapi3/server/petstore/springboot-4/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/server/petstore/springboot-4/src/main/java/org/openapitools/model/Category.java index 00bee6b2603b..141a8b543078 100644 --- a/samples/openapi3/server/petstore/springboot-4/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/server/petstore/springboot-4/src/main/java/org/openapitools/model/Category.java @@ -4,7 +4,7 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; -import org.springframework.lang.Nullable; +import org.jspecify.annotations.Nullable; import java.time.OffsetDateTime; import jakarta.validation.Valid; import jakarta.validation.constraints.*; diff --git a/samples/openapi3/server/petstore/springboot-4/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/server/petstore/springboot-4/src/main/java/org/openapitools/model/ModelApiResponse.java index a36a10fd8504..3e7390ce08d6 100644 --- a/samples/openapi3/server/petstore/springboot-4/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/openapi3/server/petstore/springboot-4/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; -import org.springframework.lang.Nullable; +import org.jspecify.annotations.Nullable; import java.time.OffsetDateTime; import jakarta.validation.Valid; import jakarta.validation.constraints.*; diff --git a/samples/openapi3/server/petstore/springboot-4/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/server/petstore/springboot-4/src/main/java/org/openapitools/model/Order.java index 5b93f2588ac8..aa7fbc19a45e 100644 --- a/samples/openapi3/server/petstore/springboot-4/src/main/java/org/openapitools/model/Order.java +++ b/samples/openapi3/server/petstore/springboot-4/src/main/java/org/openapitools/model/Order.java @@ -6,8 +6,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import java.time.OffsetDateTime; +import org.jspecify.annotations.Nullable; import org.springframework.format.annotation.DateTimeFormat; -import org.springframework.lang.Nullable; import java.time.OffsetDateTime; import jakarta.validation.Valid; import jakarta.validation.constraints.*; diff --git a/samples/openapi3/server/petstore/springboot-4/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-4/src/main/java/org/openapitools/model/Pet.java index a96cfd7e3f8d..ff806e4e1d90 100644 --- a/samples/openapi3/server/petstore/springboot-4/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-4/src/main/java/org/openapitools/model/Pet.java @@ -8,9 +8,9 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import org.jspecify.annotations.Nullable; import org.openapitools.model.Category; import org.openapitools.model.Tag; -import org.springframework.lang.Nullable; import java.time.OffsetDateTime; import jakarta.validation.Valid; import jakarta.validation.constraints.*; diff --git a/samples/openapi3/server/petstore/springboot-4/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/server/petstore/springboot-4/src/main/java/org/openapitools/model/Tag.java index 7dfa82af90e8..1e860da3df75 100644 --- a/samples/openapi3/server/petstore/springboot-4/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/server/petstore/springboot-4/src/main/java/org/openapitools/model/Tag.java @@ -4,7 +4,7 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; -import org.springframework.lang.Nullable; +import org.jspecify.annotations.Nullable; import java.time.OffsetDateTime; import jakarta.validation.Valid; import jakarta.validation.constraints.*; diff --git a/samples/openapi3/server/petstore/springboot-4/src/main/java/org/openapitools/model/User.java b/samples/openapi3/server/petstore/springboot-4/src/main/java/org/openapitools/model/User.java index dd221d81e20f..c4c2ad805828 100644 --- a/samples/openapi3/server/petstore/springboot-4/src/main/java/org/openapitools/model/User.java +++ b/samples/openapi3/server/petstore/springboot-4/src/main/java/org/openapitools/model/User.java @@ -4,7 +4,7 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; -import org.springframework.lang.Nullable; +import org.jspecify.annotations.Nullable; import java.time.OffsetDateTime; import jakarta.validation.Valid; import jakarta.validation.constraints.*;