Merge remote-tracking branch 'origin/5.3.x' into 6.0.x

This commit is contained in:
William Cheng
2021-07-27 11:52:19 +08:00
1011 changed files with 34058 additions and 5848 deletions

View File

@@ -4,27 +4,20 @@ README.md
api/openapi.yaml
build.gradle
build.sbt
docs/AdditionalPropertiesAnyType.md
docs/AdditionalPropertiesArray.md
docs/AdditionalPropertiesBoolean.md
docs/AdditionalPropertiesClass.md
docs/AdditionalPropertiesInteger.md
docs/AdditionalPropertiesNumber.md
docs/AdditionalPropertiesObject.md
docs/AdditionalPropertiesString.md
docs/Animal.md
docs/AnotherFakeApi.md
docs/ArrayOfArrayOfNumberOnly.md
docs/ArrayOfNumberOnly.md
docs/ArrayTest.md
docs/BigCat.md
docs/BigCatAllOf.md
docs/Capitalization.md
docs/Cat.md
docs/CatAllOf.md
docs/Category.md
docs/ClassModel.md
docs/Client.md
docs/DefaultApi.md
docs/DeprecatedObject.md
docs/Dog.md
docs/DogAllOf.md
docs/EnumArrays.md
@@ -33,29 +26,35 @@ docs/EnumTest.md
docs/FakeApi.md
docs/FakeClassnameTags123Api.md
docs/FileSchemaTestClass.md
docs/Foo.md
docs/FormatTest.md
docs/HasOnlyReadOnly.md
docs/HealthCheckResult.md
docs/InlineResponseDefault.md
docs/MapTest.md
docs/MixedPropertiesAndAdditionalPropertiesClass.md
docs/Model200Response.md
docs/ModelApiResponse.md
docs/ModelReturn.md
docs/Name.md
docs/NullableClass.md
docs/NumberOnly.md
docs/ObjectWithDeprecatedFields.md
docs/Order.md
docs/OuterComposite.md
docs/OuterEnum.md
docs/OuterEnumDefaultValue.md
docs/OuterEnumInteger.md
docs/OuterEnumIntegerDefaultValue.md
docs/OuterObjectWithEnumProperty.md
docs/Pet.md
docs/PetApi.md
docs/ReadOnlyFirst.md
docs/SpecialModelName.md
docs/StoreApi.md
docs/Tag.md
docs/TypeHolderDefault.md
docs/TypeHolderExample.md
docs/User.md
docs/UserApi.md
docs/XmlItem.md
git_push.sh
gradle.properties
gradle/wrapper/gradle-wrapper.jar
@@ -72,6 +71,7 @@ src/main/java/org/openapitools/client/ServerConfiguration.java
src/main/java/org/openapitools/client/ServerVariable.java
src/main/java/org/openapitools/client/StringUtil.java
src/main/java/org/openapitools/client/api/AnotherFakeApi.java
src/main/java/org/openapitools/client/api/DefaultApi.java
src/main/java/org/openapitools/client/api/FakeApi.java
src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java
src/main/java/org/openapitools/client/api/PetApi.java
@@ -83,49 +83,47 @@ src/main/java/org/openapitools/client/auth/HttpBasicAuth.java
src/main/java/org/openapitools/client/auth/HttpBearerAuth.java
src/main/java/org/openapitools/client/auth/OAuth.java
src/main/java/org/openapitools/client/auth/OAuthFlow.java
src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java
src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java
src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java
src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java
src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java
src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java
src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java
src/main/java/org/openapitools/client/model/Animal.java
src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java
src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java
src/main/java/org/openapitools/client/model/ArrayTest.java
src/main/java/org/openapitools/client/model/BigCat.java
src/main/java/org/openapitools/client/model/BigCatAllOf.java
src/main/java/org/openapitools/client/model/Capitalization.java
src/main/java/org/openapitools/client/model/Cat.java
src/main/java/org/openapitools/client/model/CatAllOf.java
src/main/java/org/openapitools/client/model/Category.java
src/main/java/org/openapitools/client/model/ClassModel.java
src/main/java/org/openapitools/client/model/Client.java
src/main/java/org/openapitools/client/model/DeprecatedObject.java
src/main/java/org/openapitools/client/model/Dog.java
src/main/java/org/openapitools/client/model/DogAllOf.java
src/main/java/org/openapitools/client/model/EnumArrays.java
src/main/java/org/openapitools/client/model/EnumClass.java
src/main/java/org/openapitools/client/model/EnumTest.java
src/main/java/org/openapitools/client/model/FileSchemaTestClass.java
src/main/java/org/openapitools/client/model/Foo.java
src/main/java/org/openapitools/client/model/FormatTest.java
src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java
src/main/java/org/openapitools/client/model/HealthCheckResult.java
src/main/java/org/openapitools/client/model/InlineResponseDefault.java
src/main/java/org/openapitools/client/model/MapTest.java
src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java
src/main/java/org/openapitools/client/model/Model200Response.java
src/main/java/org/openapitools/client/model/ModelApiResponse.java
src/main/java/org/openapitools/client/model/ModelReturn.java
src/main/java/org/openapitools/client/model/Name.java
src/main/java/org/openapitools/client/model/NullableClass.java
src/main/java/org/openapitools/client/model/NumberOnly.java
src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java
src/main/java/org/openapitools/client/model/Order.java
src/main/java/org/openapitools/client/model/OuterComposite.java
src/main/java/org/openapitools/client/model/OuterEnum.java
src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java
src/main/java/org/openapitools/client/model/OuterEnumInteger.java
src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java
src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java
src/main/java/org/openapitools/client/model/Pet.java
src/main/java/org/openapitools/client/model/ReadOnlyFirst.java
src/main/java/org/openapitools/client/model/SpecialModelName.java
src/main/java/org/openapitools/client/model/Tag.java
src/main/java/org/openapitools/client/model/TypeHolderDefault.java
src/main/java/org/openapitools/client/model/TypeHolderExample.java
src/main/java/org/openapitools/client/model/User.java
src/main/java/org/openapitools/client/model/XmlItem.java

View File

@@ -84,9 +84,9 @@ public class AnotherFakeApiExample {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient);
Client body = new Client(); // Client | client model
Client client = new Client(); // Client | client model
try {
Client result = apiInstance.call123testSpecialTags(body);
Client result = apiInstance.call123testSpecialTags(client);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags");
@@ -107,15 +107,19 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*AnotherFakeApi* | [**call123testSpecialTags**](docs/AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
*FakeApi* | [**createXmlItem**](docs/FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem
*DefaultApi* | [**fooGet**](docs/DefaultApi.md#fooGet) | **GET** /foo |
*FakeApi* | [**fakeHealthGet**](docs/FakeApi.md#fakeHealthGet) | **GET** /fake/health | Health check endpoint
*FakeApi* | [**fakeHttpSignatureTest**](docs/FakeApi.md#fakeHttpSignatureTest) | **GET** /fake/http-signature-test | test http signature authentication
*FakeApi* | [**fakeOuterBooleanSerialize**](docs/FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean |
*FakeApi* | [**fakeOuterCompositeSerialize**](docs/FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite |
*FakeApi* | [**fakeOuterNumberSerialize**](docs/FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number |
*FakeApi* | [**fakeOuterStringSerialize**](docs/FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string |
*FakeApi* | [**fakePropertyEnumIntegerSerialize**](docs/FakeApi.md#fakePropertyEnumIntegerSerialize) | **POST** /fake/property/enum-int |
*FakeApi* | [**testBodyWithBinary**](docs/FakeApi.md#testBodyWithBinary) | **PUT** /fake/body-with-binary |
*FakeApi* | [**testBodyWithFileSchema**](docs/FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema |
*FakeApi* | [**testBodyWithQueryParams**](docs/FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params |
*FakeApi* | [**testClientModel**](docs/FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
*FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
*FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
*FakeApi* | [**testEnumParameters**](docs/FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
*FakeApi* | [**testGroupParameters**](docs/FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional)
*FakeApi* | [**testInlineAdditionalProperties**](docs/FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
@@ -147,52 +151,50 @@ Class | Method | HTTP request | Description
## Documentation for Models
- [AdditionalPropertiesAnyType](docs/AdditionalPropertiesAnyType.md)
- [AdditionalPropertiesArray](docs/AdditionalPropertiesArray.md)
- [AdditionalPropertiesBoolean](docs/AdditionalPropertiesBoolean.md)
- [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md)
- [AdditionalPropertiesInteger](docs/AdditionalPropertiesInteger.md)
- [AdditionalPropertiesNumber](docs/AdditionalPropertiesNumber.md)
- [AdditionalPropertiesObject](docs/AdditionalPropertiesObject.md)
- [AdditionalPropertiesString](docs/AdditionalPropertiesString.md)
- [Animal](docs/Animal.md)
- [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
- [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
- [ArrayTest](docs/ArrayTest.md)
- [BigCat](docs/BigCat.md)
- [BigCatAllOf](docs/BigCatAllOf.md)
- [Capitalization](docs/Capitalization.md)
- [Cat](docs/Cat.md)
- [CatAllOf](docs/CatAllOf.md)
- [Category](docs/Category.md)
- [ClassModel](docs/ClassModel.md)
- [Client](docs/Client.md)
- [DeprecatedObject](docs/DeprecatedObject.md)
- [Dog](docs/Dog.md)
- [DogAllOf](docs/DogAllOf.md)
- [EnumArrays](docs/EnumArrays.md)
- [EnumClass](docs/EnumClass.md)
- [EnumTest](docs/EnumTest.md)
- [FileSchemaTestClass](docs/FileSchemaTestClass.md)
- [Foo](docs/Foo.md)
- [FormatTest](docs/FormatTest.md)
- [HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
- [HealthCheckResult](docs/HealthCheckResult.md)
- [InlineResponseDefault](docs/InlineResponseDefault.md)
- [MapTest](docs/MapTest.md)
- [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md)
- [Model200Response](docs/Model200Response.md)
- [ModelApiResponse](docs/ModelApiResponse.md)
- [ModelReturn](docs/ModelReturn.md)
- [Name](docs/Name.md)
- [NullableClass](docs/NullableClass.md)
- [NumberOnly](docs/NumberOnly.md)
- [ObjectWithDeprecatedFields](docs/ObjectWithDeprecatedFields.md)
- [Order](docs/Order.md)
- [OuterComposite](docs/OuterComposite.md)
- [OuterEnum](docs/OuterEnum.md)
- [OuterEnumDefaultValue](docs/OuterEnumDefaultValue.md)
- [OuterEnumInteger](docs/OuterEnumInteger.md)
- [OuterEnumIntegerDefaultValue](docs/OuterEnumIntegerDefaultValue.md)
- [OuterObjectWithEnumProperty](docs/OuterObjectWithEnumProperty.md)
- [Pet](docs/Pet.md)
- [ReadOnlyFirst](docs/ReadOnlyFirst.md)
- [SpecialModelName](docs/SpecialModelName.md)
- [Tag](docs/Tag.md)
- [TypeHolderDefault](docs/TypeHolderDefault.md)
- [TypeHolderExample](docs/TypeHolderExample.md)
- [User](docs/User.md)
- [XmlItem](docs/XmlItem.md)
## Documentation for Authorization
@@ -212,9 +214,19 @@ Authentication schemes defined for the API:
- **API key parameter name**: api_key_query
- **Location**: URL query string
### bearer_test
- **Type**: HTTP basic authentication
### http_basic_test
- **Type**: HTTP basic authentication
### http_signature_test
- **Type**: HTTP basic authentication
### petstore_auth

File diff suppressed because it is too large Load Diff

View File

@@ -7,17 +7,8 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**mapString** | **Map<String, String>** | | [optional]
**mapNumber** | **Map<String, BigDecimal>** | | [optional]
**mapInteger** | **Map<String, Integer>** | | [optional]
**mapBoolean** | **Map<String, Boolean>** | | [optional]
**mapArrayInteger** | **Map<String, List<Integer>>** | | [optional]
**mapArrayAnytype** | **Map<String, List<Object>>** | | [optional]
**mapMapString** | **Map<String, Map<String, String>>** | | [optional]
**mapMapAnytype** | **Map<String, Map<String, Object>>** | | [optional]
**anytype1** | **Object** | | [optional]
**anytype2** | **Object** | | [optional]
**anytype3** | **Object** | | [optional]
**mapProperty** | **Map<String, String>** | | [optional]
**mapOfMapProperty** | **Map<String, Map<String, String>>** | | [optional]

View File

@@ -10,7 +10,7 @@ Method | HTTP request | Description
## call123testSpecialTags
> Client call123testSpecialTags(body)
> Client call123testSpecialTags(client)
To test special tags
@@ -32,9 +32,9 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient);
Client body = new Client(); // Client | client model
Client client = new Client(); // Client | client model
try {
Client result = apiInstance.call123testSpecialTags(body);
Client result = apiInstance.call123testSpecialTags(client);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags");
@@ -52,7 +52,7 @@ public class Example {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Client**](Client.md)| client model |
**client** | [**Client**](Client.md)| client model |
### Return type

View File

@@ -0,0 +1,69 @@
# DefaultApi
All URIs are relative to *http://petstore.swagger.io:80/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
[**fooGet**](DefaultApi.md#fooGet) | **GET** /foo |
## fooGet
> InlineResponseDefault fooGet()
### 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:80/v2");
DefaultApi apiInstance = new DefaultApi(defaultClient);
try {
InlineResponseDefault result = apiInstance.fooGet();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#fooGet");
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
[**InlineResponseDefault**](InlineResponseDefault.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **0** | response | - |

View File

@@ -0,0 +1,13 @@
# DeprecatedObject
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **String** | | [optional]

View File

@@ -12,6 +12,9 @@ Name | Type | Description | Notes
**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional]
**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional]
**outerEnum** | **OuterEnum** | | [optional]
**outerEnumInteger** | **OuterEnumInteger** | | [optional]
**outerEnumDefaultValue** | **OuterEnumDefaultValue** | | [optional]
**outerEnumIntegerDefaultValue** | **OuterEnumIntegerDefaultValue** | | [optional]

View File

@@ -4,15 +4,18 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
[**createXmlItem**](FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem
[**fakeHealthGet**](FakeApi.md#fakeHealthGet) | **GET** /fake/health | Health check endpoint
[**fakeHttpSignatureTest**](FakeApi.md#fakeHttpSignatureTest) | **GET** /fake/http-signature-test | test http signature authentication
[**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean |
[**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite |
[**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number |
[**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string |
[**fakePropertyEnumIntegerSerialize**](FakeApi.md#fakePropertyEnumIntegerSerialize) | **POST** /fake/property/enum-int |
[**testBodyWithBinary**](FakeApi.md#testBodyWithBinary) | **PUT** /fake/body-with-binary |
[**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema |
[**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params |
[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
[**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional)
[**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
@@ -21,13 +24,11 @@ Method | HTTP request | Description
## createXmlItem
## fakeHealthGet
> createXmlItem(xmlItem)
> HealthCheckResult fakeHealthGet()
creates an XmlItem
this route creates an XmlItem
Health check endpoint
### Example
@@ -45,11 +46,75 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
FakeApi apiInstance = new FakeApi(defaultClient);
XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body
try {
apiInstance.createXmlItem(xmlItem);
HealthCheckResult result = apiInstance.fakeHealthGet();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#createXmlItem");
System.err.println("Exception when calling FakeApi#fakeHealthGet");
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
[**HealthCheckResult**](HealthCheckResult.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | The instance started successfully | - |
## fakeHttpSignatureTest
> fakeHttpSignatureTest(pet, query1, header1)
test http signature authentication
### 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.FakeApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
FakeApi apiInstance = new FakeApi(defaultClient);
Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store
String query1 = "query1_example"; // String | query parameter
String header1 = "header1_example"; // String | header parameter
try {
apiInstance.fakeHttpSignatureTest(pet, query1, header1);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#fakeHttpSignatureTest");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
@@ -64,7 +129,9 @@ public class Example {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body |
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
**query1** | **String**| query parameter | [optional]
**header1** | **String**| header parameter | [optional]
### Return type
@@ -72,18 +139,18 @@ null (empty response body)
### Authorization
No authorization required
[http_signature_test](../README.md#http_signature_test)
### HTTP request headers
- **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16
- **Content-Type**: application/json, application/xml
- **Accept**: Not defined
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | successful operation | - |
| **200** | The instance started successfully | - |
## fakeOuterBooleanSerialize
@@ -142,7 +209,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: */*
@@ -154,7 +221,7 @@ No authorization required
## fakeOuterCompositeSerialize
> OuterComposite fakeOuterCompositeSerialize(body)
> OuterComposite fakeOuterCompositeSerialize(outerComposite)
@@ -176,9 +243,9 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
FakeApi apiInstance = new FakeApi(defaultClient);
OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body
OuterComposite outerComposite = new OuterComposite(); // OuterComposite | Input composite as post body
try {
OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body);
OuterComposite result = apiInstance.fakeOuterCompositeSerialize(outerComposite);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize");
@@ -196,7 +263,7 @@ public class Example {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
**outerComposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
### Return type
@@ -208,7 +275,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: */*
@@ -274,7 +341,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: */*
@@ -340,7 +407,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: */*
@@ -350,13 +417,13 @@ No authorization required
| **200** | Output string | - |
## testBodyWithFileSchema
## fakePropertyEnumIntegerSerialize
> testBodyWithFileSchema(body)
> OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty)
For this test, the body for this request much reference a schema named `File`.
Test serialization of enum (int) properties with examples
### Example
@@ -374,9 +441,140 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
FakeApi apiInstance = new FakeApi(defaultClient);
FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass |
OuterObjectWithEnumProperty outerObjectWithEnumProperty = new OuterObjectWithEnumProperty(); // OuterObjectWithEnumProperty | Input enum (int) as post body
try {
apiInstance.testBodyWithFileSchema(body);
OuterObjectWithEnumProperty result = apiInstance.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#fakePropertyEnumIntegerSerialize");
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
------------- | ------------- | ------------- | -------------
**outerObjectWithEnumProperty** | [**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md)| Input enum (int) as post body |
### Return type
[**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: */*
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Output enum (int) | - |
## testBodyWithBinary
> testBodyWithBinary(body)
For this test, the body has to be a binary file.
### 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:80/v2");
FakeApi apiInstance = new FakeApi(defaultClient);
File body = new File("/path/to/file"); // File | image to upload
try {
apiInstance.testBodyWithBinary(body);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#testBodyWithBinary");
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
------------- | ------------- | ------------- | -------------
**body** | **File**| image to upload |
### Return type
null (empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: image/png
- **Accept**: Not defined
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Success | - |
## testBodyWithFileSchema
> testBodyWithFileSchema(fileSchemaTestClass)
For this test, the body for this request must reference a schema named `File`.
### 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:80/v2");
FakeApi apiInstance = new FakeApi(defaultClient);
FileSchemaTestClass fileSchemaTestClass = new FileSchemaTestClass(); // FileSchemaTestClass |
try {
apiInstance.testBodyWithFileSchema(fileSchemaTestClass);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#testBodyWithFileSchema");
System.err.println("Status code: " + e.getCode());
@@ -393,7 +591,7 @@ public class Example {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| |
**fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| |
### Return type
@@ -417,7 +615,7 @@ No authorization required
## testBodyWithQueryParams
> testBodyWithQueryParams(query, body)
> testBodyWithQueryParams(query, user)
@@ -438,9 +636,9 @@ public class Example {
FakeApi apiInstance = new FakeApi(defaultClient);
String query = "query_example"; // String |
User body = new User(); // User |
User user = new User(); // User |
try {
apiInstance.testBodyWithQueryParams(query, body);
apiInstance.testBodyWithQueryParams(query, user);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#testBodyWithQueryParams");
System.err.println("Status code: " + e.getCode());
@@ -458,7 +656,7 @@ public class Example {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**query** | **String**| |
**body** | [**User**](User.md)| |
**user** | [**User**](User.md)| |
### Return type
@@ -482,7 +680,7 @@ No authorization required
## testClientModel
> Client testClientModel(body)
> Client testClientModel(client)
To test \"client\" model
@@ -504,9 +702,9 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
FakeApi apiInstance = new FakeApi(defaultClient);
Client body = new Client(); // Client | client model
Client client = new Client(); // Client | client model
try {
Client result = apiInstance.testClientModel(body);
Client result = apiInstance.testClientModel(client);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#testClientModel");
@@ -524,7 +722,7 @@ public class Example {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Client**](Client.md)| client model |
**client** | [**Client**](Client.md)| client model |
### Return type
@@ -550,9 +748,9 @@ No authorization required
> testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback)
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
### Example
@@ -739,6 +937,7 @@ Fake endpoint to test group parameters (optional)
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.FakeApi;
@@ -746,6 +945,10 @@ public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
// Configure HTTP bearer authorization: bearer_test
HttpBearerAuth bearer_test = (HttpBearerAuth) defaultClient.getAuthentication("bearer_test");
bearer_test.setBearerToken("BEARER TOKEN");
FakeApi apiInstance = new FakeApi(defaultClient);
Integer requiredStringGroup = 56; // Integer | Required String in group parameters
@@ -785,7 +988,7 @@ null (empty response body)
### Authorization
No authorization required
[bearer_test](../README.md#bearer_test)
### HTTP request headers
@@ -801,7 +1004,7 @@ No authorization required
## testInlineAdditionalProperties
> testInlineAdditionalProperties(param)
> testInlineAdditionalProperties(requestBody)
test inline additionalProperties
@@ -821,9 +1024,9 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
FakeApi apiInstance = new FakeApi(defaultClient);
Map<String, String> param = new HashMap(); // Map<String, String> | request body
Map<String, String> requestBody = new HashMap(); // Map<String, String> | request body
try {
apiInstance.testInlineAdditionalProperties(param);
apiInstance.testInlineAdditionalProperties(requestBody);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties");
System.err.println("Status code: " + e.getCode());
@@ -840,7 +1043,7 @@ public class Example {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**param** | [**Map&lt;String, String&gt;**](String.md)| request body |
**requestBody** | [**Map&lt;String, String&gt;**](String.md)| request body |
### Return type

View File

@@ -10,7 +10,7 @@ Method | HTTP request | Description
## testClassname
> Client testClassname(body)
> Client testClassname(client)
To test class name in snake case
@@ -39,9 +39,9 @@ public class Example {
//api_key_query.setApiKeyPrefix("Token");
FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(defaultClient);
Client body = new Client(); // Client | client model
Client client = new Client(); // Client | client model
try {
Client result = apiInstance.testClassname(body);
Client result = apiInstance.testClassname(client);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FakeClassnameTags123Api#testClassname");
@@ -59,7 +59,7 @@ public class Example {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Client**](Client.md)| client model |
**client** | [**Client**](Client.md)| client model |
### Return type

View File

@@ -0,0 +1,13 @@
# Foo
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**bar** | **String** | | [optional]

View File

@@ -13,6 +13,7 @@ Name | Type | Description | Notes
**number** | **BigDecimal** | |
**_float** | **Float** | | [optional]
**_double** | **Double** | | [optional]
**decimal** | **BigDecimal** | | [optional]
**string** | **String** | | [optional]
**_byte** | **byte[]** | |
**binary** | **File** | | [optional]
@@ -20,7 +21,8 @@ Name | Type | Description | Notes
**dateTime** | **OffsetDateTime** | | [optional]
**uuid** | **UUID** | | [optional]
**password** | **String** | |
**bigDecimal** | **BigDecimal** | | [optional]
**patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional]
**patternWithDigitsAndDelimiter** | **String** | A string starting with &#39;image_&#39; (case insensitive) and one to three digits following i.e. Image_01. | [optional]

View File

@@ -0,0 +1,14 @@
# HealthCheckResult
Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**nullableMessage** | **String** | | [optional]

View File

@@ -0,0 +1,13 @@
# InlineResponseDefault
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**string** | [**Foo**](Foo.md) | | [optional]

View File

@@ -0,0 +1,24 @@
# NullableClass
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**integerProp** | **Integer** | | [optional]
**numberProp** | **BigDecimal** | | [optional]
**booleanProp** | **Boolean** | | [optional]
**stringProp** | **String** | | [optional]
**dateProp** | **LocalDate** | | [optional]
**datetimeProp** | **OffsetDateTime** | | [optional]
**arrayNullableProp** | **List&lt;Object&gt;** | | [optional]
**arrayAndItemsNullableProp** | **List&lt;Object&gt;** | | [optional]
**arrayItemsNullable** | **List&lt;Object&gt;** | | [optional]
**objectNullableProp** | **Map&lt;String, Object&gt;** | | [optional]
**objectAndItemsNullableProp** | **Map&lt;String, Object&gt;** | | [optional]
**objectItemsNullable** | **Map&lt;String, Object&gt;** | | [optional]

View File

@@ -0,0 +1,16 @@
# ObjectWithDeprecatedFields
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**uuid** | **String** | | [optional]
**id** | **BigDecimal** | | [optional]
**deprecatedRef** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional]
**bars** | **List&lt;String&gt;** | | [optional]

View File

@@ -0,0 +1,15 @@
# OuterEnumDefaultValue
## Enum
* `PLACED` (value: `"placed"`)
* `APPROVED` (value: `"approved"`)
* `DELIVERED` (value: `"delivered"`)

View File

@@ -0,0 +1,15 @@
# OuterEnumInteger
## Enum
* `NUMBER_0` (value: `0`)
* `NUMBER_1` (value: `1`)
* `NUMBER_2` (value: `2`)

View File

@@ -0,0 +1,15 @@
# OuterEnumIntegerDefaultValue
## Enum
* `NUMBER_0` (value: `0`)
* `NUMBER_1` (value: `1`)
* `NUMBER_2` (value: `2`)

View File

@@ -0,0 +1,13 @@
# OuterObjectWithEnumProperty
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**value** | **OuterEnumInteger** | |

View File

@@ -18,7 +18,7 @@ Method | HTTP request | Description
## addPet
> addPet(body)
> addPet(pet)
Add a new pet to the store
@@ -43,9 +43,9 @@ public class Example {
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
PetApi apiInstance = new PetApi(defaultClient);
Pet body = new Pet(); // Pet | Pet object that needs to be added to the store
Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store
try {
apiInstance.addPet(body);
apiInstance.addPet(pet);
} catch (ApiException e) {
System.err.println("Exception when calling PetApi#addPet");
System.err.println("Status code: " + e.getCode());
@@ -62,7 +62,7 @@ public class Example {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
### Return type
@@ -81,7 +81,7 @@ null (empty response body)
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | successful operation | - |
| **200** | Successful operation | - |
| **405** | Invalid input | - |
@@ -152,7 +152,7 @@ null (empty response body)
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | successful operation | - |
| **200** | Successful operation | - |
| **400** | Invalid pet value | - |
@@ -377,7 +377,7 @@ Name | Type | Description | Notes
## updatePet
> updatePet(body)
> updatePet(pet)
Update an existing pet
@@ -402,9 +402,9 @@ public class Example {
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
PetApi apiInstance = new PetApi(defaultClient);
Pet body = new Pet(); // Pet | Pet object that needs to be added to the store
Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store
try {
apiInstance.updatePet(body);
apiInstance.updatePet(pet);
} catch (ApiException e) {
System.err.println("Exception when calling PetApi#updatePet");
System.err.println("Status code: " + e.getCode());
@@ -421,7 +421,7 @@ public class Example {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
### Return type
@@ -440,7 +440,7 @@ null (empty response body)
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | successful operation | - |
| **200** | Successful operation | - |
| **400** | Invalid ID supplied | - |
| **404** | Pet not found | - |
| **405** | Validation exception | - |
@@ -515,6 +515,7 @@ null (empty response body)
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Successful operation | - |
| **405** | Invalid input | - |

View File

@@ -216,7 +216,7 @@ No authorization required
## placeOrder
> Order placeOrder(body)
> Order placeOrder(order)
Place an order for a pet
@@ -236,9 +236,9 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
StoreApi apiInstance = new StoreApi(defaultClient);
Order body = new Order(); // Order | order placed for purchasing the pet
Order order = new Order(); // Order | order placed for purchasing the pet
try {
Order result = apiInstance.placeOrder(body);
Order result = apiInstance.placeOrder(order);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling StoreApi#placeOrder");
@@ -256,7 +256,7 @@ public class Example {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Order**](Order.md)| order placed for purchasing the pet |
**order** | [**Order**](Order.md)| order placed for purchasing the pet |
### Return type
@@ -268,7 +268,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: application/xml, application/json

View File

@@ -17,7 +17,7 @@ Method | HTTP request | Description
## createUser
> createUser(body)
> createUser(user)
Create user
@@ -39,9 +39,9 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
UserApi apiInstance = new UserApi(defaultClient);
User body = new User(); // User | Created user object
User user = new User(); // User | Created user object
try {
apiInstance.createUser(body);
apiInstance.createUser(user);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#createUser");
System.err.println("Status code: " + e.getCode());
@@ -58,7 +58,7 @@ public class Example {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**User**](User.md)| Created user object |
**user** | [**User**](User.md)| Created user object |
### Return type
@@ -70,7 +70,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: Not defined
@@ -82,7 +82,7 @@ No authorization required
## createUsersWithArrayInput
> createUsersWithArrayInput(body)
> createUsersWithArrayInput(user)
Creates list of users with given input array
@@ -102,9 +102,9 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
UserApi apiInstance = new UserApi(defaultClient);
List<User> body = Arrays.asList(); // List<User> | List of user object
List<User> user = Arrays.asList(); // List<User> | List of user object
try {
apiInstance.createUsersWithArrayInput(body);
apiInstance.createUsersWithArrayInput(user);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#createUsersWithArrayInput");
System.err.println("Status code: " + e.getCode());
@@ -121,7 +121,7 @@ public class Example {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**List&lt;User&gt;**](User.md)| List of user object |
**user** | [**List&lt;User&gt;**](User.md)| List of user object |
### Return type
@@ -133,7 +133,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: Not defined
@@ -145,7 +145,7 @@ No authorization required
## createUsersWithListInput
> createUsersWithListInput(body)
> createUsersWithListInput(user)
Creates list of users with given input array
@@ -165,9 +165,9 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
UserApi apiInstance = new UserApi(defaultClient);
List<User> body = Arrays.asList(); // List<User> | List of user object
List<User> user = Arrays.asList(); // List<User> | List of user object
try {
apiInstance.createUsersWithListInput(body);
apiInstance.createUsersWithListInput(user);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#createUsersWithListInput");
System.err.println("Status code: " + e.getCode());
@@ -184,7 +184,7 @@ public class Example {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**List&lt;User&gt;**](User.md)| List of user object |
**user** | [**List&lt;User&gt;**](User.md)| List of user object |
### Return type
@@ -196,7 +196,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: Not defined
@@ -466,7 +466,7 @@ No authorization required
## updateUser
> updateUser(username, body)
> updateUser(username, user)
Updated user
@@ -489,9 +489,9 @@ public class Example {
UserApi apiInstance = new UserApi(defaultClient);
String username = "username_example"; // String | name that need to be deleted
User body = new User(); // User | Updated user object
User user = new User(); // User | Updated user object
try {
apiInstance.updateUser(username, body);
apiInstance.updateUser(username, user);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#updateUser");
System.err.println("Status code: " + e.getCode());
@@ -509,7 +509,7 @@ public class Example {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **String**| name that need to be deleted |
**body** | [**User**](User.md)| Updated user object |
**user** | [**User**](User.md)| Updated user object |
### Return type
@@ -521,7 +521,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: Not defined

View File

@@ -22,6 +22,7 @@ import org.springframework.http.client.ClientHttpRequestInterceptor;
import org.springframework.http.client.ClientHttpResponse;
import org.springframework.http.codec.json.Jackson2JsonDecoder;
import org.springframework.http.codec.json.Jackson2JsonEncoder;
import org.springframework.util.CollectionUtils;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.util.StringUtils;
@@ -146,7 +147,9 @@ public class ApiClient extends JavaTimeFormatter {
authentications = new HashMap<String, Authentication>();
authentications.put("api_key", new ApiKeyAuth("header", "api_key"));
authentications.put("api_key_query", new ApiKeyAuth("query", "api_key_query"));
authentications.put("bearer_test", new HttpBearerAuth("bearer"));
authentications.put("http_basic_test", new HttpBasicAuth());
authentications.put("http_signature_test", new HttpBearerAuth("signature"));
authentications.put("petstore_auth", new OAuth());
// Prevent the authentications from being modified.
authentications = Collections.unmodifiableMap(authentications);
@@ -595,16 +598,60 @@ public class ApiClient extends JavaTimeFormatter {
return requestBuilder.retrieve();
}
private WebClient.RequestBodySpec prepareRequest(String path, HttpMethod method, Map<String, Object> pathParams, MultiValueMap<String, String> queryParams, Object body, HttpHeaders headerParams, MultiValueMap<String, String> cookieParams, MultiValueMap<String, Object> formParams, List<MediaType> accept, MediaType contentType, String[] authNames) {
/**
* Include queryParams in uriParams taking into account the paramName
* @param queryParam The query parameters
* @param uriParams The path parameters
* return templatized query string
*/
private String generateQueryUri(MultiValueMap<String, String> queryParams, Map<String, Object> uriParams) {
StringBuilder queryBuilder = new StringBuilder();
queryParams.forEach((name, values) -> {
if (CollectionUtils.isEmpty(values)) {
if (queryBuilder.length() != 0) {
queryBuilder.append('&');
}
queryBuilder.append(name);
} else {
int valueItemCounter = 0;
for (Object value : values) {
if (queryBuilder.length() != 0) {
queryBuilder.append('&');
}
queryBuilder.append(name);
if (value != null) {
String templatizedKey = name + valueItemCounter++;
uriParams.put(templatizedKey, value.toString());
queryBuilder.append('=').append("{").append(templatizedKey).append("}");
}
}
}
});
return queryBuilder.toString();
}
private WebClient.RequestBodySpec prepareRequest(String path, HttpMethod method, Map<String, Object> pathParams,
MultiValueMap<String, String> queryParams, Object body, HttpHeaders headerParams,
MultiValueMap<String, String> cookieParams, MultiValueMap<String, Object> formParams, List<MediaType> accept,
MediaType contentType, String[] authNames) {
updateParamsForAuth(authNames, queryParams, headerParams, cookieParams);
final UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(basePath).path(path);
if (queryParams != null) {
builder.queryParams(queryParams);
String finalUri = builder.build(false).toUriString();
Map<String, Object> uriParams = new HashMap();
uriParams.putAll(pathParams);
if (queryParams != null && !queryParams.isEmpty()) {
//Include queryParams in uriParams taking into account the paramName
String queryUri = generateQueryUri(queryParams, uriParams);
//Append to finalUri the templatized query string like "?param1={param1Value}&.......
finalUri += "?" + queryUri;
}
final WebClient.RequestBodySpec requestBuilder = webClient.method(method).uri(builder.build(false).toUriString(), pathParams);
if(accept != null) {
final WebClient.RequestBodySpec requestBuilder = webClient.method(method).uri(finalUri, uriParams);
if (accept != null) {
requestBuilder.accept(accept.toArray(new MediaType[accept.size()]));
}
if(contentType != null) {

View File

@@ -51,15 +51,15 @@ public class AnotherFakeApi {
* To test special tags
* To test special tags and operation ID starting with number
* <p><b>200</b> - successful operation
* @param body client model
* @param client client model
* @return Client
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec call123testSpecialTagsRequestCreation(Client body) throws WebClientResponseException {
Object postBody = body;
// verify the required parameter 'body' is set
if (body == null) {
throw new WebClientResponseException("Missing the required parameter 'body' when calling call123testSpecialTags", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
private ResponseSpec call123testSpecialTagsRequestCreation(Client client) throws WebClientResponseException {
Object postBody = client;
// verify the required parameter 'client' is set
if (client == null) {
throw new WebClientResponseException("Missing the required parameter 'client' when calling call123testSpecialTags", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map<String, Object> pathParams = new HashMap<String, Object>();
@@ -88,17 +88,17 @@ public class AnotherFakeApi {
* To test special tags
* To test special tags and operation ID starting with number
* <p><b>200</b> - successful operation
* @param body client model
* @param client client model
* @return Client
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono<Client> call123testSpecialTags(Client body) throws WebClientResponseException {
public Mono<Client> call123testSpecialTags(Client client) throws WebClientResponseException {
ParameterizedTypeReference<Client> localVarReturnType = new ParameterizedTypeReference<Client>() {};
return call123testSpecialTagsRequestCreation(body).bodyToMono(localVarReturnType);
return call123testSpecialTagsRequestCreation(client).bodyToMono(localVarReturnType);
}
public Mono<ResponseEntity<Client>> call123testSpecialTagsWithHttpInfo(Client body) throws WebClientResponseException {
public Mono<ResponseEntity<Client>> call123testSpecialTagsWithHttpInfo(Client client) throws WebClientResponseException {
ParameterizedTypeReference<Client> localVarReturnType = new ParameterizedTypeReference<Client>() {};
return call123testSpecialTagsRequestCreation(body).toEntity(localVarReturnType);
return call123testSpecialTagsRequestCreation(client).toEntity(localVarReturnType);
}
}

View File

@@ -0,0 +1,96 @@
package org.openapitools.client.api;
import org.openapitools.client.ApiClient;
import org.openapitools.client.model.InlineResponseDefault;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.stream.Collectors;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.web.util.UriComponentsBuilder;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.web.reactive.function.client.WebClient.ResponseSpec;
import org.springframework.web.reactive.function.client.WebClientResponseException;
import org.springframework.core.io.FileSystemResource;
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 reactor.core.publisher.Mono;
import reactor.core.publisher.Flux;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class DefaultApi {
private ApiClient apiClient;
public DefaultApi() {
this(new ApiClient());
}
@Autowired
public DefaultApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
*
*
* <p><b>0</b> - response
* @return InlineResponseDefault
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec fooGetRequestCreation() throws WebClientResponseException {
Object postBody = null;
// create path and map variables
final Map<String, Object> pathParams = new HashMap<String, Object>();
final MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<String, String>();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap<String, String> cookieParams = new LinkedMultiValueMap<String, String>();
final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<String, Object>();
final String[] localVarAccepts = {
"application/json"
};
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
ParameterizedTypeReference<InlineResponseDefault> localVarReturnType = new ParameterizedTypeReference<InlineResponseDefault>() {};
return apiClient.invokeAPI("/foo", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
*
*
* <p><b>0</b> - response
* @return InlineResponseDefault
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono<InlineResponseDefault> fooGet() throws WebClientResponseException {
ParameterizedTypeReference<InlineResponseDefault> localVarReturnType = new ParameterizedTypeReference<InlineResponseDefault>() {};
return fooGetRequestCreation().bodyToMono(localVarReturnType);
}
public Mono<ResponseEntity<InlineResponseDefault>> fooGetWithHttpInfo() throws WebClientResponseException {
ParameterizedTypeReference<InlineResponseDefault> localVarReturnType = new ParameterizedTypeReference<InlineResponseDefault>() {};
return fooGetRequestCreation().toEntity(localVarReturnType);
}
}

View File

@@ -6,11 +6,13 @@ import java.math.BigDecimal;
import org.openapitools.client.model.Client;
import java.io.File;
import org.openapitools.client.model.FileSchemaTestClass;
import org.openapitools.client.model.HealthCheckResult;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import org.openapitools.client.model.OuterComposite;
import org.openapitools.client.model.OuterObjectWithEnumProperty;
import org.openapitools.client.model.Pet;
import org.openapitools.client.model.User;
import org.openapitools.client.model.XmlItem;
import java.util.HashMap;
import java.util.List;
@@ -56,17 +58,65 @@ public class FakeApi {
}
/**
* creates an XmlItem
* this route creates an XmlItem
* <p><b>200</b> - successful operation
* @param xmlItem XmlItem Body
* Health check endpoint
*
* <p><b>200</b> - The instance started successfully
* @return HealthCheckResult
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec createXmlItemRequestCreation(XmlItem xmlItem) throws WebClientResponseException {
Object postBody = xmlItem;
// verify the required parameter 'xmlItem' is set
if (xmlItem == null) {
throw new WebClientResponseException("Missing the required parameter 'xmlItem' when calling createXmlItem", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
private ResponseSpec fakeHealthGetRequestCreation() throws WebClientResponseException {
Object postBody = null;
// create path and map variables
final Map<String, Object> pathParams = new HashMap<String, Object>();
final MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<String, String>();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap<String, String> cookieParams = new LinkedMultiValueMap<String, String>();
final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<String, Object>();
final String[] localVarAccepts = {
"application/json"
};
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
ParameterizedTypeReference<HealthCheckResult> localVarReturnType = new ParameterizedTypeReference<HealthCheckResult>() {};
return apiClient.invokeAPI("/fake/health", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Health check endpoint
*
* <p><b>200</b> - The instance started successfully
* @return HealthCheckResult
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono<HealthCheckResult> fakeHealthGet() throws WebClientResponseException {
ParameterizedTypeReference<HealthCheckResult> localVarReturnType = new ParameterizedTypeReference<HealthCheckResult>() {};
return fakeHealthGetRequestCreation().bodyToMono(localVarReturnType);
}
public Mono<ResponseEntity<HealthCheckResult>> fakeHealthGetWithHttpInfo() throws WebClientResponseException {
ParameterizedTypeReference<HealthCheckResult> localVarReturnType = new ParameterizedTypeReference<HealthCheckResult>() {};
return fakeHealthGetRequestCreation().toEntity(localVarReturnType);
}
/**
* test http signature authentication
*
* <p><b>200</b> - The instance started successfully
* @param pet Pet object that needs to be added to the store
* @param query1 query parameter
* @param header1 header parameter
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec fakeHttpSignatureTestRequestCreation(Pet pet, String query1, String header1) throws WebClientResponseException {
Object postBody = pet;
// verify the required parameter 'pet' is set
if (pet == null) {
throw new WebClientResponseException("Missing the required parameter 'pet' when calling fakeHttpSignatureTest", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map<String, Object> pathParams = new HashMap<String, Object>();
@@ -76,34 +126,40 @@ public class FakeApi {
final MultiValueMap<String, String> cookieParams = new LinkedMultiValueMap<String, String>();
final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<String, Object>();
queryParams.putAll(apiClient.parameterToMultiValueMap(null, "query_1", query1));
if (header1 != null)
headerParams.add("header_1", apiClient.parameterToString(header1));
final String[] localVarAccepts = { };
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16"
"application/json", "application/xml"
};
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
String[] localVarAuthNames = new String[] { "http_signature_test" };
ParameterizedTypeReference<Void> localVarReturnType = new ParameterizedTypeReference<Void>() {};
return apiClient.invokeAPI("/fake/create_xml_item", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
return apiClient.invokeAPI("/fake/http-signature-test", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* creates an XmlItem
* this route creates an XmlItem
* <p><b>200</b> - successful operation
* @param xmlItem XmlItem Body
* test http signature authentication
*
* <p><b>200</b> - The instance started successfully
* @param pet Pet object that needs to be added to the store
* @param query1 query parameter
* @param header1 header parameter
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono<Void> createXmlItem(XmlItem xmlItem) throws WebClientResponseException {
public Mono<Void> fakeHttpSignatureTest(Pet pet, String query1, String header1) throws WebClientResponseException {
ParameterizedTypeReference<Void> localVarReturnType = new ParameterizedTypeReference<Void>() {};
return createXmlItemRequestCreation(xmlItem).bodyToMono(localVarReturnType);
return fakeHttpSignatureTestRequestCreation(pet, query1, header1).bodyToMono(localVarReturnType);
}
public Mono<ResponseEntity<Void>> createXmlItemWithHttpInfo(XmlItem xmlItem) throws WebClientResponseException {
public Mono<ResponseEntity<Void>> fakeHttpSignatureTestWithHttpInfo(Pet pet, String query1, String header1) throws WebClientResponseException {
ParameterizedTypeReference<Void> localVarReturnType = new ParameterizedTypeReference<Void>() {};
return createXmlItemRequestCreation(xmlItem).toEntity(localVarReturnType);
return fakeHttpSignatureTestRequestCreation(pet, query1, header1).toEntity(localVarReturnType);
}
/**
*
@@ -127,7 +183,9 @@ public class FakeApi {
"*/*"
};
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final String[] localVarContentTypes = {
"application/json"
};
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
@@ -157,12 +215,12 @@ public class FakeApi {
*
* Test serialization of object with outer number type
* <p><b>200</b> - Output composite
* @param body Input composite as post body
* @param outerComposite Input composite as post body
* @return OuterComposite
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec fakeOuterCompositeSerializeRequestCreation(OuterComposite body) throws WebClientResponseException {
Object postBody = body;
private ResponseSpec fakeOuterCompositeSerializeRequestCreation(OuterComposite outerComposite) throws WebClientResponseException {
Object postBody = outerComposite;
// create path and map variables
final Map<String, Object> pathParams = new HashMap<String, Object>();
@@ -175,7 +233,9 @@ public class FakeApi {
"*/*"
};
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final String[] localVarContentTypes = {
"application/json"
};
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
@@ -188,18 +248,18 @@ public class FakeApi {
*
* Test serialization of object with outer number type
* <p><b>200</b> - Output composite
* @param body Input composite as post body
* @param outerComposite Input composite as post body
* @return OuterComposite
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono<OuterComposite> fakeOuterCompositeSerialize(OuterComposite body) throws WebClientResponseException {
public Mono<OuterComposite> fakeOuterCompositeSerialize(OuterComposite outerComposite) throws WebClientResponseException {
ParameterizedTypeReference<OuterComposite> localVarReturnType = new ParameterizedTypeReference<OuterComposite>() {};
return fakeOuterCompositeSerializeRequestCreation(body).bodyToMono(localVarReturnType);
return fakeOuterCompositeSerializeRequestCreation(outerComposite).bodyToMono(localVarReturnType);
}
public Mono<ResponseEntity<OuterComposite>> fakeOuterCompositeSerializeWithHttpInfo(OuterComposite body) throws WebClientResponseException {
public Mono<ResponseEntity<OuterComposite>> fakeOuterCompositeSerializeWithHttpInfo(OuterComposite outerComposite) throws WebClientResponseException {
ParameterizedTypeReference<OuterComposite> localVarReturnType = new ParameterizedTypeReference<OuterComposite>() {};
return fakeOuterCompositeSerializeRequestCreation(body).toEntity(localVarReturnType);
return fakeOuterCompositeSerializeRequestCreation(outerComposite).toEntity(localVarReturnType);
}
/**
*
@@ -223,7 +283,9 @@ public class FakeApi {
"*/*"
};
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final String[] localVarContentTypes = {
"application/json"
};
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
@@ -271,7 +333,9 @@ public class FakeApi {
"*/*"
};
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final String[] localVarContentTypes = {
"application/json"
};
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
@@ -299,16 +363,120 @@ public class FakeApi {
}
/**
*
* For this test, the body for this request much reference a schema named &#x60;File&#x60;.
* <p><b>200</b> - Success
* @param body The body parameter
* Test serialization of enum (int) properties with examples
* <p><b>200</b> - Output enum (int)
* @param outerObjectWithEnumProperty Input enum (int) as post body
* @return OuterObjectWithEnumProperty
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec testBodyWithFileSchemaRequestCreation(FileSchemaTestClass body) throws WebClientResponseException {
private ResponseSpec fakePropertyEnumIntegerSerializeRequestCreation(OuterObjectWithEnumProperty outerObjectWithEnumProperty) throws WebClientResponseException {
Object postBody = outerObjectWithEnumProperty;
// verify the required parameter 'outerObjectWithEnumProperty' is set
if (outerObjectWithEnumProperty == null) {
throw new WebClientResponseException("Missing the required parameter 'outerObjectWithEnumProperty' when calling fakePropertyEnumIntegerSerialize", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map<String, Object> pathParams = new HashMap<String, Object>();
final MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<String, String>();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap<String, String> cookieParams = new LinkedMultiValueMap<String, String>();
final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<String, Object>();
final String[] localVarAccepts = {
"*/*"
};
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
ParameterizedTypeReference<OuterObjectWithEnumProperty> localVarReturnType = new ParameterizedTypeReference<OuterObjectWithEnumProperty>() {};
return apiClient.invokeAPI("/fake/property/enum-int", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
*
* Test serialization of enum (int) properties with examples
* <p><b>200</b> - Output enum (int)
* @param outerObjectWithEnumProperty Input enum (int) as post body
* @return OuterObjectWithEnumProperty
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono<OuterObjectWithEnumProperty> fakePropertyEnumIntegerSerialize(OuterObjectWithEnumProperty outerObjectWithEnumProperty) throws WebClientResponseException {
ParameterizedTypeReference<OuterObjectWithEnumProperty> localVarReturnType = new ParameterizedTypeReference<OuterObjectWithEnumProperty>() {};
return fakePropertyEnumIntegerSerializeRequestCreation(outerObjectWithEnumProperty).bodyToMono(localVarReturnType);
}
public Mono<ResponseEntity<OuterObjectWithEnumProperty>> fakePropertyEnumIntegerSerializeWithHttpInfo(OuterObjectWithEnumProperty outerObjectWithEnumProperty) throws WebClientResponseException {
ParameterizedTypeReference<OuterObjectWithEnumProperty> localVarReturnType = new ParameterizedTypeReference<OuterObjectWithEnumProperty>() {};
return fakePropertyEnumIntegerSerializeRequestCreation(outerObjectWithEnumProperty).toEntity(localVarReturnType);
}
/**
*
* For this test, the body has to be a binary file.
* <p><b>200</b> - Success
* @param body image to upload
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec testBodyWithBinaryRequestCreation(File body) throws WebClientResponseException {
Object postBody = body;
// verify the required parameter 'body' is set
if (body == null) {
throw new WebClientResponseException("Missing the required parameter 'body' when calling testBodyWithFileSchema", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
throw new WebClientResponseException("Missing the required parameter 'body' when calling testBodyWithBinary", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map<String, Object> pathParams = new HashMap<String, Object>();
final MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<String, String>();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap<String, String> cookieParams = new LinkedMultiValueMap<String, String>();
final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<String, Object>();
final String[] localVarAccepts = { };
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"image/png"
};
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
ParameterizedTypeReference<Void> localVarReturnType = new ParameterizedTypeReference<Void>() {};
return apiClient.invokeAPI("/fake/body-with-binary", HttpMethod.PUT, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
*
* For this test, the body has to be a binary file.
* <p><b>200</b> - Success
* @param body image to upload
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono<Void> testBodyWithBinary(File body) throws WebClientResponseException {
ParameterizedTypeReference<Void> localVarReturnType = new ParameterizedTypeReference<Void>() {};
return testBodyWithBinaryRequestCreation(body).bodyToMono(localVarReturnType);
}
public Mono<ResponseEntity<Void>> testBodyWithBinaryWithHttpInfo(File body) throws WebClientResponseException {
ParameterizedTypeReference<Void> localVarReturnType = new ParameterizedTypeReference<Void>() {};
return testBodyWithBinaryRequestCreation(body).toEntity(localVarReturnType);
}
/**
*
* For this test, the body for this request must reference a schema named &#x60;File&#x60;.
* <p><b>200</b> - Success
* @param fileSchemaTestClass The fileSchemaTestClass parameter
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec testBodyWithFileSchemaRequestCreation(FileSchemaTestClass fileSchemaTestClass) throws WebClientResponseException {
Object postBody = fileSchemaTestClass;
// verify the required parameter 'fileSchemaTestClass' is set
if (fileSchemaTestClass == null) {
throw new WebClientResponseException("Missing the required parameter 'fileSchemaTestClass' when calling testBodyWithFileSchema", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map<String, Object> pathParams = new HashMap<String, Object>();
@@ -333,37 +501,37 @@ public class FakeApi {
/**
*
* For this test, the body for this request much reference a schema named &#x60;File&#x60;.
* For this test, the body for this request must reference a schema named &#x60;File&#x60;.
* <p><b>200</b> - Success
* @param body The body parameter
* @param fileSchemaTestClass The fileSchemaTestClass parameter
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono<Void> testBodyWithFileSchema(FileSchemaTestClass body) throws WebClientResponseException {
public Mono<Void> testBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass) throws WebClientResponseException {
ParameterizedTypeReference<Void> localVarReturnType = new ParameterizedTypeReference<Void>() {};
return testBodyWithFileSchemaRequestCreation(body).bodyToMono(localVarReturnType);
return testBodyWithFileSchemaRequestCreation(fileSchemaTestClass).bodyToMono(localVarReturnType);
}
public Mono<ResponseEntity<Void>> testBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass body) throws WebClientResponseException {
public Mono<ResponseEntity<Void>> testBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass fileSchemaTestClass) throws WebClientResponseException {
ParameterizedTypeReference<Void> localVarReturnType = new ParameterizedTypeReference<Void>() {};
return testBodyWithFileSchemaRequestCreation(body).toEntity(localVarReturnType);
return testBodyWithFileSchemaRequestCreation(fileSchemaTestClass).toEntity(localVarReturnType);
}
/**
*
*
* <p><b>200</b> - Success
* @param query The query parameter
* @param body The body parameter
* @param user The user parameter
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec testBodyWithQueryParamsRequestCreation(String query, User body) throws WebClientResponseException {
Object postBody = body;
private ResponseSpec testBodyWithQueryParamsRequestCreation(String query, User user) throws WebClientResponseException {
Object postBody = user;
// verify the required parameter 'query' is set
if (query == null) {
throw new WebClientResponseException("Missing the required parameter 'query' when calling testBodyWithQueryParams", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'body' is set
if (body == null) {
throw new WebClientResponseException("Missing the required parameter 'body' when calling testBodyWithQueryParams", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
// verify the required parameter 'user' is set
if (user == null) {
throw new WebClientResponseException("Missing the required parameter 'user' when calling testBodyWithQueryParams", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map<String, Object> pathParams = new HashMap<String, Object>();
@@ -393,31 +561,31 @@ public class FakeApi {
*
* <p><b>200</b> - Success
* @param query The query parameter
* @param body The body parameter
* @param user The user parameter
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono<Void> testBodyWithQueryParams(String query, User body) throws WebClientResponseException {
public Mono<Void> testBodyWithQueryParams(String query, User user) throws WebClientResponseException {
ParameterizedTypeReference<Void> localVarReturnType = new ParameterizedTypeReference<Void>() {};
return testBodyWithQueryParamsRequestCreation(query, body).bodyToMono(localVarReturnType);
return testBodyWithQueryParamsRequestCreation(query, user).bodyToMono(localVarReturnType);
}
public Mono<ResponseEntity<Void>> testBodyWithQueryParamsWithHttpInfo(String query, User body) throws WebClientResponseException {
public Mono<ResponseEntity<Void>> testBodyWithQueryParamsWithHttpInfo(String query, User user) throws WebClientResponseException {
ParameterizedTypeReference<Void> localVarReturnType = new ParameterizedTypeReference<Void>() {};
return testBodyWithQueryParamsRequestCreation(query, body).toEntity(localVarReturnType);
return testBodyWithQueryParamsRequestCreation(query, user).toEntity(localVarReturnType);
}
/**
* To test \&quot;client\&quot; model
* To test \&quot;client\&quot; model
* <p><b>200</b> - successful operation
* @param body client model
* @param client client model
* @return Client
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec testClientModelRequestCreation(Client body) throws WebClientResponseException {
Object postBody = body;
// verify the required parameter 'body' is set
if (body == null) {
throw new WebClientResponseException("Missing the required parameter 'body' when calling testClientModel", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
private ResponseSpec testClientModelRequestCreation(Client client) throws WebClientResponseException {
Object postBody = client;
// verify the required parameter 'client' is set
if (client == null) {
throw new WebClientResponseException("Missing the required parameter 'client' when calling testClientModel", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map<String, Object> pathParams = new HashMap<String, Object>();
@@ -446,22 +614,22 @@ public class FakeApi {
* To test \&quot;client\&quot; model
* To test \&quot;client\&quot; model
* <p><b>200</b> - successful operation
* @param body client model
* @param client client model
* @return Client
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono<Client> testClientModel(Client body) throws WebClientResponseException {
public Mono<Client> testClientModel(Client client) throws WebClientResponseException {
ParameterizedTypeReference<Client> localVarReturnType = new ParameterizedTypeReference<Client>() {};
return testClientModelRequestCreation(body).bodyToMono(localVarReturnType);
return testClientModelRequestCreation(client).bodyToMono(localVarReturnType);
}
public Mono<ResponseEntity<Client>> testClientModelWithHttpInfo(Client body) throws WebClientResponseException {
public Mono<ResponseEntity<Client>> testClientModelWithHttpInfo(Client client) throws WebClientResponseException {
ParameterizedTypeReference<Client> localVarReturnType = new ParameterizedTypeReference<Client>() {};
return testClientModelRequestCreation(body).toEntity(localVarReturnType);
return testClientModelRequestCreation(client).toEntity(localVarReturnType);
}
/**
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
* <p><b>400</b> - Invalid username supplied
* <p><b>404</b> - User not found
* @param number None
@@ -549,8 +717,8 @@ public class FakeApi {
}
/**
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
* <p><b>400</b> - Invalid username supplied
* <p><b>404</b> - User not found
* @param number None
@@ -603,7 +771,7 @@ public class FakeApi {
final MultiValueMap<String, String> cookieParams = new LinkedMultiValueMap<String, String>();
final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<String, Object>();
queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("csv".toUpperCase(Locale.ROOT)), "enum_query_string_array", enumQueryStringArray));
queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("multi".toUpperCase(Locale.ROOT)), "enum_query_string_array", enumQueryStringArray));
queryParams.putAll(apiClient.parameterToMultiValueMap(null, "enum_query_string", enumQueryString));
queryParams.putAll(apiClient.parameterToMultiValueMap(null, "enum_query_integer", enumQueryInteger));
queryParams.putAll(apiClient.parameterToMultiValueMap(null, "enum_query_double", enumQueryDouble));
@@ -702,7 +870,7 @@ public class FakeApi {
final String[] localVarContentTypes = { };
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
String[] localVarAuthNames = new String[] { "bearer_test" };
ParameterizedTypeReference<Void> localVarReturnType = new ParameterizedTypeReference<Void>() {};
return apiClient.invokeAPI("/fake", HttpMethod.DELETE, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
@@ -733,14 +901,14 @@ public class FakeApi {
* test inline additionalProperties
*
* <p><b>200</b> - successful operation
* @param param request body
* @param requestBody request body
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec testInlineAdditionalPropertiesRequestCreation(Map<String, String> param) throws WebClientResponseException {
Object postBody = param;
// verify the required parameter 'param' is set
if (param == null) {
throw new WebClientResponseException("Missing the required parameter 'param' when calling testInlineAdditionalProperties", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
private ResponseSpec testInlineAdditionalPropertiesRequestCreation(Map<String, String> requestBody) throws WebClientResponseException {
Object postBody = requestBody;
// verify the required parameter 'requestBody' is set
if (requestBody == null) {
throw new WebClientResponseException("Missing the required parameter 'requestBody' when calling testInlineAdditionalProperties", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map<String, Object> pathParams = new HashMap<String, Object>();
@@ -767,17 +935,17 @@ public class FakeApi {
* test inline additionalProperties
*
* <p><b>200</b> - successful operation
* @param param request body
* @param requestBody request body
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono<Void> testInlineAdditionalProperties(Map<String, String> param) throws WebClientResponseException {
public Mono<Void> testInlineAdditionalProperties(Map<String, String> requestBody) throws WebClientResponseException {
ParameterizedTypeReference<Void> localVarReturnType = new ParameterizedTypeReference<Void>() {};
return testInlineAdditionalPropertiesRequestCreation(param).bodyToMono(localVarReturnType);
return testInlineAdditionalPropertiesRequestCreation(requestBody).bodyToMono(localVarReturnType);
}
public Mono<ResponseEntity<Void>> testInlineAdditionalPropertiesWithHttpInfo(Map<String, String> param) throws WebClientResponseException {
public Mono<ResponseEntity<Void>> testInlineAdditionalPropertiesWithHttpInfo(Map<String, String> requestBody) throws WebClientResponseException {
ParameterizedTypeReference<Void> localVarReturnType = new ParameterizedTypeReference<Void>() {};
return testInlineAdditionalPropertiesRequestCreation(param).toEntity(localVarReturnType);
return testInlineAdditionalPropertiesRequestCreation(requestBody).toEntity(localVarReturnType);
}
/**
* test json serialization of form data
@@ -881,7 +1049,7 @@ public class FakeApi {
final MultiValueMap<String, String> cookieParams = new LinkedMultiValueMap<String, String>();
final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<String, Object>();
queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("csv".toUpperCase(Locale.ROOT)), "pipe", pipe));
queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("pipes".toUpperCase(Locale.ROOT)), "pipe", pipe));
queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("csv".toUpperCase(Locale.ROOT)), "ioutil", ioutil));
queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("ssv".toUpperCase(Locale.ROOT)), "http", http));
queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("csv".toUpperCase(Locale.ROOT)), "url", url));

View File

@@ -51,15 +51,15 @@ public class FakeClassnameTags123Api {
* To test class name in snake case
* To test class name in snake case
* <p><b>200</b> - successful operation
* @param body client model
* @param client client model
* @return Client
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec testClassnameRequestCreation(Client body) throws WebClientResponseException {
Object postBody = body;
// verify the required parameter 'body' is set
if (body == null) {
throw new WebClientResponseException("Missing the required parameter 'body' when calling testClassname", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
private ResponseSpec testClassnameRequestCreation(Client client) throws WebClientResponseException {
Object postBody = client;
// verify the required parameter 'client' is set
if (client == null) {
throw new WebClientResponseException("Missing the required parameter 'client' when calling testClassname", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map<String, Object> pathParams = new HashMap<String, Object>();
@@ -88,17 +88,17 @@ public class FakeClassnameTags123Api {
* To test class name in snake case
* To test class name in snake case
* <p><b>200</b> - successful operation
* @param body client model
* @param client client model
* @return Client
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono<Client> testClassname(Client body) throws WebClientResponseException {
public Mono<Client> testClassname(Client client) throws WebClientResponseException {
ParameterizedTypeReference<Client> localVarReturnType = new ParameterizedTypeReference<Client>() {};
return testClassnameRequestCreation(body).bodyToMono(localVarReturnType);
return testClassnameRequestCreation(client).bodyToMono(localVarReturnType);
}
public Mono<ResponseEntity<Client>> testClassnameWithHttpInfo(Client body) throws WebClientResponseException {
public Mono<ResponseEntity<Client>> testClassnameWithHttpInfo(Client client) throws WebClientResponseException {
ParameterizedTypeReference<Client> localVarReturnType = new ParameterizedTypeReference<Client>() {};
return testClassnameRequestCreation(body).toEntity(localVarReturnType);
return testClassnameRequestCreation(client).toEntity(localVarReturnType);
}
}

View File

@@ -53,16 +53,16 @@ public class PetApi {
/**
* Add a new pet to the store
*
* <p><b>200</b> - successful operation
* <p><b>200</b> - Successful operation
* <p><b>405</b> - Invalid input
* @param body Pet object that needs to be added to the store
* @param pet Pet object that needs to be added to the store
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec addPetRequestCreation(Pet body) throws WebClientResponseException {
Object postBody = body;
// verify the required parameter 'body' is set
if (body == null) {
throw new WebClientResponseException("Missing the required parameter 'body' when calling addPet", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
private ResponseSpec addPetRequestCreation(Pet pet) throws WebClientResponseException {
Object postBody = pet;
// verify the required parameter 'pet' is set
if (pet == null) {
throw new WebClientResponseException("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<String, Object> pathParams = new HashMap<String, Object>();
@@ -88,24 +88,24 @@ public class PetApi {
/**
* Add a new pet to the store
*
* <p><b>200</b> - successful operation
* <p><b>200</b> - Successful operation
* <p><b>405</b> - Invalid input
* @param body Pet object that needs to be added to the store
* @param pet Pet object that needs to be added to the store
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono<Void> addPet(Pet body) throws WebClientResponseException {
public Mono<Void> addPet(Pet pet) throws WebClientResponseException {
ParameterizedTypeReference<Void> localVarReturnType = new ParameterizedTypeReference<Void>() {};
return addPetRequestCreation(body).bodyToMono(localVarReturnType);
return addPetRequestCreation(pet).bodyToMono(localVarReturnType);
}
public Mono<ResponseEntity<Void>> addPetWithHttpInfo(Pet body) throws WebClientResponseException {
public Mono<ResponseEntity<Void>> addPetWithHttpInfo(Pet pet) throws WebClientResponseException {
ParameterizedTypeReference<Void> localVarReturnType = new ParameterizedTypeReference<Void>() {};
return addPetRequestCreation(body).toEntity(localVarReturnType);
return addPetRequestCreation(pet).toEntity(localVarReturnType);
}
/**
* Deletes a pet
*
* <p><b>200</b> - successful operation
* <p><b>200</b> - Successful operation
* <p><b>400</b> - Invalid pet value
* @param petId Pet id to delete
* @param apiKey The apiKey parameter
@@ -143,7 +143,7 @@ public class PetApi {
/**
* Deletes a pet
*
* <p><b>200</b> - successful operation
* <p><b>200</b> - Successful operation
* <p><b>400</b> - Invalid pet value
* @param petId Pet id to delete
* @param apiKey The apiKey parameter
@@ -222,7 +222,9 @@ public class PetApi {
* @param tags Tags to filter by
* @return Set&lt;Pet&gt;
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
* @deprecated
*/
@Deprecated
private ResponseSpec findPetsByTagsRequestCreation(Set<String> tags) throws WebClientResponseException {
Object postBody = null;
// verify the required parameter 'tags' is set
@@ -331,18 +333,18 @@ public class PetApi {
/**
* Update an existing pet
*
* <p><b>200</b> - successful operation
* <p><b>200</b> - Successful operation
* <p><b>400</b> - Invalid ID supplied
* <p><b>404</b> - Pet not found
* <p><b>405</b> - Validation exception
* @param body Pet object that needs to be added to the store
* @param pet Pet object that needs to be added to the store
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec updatePetRequestCreation(Pet body) throws WebClientResponseException {
Object postBody = body;
// verify the required parameter 'body' is set
if (body == null) {
throw new WebClientResponseException("Missing the required parameter 'body' when calling updatePet", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
private ResponseSpec updatePetRequestCreation(Pet pet) throws WebClientResponseException {
Object postBody = pet;
// verify the required parameter 'pet' is set
if (pet == null) {
throw new WebClientResponseException("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<String, Object> pathParams = new HashMap<String, Object>();
@@ -368,25 +370,26 @@ public class PetApi {
/**
* Update an existing pet
*
* <p><b>200</b> - successful operation
* <p><b>200</b> - Successful operation
* <p><b>400</b> - Invalid ID supplied
* <p><b>404</b> - Pet not found
* <p><b>405</b> - Validation exception
* @param body Pet object that needs to be added to the store
* @param pet Pet object that needs to be added to the store
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono<Void> updatePet(Pet body) throws WebClientResponseException {
public Mono<Void> updatePet(Pet pet) throws WebClientResponseException {
ParameterizedTypeReference<Void> localVarReturnType = new ParameterizedTypeReference<Void>() {};
return updatePetRequestCreation(body).bodyToMono(localVarReturnType);
return updatePetRequestCreation(pet).bodyToMono(localVarReturnType);
}
public Mono<ResponseEntity<Void>> updatePetWithHttpInfo(Pet body) throws WebClientResponseException {
public Mono<ResponseEntity<Void>> updatePetWithHttpInfo(Pet pet) throws WebClientResponseException {
ParameterizedTypeReference<Void> localVarReturnType = new ParameterizedTypeReference<Void>() {};
return updatePetRequestCreation(body).toEntity(localVarReturnType);
return updatePetRequestCreation(pet).toEntity(localVarReturnType);
}
/**
* Updates a pet in the store with form data
*
* <p><b>200</b> - Successful operation
* <p><b>405</b> - Invalid input
* @param petId ID of pet that needs to be updated
* @param name Updated name of the pet
@@ -430,6 +433,7 @@ public class PetApi {
/**
* Updates a pet in the store with form data
*
* <p><b>200</b> - Successful operation
* <p><b>405</b> - Invalid input
* @param petId ID of pet that needs to be updated
* @param name Updated name of the pet

View File

@@ -208,15 +208,15 @@ public class StoreApi {
*
* <p><b>200</b> - successful operation
* <p><b>400</b> - Invalid Order
* @param body order placed for purchasing the pet
* @param order order placed for purchasing the pet
* @return Order
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec placeOrderRequestCreation(Order body) throws WebClientResponseException {
Object postBody = body;
// verify the required parameter 'body' is set
if (body == null) {
throw new WebClientResponseException("Missing the required parameter 'body' when calling placeOrder", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
private ResponseSpec placeOrderRequestCreation(Order order) throws WebClientResponseException {
Object postBody = order;
// verify the required parameter 'order' is set
if (order == null) {
throw new WebClientResponseException("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<String, Object> pathParams = new HashMap<String, Object>();
@@ -230,7 +230,9 @@ public class StoreApi {
"application/xml", "application/json"
};
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final String[] localVarContentTypes = {
"application/json"
};
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
@@ -244,17 +246,17 @@ public class StoreApi {
*
* <p><b>200</b> - successful operation
* <p><b>400</b> - Invalid Order
* @param body order placed for purchasing the pet
* @param order order placed for purchasing the pet
* @return Order
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono<Order> placeOrder(Order body) throws WebClientResponseException {
public Mono<Order> placeOrder(Order order) throws WebClientResponseException {
ParameterizedTypeReference<Order> localVarReturnType = new ParameterizedTypeReference<Order>() {};
return placeOrderRequestCreation(body).bodyToMono(localVarReturnType);
return placeOrderRequestCreation(order).bodyToMono(localVarReturnType);
}
public Mono<ResponseEntity<Order>> placeOrderWithHttpInfo(Order body) throws WebClientResponseException {
public Mono<ResponseEntity<Order>> placeOrderWithHttpInfo(Order order) throws WebClientResponseException {
ParameterizedTypeReference<Order> localVarReturnType = new ParameterizedTypeReference<Order>() {};
return placeOrderRequestCreation(body).toEntity(localVarReturnType);
return placeOrderRequestCreation(order).toEntity(localVarReturnType);
}
}

View File

@@ -51,14 +51,14 @@ public class UserApi {
* Create user
* This can only be done by the logged in user.
* <p><b>0</b> - successful operation
* @param body Created user object
* @param user Created user object
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec createUserRequestCreation(User body) throws WebClientResponseException {
Object postBody = body;
// verify the required parameter 'body' is set
if (body == null) {
throw new WebClientResponseException("Missing the required parameter 'body' when calling createUser", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
private ResponseSpec createUserRequestCreation(User user) throws WebClientResponseException {
Object postBody = user;
// verify the required parameter 'user' is set
if (user == null) {
throw new WebClientResponseException("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<String, Object> pathParams = new HashMap<String, Object>();
@@ -70,7 +70,9 @@ public class UserApi {
final String[] localVarAccepts = { };
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final String[] localVarContentTypes = {
"application/json"
};
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
@@ -83,30 +85,30 @@ public class UserApi {
* Create user
* This can only be done by the logged in user.
* <p><b>0</b> - successful operation
* @param body Created user object
* @param user Created user object
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono<Void> createUser(User body) throws WebClientResponseException {
public Mono<Void> createUser(User user) throws WebClientResponseException {
ParameterizedTypeReference<Void> localVarReturnType = new ParameterizedTypeReference<Void>() {};
return createUserRequestCreation(body).bodyToMono(localVarReturnType);
return createUserRequestCreation(user).bodyToMono(localVarReturnType);
}
public Mono<ResponseEntity<Void>> createUserWithHttpInfo(User body) throws WebClientResponseException {
public Mono<ResponseEntity<Void>> createUserWithHttpInfo(User user) throws WebClientResponseException {
ParameterizedTypeReference<Void> localVarReturnType = new ParameterizedTypeReference<Void>() {};
return createUserRequestCreation(body).toEntity(localVarReturnType);
return createUserRequestCreation(user).toEntity(localVarReturnType);
}
/**
* Creates list of users with given input array
*
* <p><b>0</b> - successful operation
* @param body List of user object
* @param user List of user object
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec createUsersWithArrayInputRequestCreation(List<User> body) throws WebClientResponseException {
Object postBody = body;
// verify the required parameter 'body' is set
if (body == null) {
throw new WebClientResponseException("Missing the required parameter 'body' when calling createUsersWithArrayInput", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
private ResponseSpec createUsersWithArrayInputRequestCreation(List<User> user) throws WebClientResponseException {
Object postBody = user;
// verify the required parameter 'user' is set
if (user == null) {
throw new WebClientResponseException("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<String, Object> pathParams = new HashMap<String, Object>();
@@ -118,7 +120,9 @@ public class UserApi {
final String[] localVarAccepts = { };
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final String[] localVarContentTypes = {
"application/json"
};
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
@@ -131,30 +135,30 @@ public class UserApi {
* Creates list of users with given input array
*
* <p><b>0</b> - successful operation
* @param body List of user object
* @param user List of user object
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono<Void> createUsersWithArrayInput(List<User> body) throws WebClientResponseException {
public Mono<Void> createUsersWithArrayInput(List<User> user) throws WebClientResponseException {
ParameterizedTypeReference<Void> localVarReturnType = new ParameterizedTypeReference<Void>() {};
return createUsersWithArrayInputRequestCreation(body).bodyToMono(localVarReturnType);
return createUsersWithArrayInputRequestCreation(user).bodyToMono(localVarReturnType);
}
public Mono<ResponseEntity<Void>> createUsersWithArrayInputWithHttpInfo(List<User> body) throws WebClientResponseException {
public Mono<ResponseEntity<Void>> createUsersWithArrayInputWithHttpInfo(List<User> user) throws WebClientResponseException {
ParameterizedTypeReference<Void> localVarReturnType = new ParameterizedTypeReference<Void>() {};
return createUsersWithArrayInputRequestCreation(body).toEntity(localVarReturnType);
return createUsersWithArrayInputRequestCreation(user).toEntity(localVarReturnType);
}
/**
* Creates list of users with given input array
*
* <p><b>0</b> - successful operation
* @param body List of user object
* @param user List of user object
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec createUsersWithListInputRequestCreation(List<User> body) throws WebClientResponseException {
Object postBody = body;
// verify the required parameter 'body' is set
if (body == null) {
throw new WebClientResponseException("Missing the required parameter 'body' when calling createUsersWithListInput", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
private ResponseSpec createUsersWithListInputRequestCreation(List<User> user) throws WebClientResponseException {
Object postBody = user;
// verify the required parameter 'user' is set
if (user == null) {
throw new WebClientResponseException("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<String, Object> pathParams = new HashMap<String, Object>();
@@ -166,7 +170,9 @@ public class UserApi {
final String[] localVarAccepts = { };
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final String[] localVarContentTypes = {
"application/json"
};
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
@@ -179,17 +185,17 @@ public class UserApi {
* Creates list of users with given input array
*
* <p><b>0</b> - successful operation
* @param body List of user object
* @param user List of user object
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono<Void> createUsersWithListInput(List<User> body) throws WebClientResponseException {
public Mono<Void> createUsersWithListInput(List<User> user) throws WebClientResponseException {
ParameterizedTypeReference<Void> localVarReturnType = new ParameterizedTypeReference<Void>() {};
return createUsersWithListInputRequestCreation(body).bodyToMono(localVarReturnType);
return createUsersWithListInputRequestCreation(user).bodyToMono(localVarReturnType);
}
public Mono<ResponseEntity<Void>> createUsersWithListInputWithHttpInfo(List<User> body) throws WebClientResponseException {
public Mono<ResponseEntity<Void>> createUsersWithListInputWithHttpInfo(List<User> user) throws WebClientResponseException {
ParameterizedTypeReference<Void> localVarReturnType = new ParameterizedTypeReference<Void>() {};
return createUsersWithListInputRequestCreation(body).toEntity(localVarReturnType);
return createUsersWithListInputRequestCreation(user).toEntity(localVarReturnType);
}
/**
* Delete user
@@ -412,18 +418,18 @@ public class UserApi {
* <p><b>400</b> - Invalid user supplied
* <p><b>404</b> - User not found
* @param username name that need to be deleted
* @param body Updated user object
* @param user Updated user object
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec updateUserRequestCreation(String username, User body) throws WebClientResponseException {
Object postBody = body;
private ResponseSpec updateUserRequestCreation(String username, User user) throws WebClientResponseException {
Object postBody = user;
// verify the required parameter 'username' is set
if (username == null) {
throw new WebClientResponseException("Missing the required parameter 'username' when calling updateUser", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'body' is set
if (body == null) {
throw new WebClientResponseException("Missing the required parameter 'body' 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 WebClientResponseException("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<String, Object> pathParams = new HashMap<String, Object>();
@@ -437,7 +443,9 @@ public class UserApi {
final String[] localVarAccepts = { };
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final String[] localVarContentTypes = {
"application/json"
};
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
@@ -452,16 +460,16 @@ public class UserApi {
* <p><b>400</b> - Invalid user supplied
* <p><b>404</b> - User not found
* @param username name that need to be deleted
* @param body Updated user object
* @param user Updated user object
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono<Void> updateUser(String username, User body) throws WebClientResponseException {
public Mono<Void> updateUser(String username, User user) throws WebClientResponseException {
ParameterizedTypeReference<Void> localVarReturnType = new ParameterizedTypeReference<Void>() {};
return updateUserRequestCreation(username, body).bodyToMono(localVarReturnType);
return updateUserRequestCreation(username, user).bodyToMono(localVarReturnType);
}
public Mono<ResponseEntity<Void>> updateUserWithHttpInfo(String username, User body) throws WebClientResponseException {
public Mono<ResponseEntity<Void>> updateUserWithHttpInfo(String username, User user) throws WebClientResponseException {
ParameterizedTypeReference<Void> localVarReturnType = new ParameterizedTypeReference<Void>() {};
return updateUserRequestCreation(username, body).toEntity(localVarReturnType);
return updateUserRequestCreation(username, user).toEntity(localVarReturnType);
}
}

View File

@@ -22,7 +22,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -32,413 +31,86 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
* AdditionalPropertiesClass
*/
@JsonPropertyOrder({
AdditionalPropertiesClass.JSON_PROPERTY_MAP_STRING,
AdditionalPropertiesClass.JSON_PROPERTY_MAP_NUMBER,
AdditionalPropertiesClass.JSON_PROPERTY_MAP_INTEGER,
AdditionalPropertiesClass.JSON_PROPERTY_MAP_BOOLEAN,
AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_INTEGER,
AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE,
AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING,
AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE,
AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1,
AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2,
AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3
AdditionalPropertiesClass.JSON_PROPERTY_MAP_PROPERTY,
AdditionalPropertiesClass.JSON_PROPERTY_MAP_OF_MAP_PROPERTY
})
@JsonTypeName("AdditionalPropertiesClass")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class AdditionalPropertiesClass {
public static final String JSON_PROPERTY_MAP_STRING = "map_string";
private Map<String, String> mapString = null;
public static final String JSON_PROPERTY_MAP_PROPERTY = "map_property";
private Map<String, String> mapProperty = null;
public static final String JSON_PROPERTY_MAP_NUMBER = "map_number";
private Map<String, BigDecimal> mapNumber = null;
public static final String JSON_PROPERTY_MAP_INTEGER = "map_integer";
private Map<String, Integer> mapInteger = null;
public static final String JSON_PROPERTY_MAP_BOOLEAN = "map_boolean";
private Map<String, Boolean> mapBoolean = null;
public static final String JSON_PROPERTY_MAP_ARRAY_INTEGER = "map_array_integer";
private Map<String, List<Integer>> mapArrayInteger = null;
public static final String JSON_PROPERTY_MAP_ARRAY_ANYTYPE = "map_array_anytype";
private Map<String, List<Object>> mapArrayAnytype = null;
public static final String JSON_PROPERTY_MAP_MAP_STRING = "map_map_string";
private Map<String, Map<String, String>> mapMapString = null;
public static final String JSON_PROPERTY_MAP_MAP_ANYTYPE = "map_map_anytype";
private Map<String, Map<String, Object>> mapMapAnytype = null;
public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1";
private Object anytype1;
public static final String JSON_PROPERTY_ANYTYPE2 = "anytype_2";
private Object anytype2;
public static final String JSON_PROPERTY_ANYTYPE3 = "anytype_3";
private Object anytype3;
public static final String JSON_PROPERTY_MAP_OF_MAP_PROPERTY = "map_of_map_property";
private Map<String, Map<String, String>> mapOfMapProperty = null;
public AdditionalPropertiesClass mapString(Map<String, String> mapString) {
public AdditionalPropertiesClass mapProperty(Map<String, String> mapProperty) {
this.mapString = mapString;
this.mapProperty = mapProperty;
return this;
}
public AdditionalPropertiesClass putMapStringItem(String key, String mapStringItem) {
if (this.mapString == null) {
this.mapString = new HashMap<>();
public AdditionalPropertiesClass putMapPropertyItem(String key, String mapPropertyItem) {
if (this.mapProperty == null) {
this.mapProperty = new HashMap<>();
}
this.mapString.put(key, mapStringItem);
this.mapProperty.put(key, mapPropertyItem);
return this;
}
/**
* Get mapString
* @return mapString
* Get mapProperty
* @return mapProperty
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_MAP_STRING)
@JsonProperty(JSON_PROPERTY_MAP_PROPERTY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, String> getMapString() {
return mapString;
public Map<String, String> getMapProperty() {
return mapProperty;
}
@JsonProperty(JSON_PROPERTY_MAP_STRING)
@JsonProperty(JSON_PROPERTY_MAP_PROPERTY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMapString(Map<String, String> mapString) {
this.mapString = mapString;
public void setMapProperty(Map<String, String> mapProperty) {
this.mapProperty = mapProperty;
}
public AdditionalPropertiesClass mapNumber(Map<String, BigDecimal> mapNumber) {
public AdditionalPropertiesClass mapOfMapProperty(Map<String, Map<String, String>> mapOfMapProperty) {
this.mapNumber = mapNumber;
this.mapOfMapProperty = mapOfMapProperty;
return this;
}
public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumberItem) {
if (this.mapNumber == null) {
this.mapNumber = new HashMap<>();
public AdditionalPropertiesClass putMapOfMapPropertyItem(String key, Map<String, String> mapOfMapPropertyItem) {
if (this.mapOfMapProperty == null) {
this.mapOfMapProperty = new HashMap<>();
}
this.mapNumber.put(key, mapNumberItem);
this.mapOfMapProperty.put(key, mapOfMapPropertyItem);
return this;
}
/**
* Get mapNumber
* @return mapNumber
* Get mapOfMapProperty
* @return mapOfMapProperty
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_MAP_NUMBER)
@JsonProperty(JSON_PROPERTY_MAP_OF_MAP_PROPERTY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, BigDecimal> getMapNumber() {
return mapNumber;
public Map<String, Map<String, String>> getMapOfMapProperty() {
return mapOfMapProperty;
}
@JsonProperty(JSON_PROPERTY_MAP_NUMBER)
@JsonProperty(JSON_PROPERTY_MAP_OF_MAP_PROPERTY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMapNumber(Map<String, BigDecimal> mapNumber) {
this.mapNumber = mapNumber;
}
public AdditionalPropertiesClass mapInteger(Map<String, Integer> mapInteger) {
this.mapInteger = mapInteger;
return this;
}
public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntegerItem) {
if (this.mapInteger == null) {
this.mapInteger = new HashMap<>();
}
this.mapInteger.put(key, mapIntegerItem);
return this;
}
/**
* Get mapInteger
* @return mapInteger
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_MAP_INTEGER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, Integer> getMapInteger() {
return mapInteger;
}
@JsonProperty(JSON_PROPERTY_MAP_INTEGER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMapInteger(Map<String, Integer> mapInteger) {
this.mapInteger = mapInteger;
}
public AdditionalPropertiesClass mapBoolean(Map<String, Boolean> mapBoolean) {
this.mapBoolean = mapBoolean;
return this;
}
public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBooleanItem) {
if (this.mapBoolean == null) {
this.mapBoolean = new HashMap<>();
}
this.mapBoolean.put(key, mapBooleanItem);
return this;
}
/**
* Get mapBoolean
* @return mapBoolean
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_MAP_BOOLEAN)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, Boolean> getMapBoolean() {
return mapBoolean;
}
@JsonProperty(JSON_PROPERTY_MAP_BOOLEAN)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMapBoolean(Map<String, Boolean> mapBoolean) {
this.mapBoolean = mapBoolean;
}
public AdditionalPropertiesClass mapArrayInteger(Map<String, List<Integer>> mapArrayInteger) {
this.mapArrayInteger = mapArrayInteger;
return this;
}
public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List<Integer> mapArrayIntegerItem) {
if (this.mapArrayInteger == null) {
this.mapArrayInteger = new HashMap<>();
}
this.mapArrayInteger.put(key, mapArrayIntegerItem);
return this;
}
/**
* Get mapArrayInteger
* @return mapArrayInteger
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_MAP_ARRAY_INTEGER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, List<Integer>> getMapArrayInteger() {
return mapArrayInteger;
}
@JsonProperty(JSON_PROPERTY_MAP_ARRAY_INTEGER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMapArrayInteger(Map<String, List<Integer>> mapArrayInteger) {
this.mapArrayInteger = mapArrayInteger;
}
public AdditionalPropertiesClass mapArrayAnytype(Map<String, List<Object>> mapArrayAnytype) {
this.mapArrayAnytype = mapArrayAnytype;
return this;
}
public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List<Object> mapArrayAnytypeItem) {
if (this.mapArrayAnytype == null) {
this.mapArrayAnytype = new HashMap<>();
}
this.mapArrayAnytype.put(key, mapArrayAnytypeItem);
return this;
}
/**
* Get mapArrayAnytype
* @return mapArrayAnytype
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_MAP_ARRAY_ANYTYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, List<Object>> getMapArrayAnytype() {
return mapArrayAnytype;
}
@JsonProperty(JSON_PROPERTY_MAP_ARRAY_ANYTYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMapArrayAnytype(Map<String, List<Object>> mapArrayAnytype) {
this.mapArrayAnytype = mapArrayAnytype;
}
public AdditionalPropertiesClass mapMapString(Map<String, Map<String, String>> mapMapString) {
this.mapMapString = mapMapString;
return this;
}
public AdditionalPropertiesClass putMapMapStringItem(String key, Map<String, String> mapMapStringItem) {
if (this.mapMapString == null) {
this.mapMapString = new HashMap<>();
}
this.mapMapString.put(key, mapMapStringItem);
return this;
}
/**
* Get mapMapString
* @return mapMapString
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_MAP_MAP_STRING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, Map<String, String>> getMapMapString() {
return mapMapString;
}
@JsonProperty(JSON_PROPERTY_MAP_MAP_STRING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMapMapString(Map<String, Map<String, String>> mapMapString) {
this.mapMapString = mapMapString;
}
public AdditionalPropertiesClass mapMapAnytype(Map<String, Map<String, Object>> mapMapAnytype) {
this.mapMapAnytype = mapMapAnytype;
return this;
}
public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map<String, Object> mapMapAnytypeItem) {
if (this.mapMapAnytype == null) {
this.mapMapAnytype = new HashMap<>();
}
this.mapMapAnytype.put(key, mapMapAnytypeItem);
return this;
}
/**
* Get mapMapAnytype
* @return mapMapAnytype
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_MAP_MAP_ANYTYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, Map<String, Object>> getMapMapAnytype() {
return mapMapAnytype;
}
@JsonProperty(JSON_PROPERTY_MAP_MAP_ANYTYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMapMapAnytype(Map<String, Map<String, Object>> mapMapAnytype) {
this.mapMapAnytype = mapMapAnytype;
}
public AdditionalPropertiesClass anytype1(Object anytype1) {
this.anytype1 = anytype1;
return this;
}
/**
* Get anytype1
* @return anytype1
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ANYTYPE1)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Object getAnytype1() {
return anytype1;
}
@JsonProperty(JSON_PROPERTY_ANYTYPE1)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAnytype1(Object anytype1) {
this.anytype1 = anytype1;
}
public AdditionalPropertiesClass anytype2(Object anytype2) {
this.anytype2 = anytype2;
return this;
}
/**
* Get anytype2
* @return anytype2
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ANYTYPE2)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Object getAnytype2() {
return anytype2;
}
@JsonProperty(JSON_PROPERTY_ANYTYPE2)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAnytype2(Object anytype2) {
this.anytype2 = anytype2;
}
public AdditionalPropertiesClass anytype3(Object anytype3) {
this.anytype3 = anytype3;
return this;
}
/**
* Get anytype3
* @return anytype3
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ANYTYPE3)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Object getAnytype3() {
return anytype3;
}
@JsonProperty(JSON_PROPERTY_ANYTYPE3)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAnytype3(Object anytype3) {
this.anytype3 = anytype3;
public void setMapOfMapProperty(Map<String, Map<String, String>> mapOfMapProperty) {
this.mapOfMapProperty = mapOfMapProperty;
}
@@ -451,39 +123,21 @@ public class AdditionalPropertiesClass {
return false;
}
AdditionalPropertiesClass additionalPropertiesClass = (AdditionalPropertiesClass) o;
return Objects.equals(this.mapString, additionalPropertiesClass.mapString) &&
Objects.equals(this.mapNumber, additionalPropertiesClass.mapNumber) &&
Objects.equals(this.mapInteger, additionalPropertiesClass.mapInteger) &&
Objects.equals(this.mapBoolean, additionalPropertiesClass.mapBoolean) &&
Objects.equals(this.mapArrayInteger, additionalPropertiesClass.mapArrayInteger) &&
Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) &&
Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) &&
Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) &&
Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) &&
Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) &&
Objects.equals(this.anytype3, additionalPropertiesClass.anytype3);
return Objects.equals(this.mapProperty, additionalPropertiesClass.mapProperty) &&
Objects.equals(this.mapOfMapProperty, additionalPropertiesClass.mapOfMapProperty);
}
@Override
public int hashCode() {
return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3);
return Objects.hash(mapProperty, mapOfMapProperty);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AdditionalPropertiesClass {\n");
sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n");
sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n");
sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n");
sb.append(" mapBoolean: ").append(toIndentedString(mapBoolean)).append("\n");
sb.append(" mapArrayInteger: ").append(toIndentedString(mapArrayInteger)).append("\n");
sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n");
sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n");
sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n");
sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n");
sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n");
sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n");
sb.append(" mapProperty: ").append(toIndentedString(mapProperty)).append("\n");
sb.append(" mapOfMapProperty: ").append(toIndentedString(mapOfMapProperty)).append("\n");
sb.append("}");
return sb.toString();
}

View File

@@ -24,7 +24,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.openapitools.client.model.BigCat;
import org.openapitools.client.model.Cat;
import org.openapitools.client.model.Dog;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
@@ -40,7 +39,6 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true)
@JsonSubTypes({
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat"),
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
})
@@ -63,6 +61,7 @@ public class Animal {
* Get className
* @return className
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "")
@JsonProperty(JSON_PROPERTY_CLASS_NAME)
@JsonInclude(value = JsonInclude.Include.ALWAYS)

View File

@@ -25,7 +25,6 @@ import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.openapitools.client.model.Animal;
import org.openapitools.client.model.BigCat;
import org.openapitools.client.model.CatAllOf;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
@@ -38,9 +37,6 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
@JsonTypeName("Cat")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true)
@JsonSubTypes({
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat"),
})
public class Cat extends Animal {
public static final String JSON_PROPERTY_DECLAWED = "declawed";

View File

@@ -78,6 +78,7 @@ public class Category {
* Get name
* @return name
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "")
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.ALWAYS)

View File

@@ -0,0 +1,107 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.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 io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* DeprecatedObject
* @deprecated
*/
@Deprecated
@JsonPropertyOrder({
DeprecatedObject.JSON_PROPERTY_NAME
})
@JsonTypeName("DeprecatedObject")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class DeprecatedObject {
public static final String JSON_PROPERTY_NAME = "name";
private String name;
public DeprecatedObject name(String name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getName() {
return name;
}
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setName(String name) {
this.name = name;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DeprecatedObject deprecatedObject = (DeprecatedObject) o;
return Objects.equals(this.name, deprecatedObject.name);
}
@Override
public int hashCode() {
return Objects.hash(name);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DeprecatedObject {\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) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -23,6 +23,12 @@ import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.openapitools.client.model.OuterEnum;
import org.openapitools.client.model.OuterEnumDefaultValue;
import org.openapitools.client.model.OuterEnumInteger;
import org.openapitools.client.model.OuterEnumIntegerDefaultValue;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.openapitools.jackson.nullable.JsonNullable;
import java.util.NoSuchElementException;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
@@ -33,7 +39,10 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
EnumTest.JSON_PROPERTY_ENUM_STRING_REQUIRED,
EnumTest.JSON_PROPERTY_ENUM_INTEGER,
EnumTest.JSON_PROPERTY_ENUM_NUMBER,
EnumTest.JSON_PROPERTY_OUTER_ENUM
EnumTest.JSON_PROPERTY_OUTER_ENUM,
EnumTest.JSON_PROPERTY_OUTER_ENUM_INTEGER,
EnumTest.JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE,
EnumTest.JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE
})
@JsonTypeName("Enum_Test")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
@@ -195,7 +204,16 @@ public class EnumTest {
private EnumNumberEnum enumNumber;
public static final String JSON_PROPERTY_OUTER_ENUM = "outerEnum";
private OuterEnum outerEnum;
private JsonNullable<OuterEnum> outerEnum = JsonNullable.<OuterEnum>undefined();
public static final String JSON_PROPERTY_OUTER_ENUM_INTEGER = "outerEnumInteger";
private OuterEnumInteger outerEnumInteger;
public static final String JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE = "outerEnumDefaultValue";
private OuterEnumDefaultValue outerEnumDefaultValue = OuterEnumDefaultValue.PLACED;
public static final String JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE = "outerEnumIntegerDefaultValue";
private OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue = OuterEnumIntegerDefaultValue.NUMBER_0;
public EnumTest enumString(EnumStringEnum enumString) {
@@ -235,6 +253,7 @@ public class EnumTest {
* Get enumStringRequired
* @return enumStringRequired
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "")
@JsonProperty(JSON_PROPERTY_ENUM_STRING_REQUIRED)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
@@ -306,8 +325,8 @@ public class EnumTest {
public EnumTest outerEnum(OuterEnum outerEnum) {
this.outerEnum = JsonNullable.<OuterEnum>of(outerEnum);
this.outerEnum = outerEnum;
return this;
}
@@ -317,18 +336,107 @@ public class EnumTest {
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonIgnore
public OuterEnum getOuterEnum() {
return outerEnum.orElse(null);
}
@JsonProperty(JSON_PROPERTY_OUTER_ENUM)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public OuterEnum getOuterEnum() {
public JsonNullable<OuterEnum> getOuterEnum_JsonNullable() {
return outerEnum;
}
@JsonProperty(JSON_PROPERTY_OUTER_ENUM)
public void setOuterEnum_JsonNullable(JsonNullable<OuterEnum> outerEnum) {
this.outerEnum = outerEnum;
}
public void setOuterEnum(OuterEnum outerEnum) {
this.outerEnum = JsonNullable.<OuterEnum>of(outerEnum);
}
@JsonProperty(JSON_PROPERTY_OUTER_ENUM)
public EnumTest outerEnumInteger(OuterEnumInteger outerEnumInteger) {
this.outerEnumInteger = outerEnumInteger;
return this;
}
/**
* Get outerEnumInteger
* @return outerEnumInteger
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setOuterEnum(OuterEnum outerEnum) {
this.outerEnum = outerEnum;
public OuterEnumInteger getOuterEnumInteger() {
return outerEnumInteger;
}
@JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setOuterEnumInteger(OuterEnumInteger outerEnumInteger) {
this.outerEnumInteger = outerEnumInteger;
}
public EnumTest outerEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue) {
this.outerEnumDefaultValue = outerEnumDefaultValue;
return this;
}
/**
* Get outerEnumDefaultValue
* @return outerEnumDefaultValue
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public OuterEnumDefaultValue getOuterEnumDefaultValue() {
return outerEnumDefaultValue;
}
@JsonProperty(JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setOuterEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue) {
this.outerEnumDefaultValue = outerEnumDefaultValue;
}
public EnumTest outerEnumIntegerDefaultValue(OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) {
this.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue;
return this;
}
/**
* Get outerEnumIntegerDefaultValue
* @return outerEnumIntegerDefaultValue
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public OuterEnumIntegerDefaultValue getOuterEnumIntegerDefaultValue() {
return outerEnumIntegerDefaultValue;
}
@JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setOuterEnumIntegerDefaultValue(OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) {
this.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue;
}
@@ -345,12 +453,15 @@ public class EnumTest {
Objects.equals(this.enumStringRequired, enumTest.enumStringRequired) &&
Objects.equals(this.enumInteger, enumTest.enumInteger) &&
Objects.equals(this.enumNumber, enumTest.enumNumber) &&
Objects.equals(this.outerEnum, enumTest.outerEnum);
Objects.equals(this.outerEnum, enumTest.outerEnum) &&
Objects.equals(this.outerEnumInteger, enumTest.outerEnumInteger) &&
Objects.equals(this.outerEnumDefaultValue, enumTest.outerEnumDefaultValue) &&
Objects.equals(this.outerEnumIntegerDefaultValue, enumTest.outerEnumIntegerDefaultValue);
}
@Override
public int hashCode() {
return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, outerEnum);
return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, outerEnum, outerEnumInteger, outerEnumDefaultValue, outerEnumIntegerDefaultValue);
}
@Override
@@ -362,6 +473,9 @@ public class EnumTest {
sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n");
sb.append(" enumNumber: ").append(toIndentedString(enumNumber)).append("\n");
sb.append(" outerEnum: ").append(toIndentedString(outerEnum)).append("\n");
sb.append(" outerEnumInteger: ").append(toIndentedString(outerEnumInteger)).append("\n");
sb.append(" outerEnumDefaultValue: ").append(toIndentedString(outerEnumDefaultValue)).append("\n");
sb.append(" outerEnumIntegerDefaultValue: ").append(toIndentedString(outerEnumIntegerDefaultValue)).append("\n");
sb.append("}");
return sb.toString();
}

View File

@@ -0,0 +1,105 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.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 io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* Foo
*/
@JsonPropertyOrder({
Foo.JSON_PROPERTY_BAR
})
@JsonTypeName("Foo")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class Foo {
public static final String JSON_PROPERTY_BAR = "bar";
private String bar = "bar";
public Foo bar(String bar) {
this.bar = bar;
return this;
}
/**
* Get bar
* @return bar
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_BAR)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getBar() {
return bar;
}
@JsonProperty(JSON_PROPERTY_BAR)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setBar(String bar) {
this.bar = bar;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Foo foo = (Foo) o;
return Objects.equals(this.bar, foo.bar);
}
@Override
public int hashCode() {
return Objects.hash(bar);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Foo {\n");
sb.append(" bar: ").append(toIndentedString(bar)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -39,6 +39,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
FormatTest.JSON_PROPERTY_NUMBER,
FormatTest.JSON_PROPERTY_FLOAT,
FormatTest.JSON_PROPERTY_DOUBLE,
FormatTest.JSON_PROPERTY_DECIMAL,
FormatTest.JSON_PROPERTY_STRING,
FormatTest.JSON_PROPERTY_BYTE,
FormatTest.JSON_PROPERTY_BINARY,
@@ -46,7 +47,8 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
FormatTest.JSON_PROPERTY_DATE_TIME,
FormatTest.JSON_PROPERTY_UUID,
FormatTest.JSON_PROPERTY_PASSWORD,
FormatTest.JSON_PROPERTY_BIG_DECIMAL
FormatTest.JSON_PROPERTY_PATTERN_WITH_DIGITS,
FormatTest.JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER
})
@JsonTypeName("format_test")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
@@ -69,6 +71,9 @@ public class FormatTest {
public static final String JSON_PROPERTY_DOUBLE = "double";
private Double _double;
public static final String JSON_PROPERTY_DECIMAL = "decimal";
private BigDecimal decimal;
public static final String JSON_PROPERTY_STRING = "string";
private String string;
@@ -90,8 +95,11 @@ public class FormatTest {
public static final String JSON_PROPERTY_PASSWORD = "password";
private String password;
public static final String JSON_PROPERTY_BIG_DECIMAL = "BigDecimal";
private BigDecimal bigDecimal;
public static final String JSON_PROPERTY_PATTERN_WITH_DIGITS = "pattern_with_digits";
private String patternWithDigits;
public static final String JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER = "pattern_with_digits_and_delimiter";
private String patternWithDigitsAndDelimiter;
public FormatTest integer(Integer integer) {
@@ -191,6 +199,7 @@ public class FormatTest {
* maximum: 543.2
* @return number
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "")
@JsonProperty(JSON_PROPERTY_NUMBER)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
@@ -265,6 +274,33 @@ public class FormatTest {
}
public FormatTest decimal(BigDecimal decimal) {
this.decimal = decimal;
return this;
}
/**
* Get decimal
* @return decimal
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_DECIMAL)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public BigDecimal getDecimal() {
return decimal;
}
@JsonProperty(JSON_PROPERTY_DECIMAL)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDecimal(BigDecimal decimal) {
this.decimal = decimal;
}
public FormatTest string(String string) {
this.string = string;
@@ -302,6 +338,7 @@ public class FormatTest {
* Get _byte
* @return _byte
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "")
@JsonProperty(JSON_PROPERTY_BYTE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
@@ -355,6 +392,7 @@ public class FormatTest {
* Get date
* @return date
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "")
@JsonProperty(JSON_PROPERTY_DATE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
@@ -435,6 +473,7 @@ public class FormatTest {
* Get password
* @return password
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "")
@JsonProperty(JSON_PROPERTY_PASSWORD)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
@@ -451,30 +490,57 @@ public class FormatTest {
}
public FormatTest bigDecimal(BigDecimal bigDecimal) {
public FormatTest patternWithDigits(String patternWithDigits) {
this.bigDecimal = bigDecimal;
this.patternWithDigits = patternWithDigits;
return this;
}
/**
* Get bigDecimal
* @return bigDecimal
* A string that is a 10 digit number. Can have leading zeros.
* @return patternWithDigits
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_BIG_DECIMAL)
@ApiModelProperty(value = "A string that is a 10 digit number. Can have leading zeros.")
@JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public BigDecimal getBigDecimal() {
return bigDecimal;
public String getPatternWithDigits() {
return patternWithDigits;
}
@JsonProperty(JSON_PROPERTY_BIG_DECIMAL)
@JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setBigDecimal(BigDecimal bigDecimal) {
this.bigDecimal = bigDecimal;
public void setPatternWithDigits(String patternWithDigits) {
this.patternWithDigits = patternWithDigits;
}
public FormatTest patternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) {
this.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter;
return this;
}
/**
* A string starting with &#39;image_&#39; (case insensitive) and one to three digits following i.e. Image_01.
* @return patternWithDigitsAndDelimiter
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.")
@JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getPatternWithDigitsAndDelimiter() {
return patternWithDigitsAndDelimiter;
}
@JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPatternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) {
this.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter;
}
@@ -493,6 +559,7 @@ public class FormatTest {
Objects.equals(this.number, formatTest.number) &&
Objects.equals(this._float, formatTest._float) &&
Objects.equals(this._double, formatTest._double) &&
Objects.equals(this.decimal, formatTest.decimal) &&
Objects.equals(this.string, formatTest.string) &&
Arrays.equals(this._byte, formatTest._byte) &&
Objects.equals(this.binary, formatTest.binary) &&
@@ -500,12 +567,13 @@ public class FormatTest {
Objects.equals(this.dateTime, formatTest.dateTime) &&
Objects.equals(this.uuid, formatTest.uuid) &&
Objects.equals(this.password, formatTest.password) &&
Objects.equals(this.bigDecimal, formatTest.bigDecimal);
Objects.equals(this.patternWithDigits, formatTest.patternWithDigits) &&
Objects.equals(this.patternWithDigitsAndDelimiter, formatTest.patternWithDigitsAndDelimiter);
}
@Override
public int hashCode() {
return Objects.hash(integer, int32, int64, number, _float, _double, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, bigDecimal);
return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter);
}
@Override
@@ -518,6 +586,7 @@ public class FormatTest {
sb.append(" number: ").append(toIndentedString(number)).append("\n");
sb.append(" _float: ").append(toIndentedString(_float)).append("\n");
sb.append(" _double: ").append(toIndentedString(_double)).append("\n");
sb.append(" decimal: ").append(toIndentedString(decimal)).append("\n");
sb.append(" string: ").append(toIndentedString(string)).append("\n");
sb.append(" _byte: ").append(toIndentedString(_byte)).append("\n");
sb.append(" binary: ").append(toIndentedString(binary)).append("\n");
@@ -525,7 +594,8 @@ public class FormatTest {
sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n");
sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n");
sb.append(" password: ").append(toIndentedString(password)).append("\n");
sb.append(" bigDecimal: ").append(toIndentedString(bigDecimal)).append("\n");
sb.append(" patternWithDigits: ").append(toIndentedString(patternWithDigits)).append("\n");
sb.append(" patternWithDigitsAndDelimiter: ").append(toIndentedString(patternWithDigitsAndDelimiter)).append("\n");
sb.append("}");
return sb.toString();
}

View File

@@ -0,0 +1,117 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.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 io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.openapitools.jackson.nullable.JsonNullable;
import java.util.NoSuchElementException;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model.
*/
@ApiModel(description = "Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model.")
@JsonPropertyOrder({
HealthCheckResult.JSON_PROPERTY_NULLABLE_MESSAGE
})
@JsonTypeName("HealthCheckResult")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class HealthCheckResult {
public static final String JSON_PROPERTY_NULLABLE_MESSAGE = "NullableMessage";
private JsonNullable<String> nullableMessage = JsonNullable.<String>undefined();
public HealthCheckResult nullableMessage(String nullableMessage) {
this.nullableMessage = JsonNullable.<String>of(nullableMessage);
return this;
}
/**
* Get nullableMessage
* @return nullableMessage
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonIgnore
public String getNullableMessage() {
return nullableMessage.orElse(null);
}
@JsonProperty(JSON_PROPERTY_NULLABLE_MESSAGE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<String> getNullableMessage_JsonNullable() {
return nullableMessage;
}
@JsonProperty(JSON_PROPERTY_NULLABLE_MESSAGE)
public void setNullableMessage_JsonNullable(JsonNullable<String> nullableMessage) {
this.nullableMessage = nullableMessage;
}
public void setNullableMessage(String nullableMessage) {
this.nullableMessage = JsonNullable.<String>of(nullableMessage);
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
HealthCheckResult healthCheckResult = (HealthCheckResult) o;
return Objects.equals(this.nullableMessage, healthCheckResult.nullableMessage);
}
@Override
public int hashCode() {
return Objects.hash(nullableMessage);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class HealthCheckResult {\n");
sb.append(" nullableMessage: ").append(toIndentedString(nullableMessage)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,106 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.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 io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.openapitools.client.model.Foo;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* InlineResponseDefault
*/
@JsonPropertyOrder({
InlineResponseDefault.JSON_PROPERTY_STRING
})
@JsonTypeName("inline_response_default")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class InlineResponseDefault {
public static final String JSON_PROPERTY_STRING = "string";
private Foo string;
public InlineResponseDefault string(Foo string) {
this.string = string;
return this;
}
/**
* Get string
* @return string
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_STRING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Foo getString() {
return string;
}
@JsonProperty(JSON_PROPERTY_STRING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setString(Foo string) {
this.string = string;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
InlineResponseDefault inlineResponseDefault = (InlineResponseDefault) o;
return Objects.equals(this.string, inlineResponseDefault.string);
}
@Override
public int hashCode() {
return Objects.hash(string);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class InlineResponseDefault {\n");
sb.append(" string: ").append(toIndentedString(string)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -60,6 +60,7 @@ public class Name {
* Get name
* @return name
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "")
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.ALWAYS)

View File

@@ -0,0 +1,624 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.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 io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.openapitools.jackson.nullable.JsonNullable;
import java.util.NoSuchElementException;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* NullableClass
*/
@JsonPropertyOrder({
NullableClass.JSON_PROPERTY_INTEGER_PROP,
NullableClass.JSON_PROPERTY_NUMBER_PROP,
NullableClass.JSON_PROPERTY_BOOLEAN_PROP,
NullableClass.JSON_PROPERTY_STRING_PROP,
NullableClass.JSON_PROPERTY_DATE_PROP,
NullableClass.JSON_PROPERTY_DATETIME_PROP,
NullableClass.JSON_PROPERTY_ARRAY_NULLABLE_PROP,
NullableClass.JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP,
NullableClass.JSON_PROPERTY_ARRAY_ITEMS_NULLABLE,
NullableClass.JSON_PROPERTY_OBJECT_NULLABLE_PROP,
NullableClass.JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP,
NullableClass.JSON_PROPERTY_OBJECT_ITEMS_NULLABLE
})
@JsonTypeName("NullableClass")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class NullableClass extends HashMap<String, Object> {
public static final String JSON_PROPERTY_INTEGER_PROP = "integer_prop";
private JsonNullable<Integer> integerProp = JsonNullable.<Integer>undefined();
public static final String JSON_PROPERTY_NUMBER_PROP = "number_prop";
private JsonNullable<BigDecimal> numberProp = JsonNullable.<BigDecimal>undefined();
public static final String JSON_PROPERTY_BOOLEAN_PROP = "boolean_prop";
private JsonNullable<Boolean> booleanProp = JsonNullable.<Boolean>undefined();
public static final String JSON_PROPERTY_STRING_PROP = "string_prop";
private JsonNullable<String> stringProp = JsonNullable.<String>undefined();
public static final String JSON_PROPERTY_DATE_PROP = "date_prop";
private JsonNullable<LocalDate> dateProp = JsonNullable.<LocalDate>undefined();
public static final String JSON_PROPERTY_DATETIME_PROP = "datetime_prop";
private JsonNullable<OffsetDateTime> datetimeProp = JsonNullable.<OffsetDateTime>undefined();
public static final String JSON_PROPERTY_ARRAY_NULLABLE_PROP = "array_nullable_prop";
private JsonNullable<List<Object>> arrayNullableProp = JsonNullable.<List<Object>>undefined();
public static final String JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP = "array_and_items_nullable_prop";
private JsonNullable<List<Object>> arrayAndItemsNullableProp = JsonNullable.<List<Object>>undefined();
public static final String JSON_PROPERTY_ARRAY_ITEMS_NULLABLE = "array_items_nullable";
private List<Object> arrayItemsNullable = null;
public static final String JSON_PROPERTY_OBJECT_NULLABLE_PROP = "object_nullable_prop";
private JsonNullable<Map<String, Object>> objectNullableProp = JsonNullable.<Map<String, Object>>undefined();
public static final String JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP = "object_and_items_nullable_prop";
private JsonNullable<Map<String, Object>> objectAndItemsNullableProp = JsonNullable.<Map<String, Object>>undefined();
public static final String JSON_PROPERTY_OBJECT_ITEMS_NULLABLE = "object_items_nullable";
private Map<String, Object> objectItemsNullable = null;
public NullableClass integerProp(Integer integerProp) {
this.integerProp = JsonNullable.<Integer>of(integerProp);
return this;
}
/**
* Get integerProp
* @return integerProp
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonIgnore
public Integer getIntegerProp() {
return integerProp.orElse(null);
}
@JsonProperty(JSON_PROPERTY_INTEGER_PROP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<Integer> getIntegerProp_JsonNullable() {
return integerProp;
}
@JsonProperty(JSON_PROPERTY_INTEGER_PROP)
public void setIntegerProp_JsonNullable(JsonNullable<Integer> integerProp) {
this.integerProp = integerProp;
}
public void setIntegerProp(Integer integerProp) {
this.integerProp = JsonNullable.<Integer>of(integerProp);
}
public NullableClass numberProp(BigDecimal numberProp) {
this.numberProp = JsonNullable.<BigDecimal>of(numberProp);
return this;
}
/**
* Get numberProp
* @return numberProp
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonIgnore
public BigDecimal getNumberProp() {
return numberProp.orElse(null);
}
@JsonProperty(JSON_PROPERTY_NUMBER_PROP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<BigDecimal> getNumberProp_JsonNullable() {
return numberProp;
}
@JsonProperty(JSON_PROPERTY_NUMBER_PROP)
public void setNumberProp_JsonNullable(JsonNullable<BigDecimal> numberProp) {
this.numberProp = numberProp;
}
public void setNumberProp(BigDecimal numberProp) {
this.numberProp = JsonNullable.<BigDecimal>of(numberProp);
}
public NullableClass booleanProp(Boolean booleanProp) {
this.booleanProp = JsonNullable.<Boolean>of(booleanProp);
return this;
}
/**
* Get booleanProp
* @return booleanProp
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonIgnore
public Boolean getBooleanProp() {
return booleanProp.orElse(null);
}
@JsonProperty(JSON_PROPERTY_BOOLEAN_PROP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<Boolean> getBooleanProp_JsonNullable() {
return booleanProp;
}
@JsonProperty(JSON_PROPERTY_BOOLEAN_PROP)
public void setBooleanProp_JsonNullable(JsonNullable<Boolean> booleanProp) {
this.booleanProp = booleanProp;
}
public void setBooleanProp(Boolean booleanProp) {
this.booleanProp = JsonNullable.<Boolean>of(booleanProp);
}
public NullableClass stringProp(String stringProp) {
this.stringProp = JsonNullable.<String>of(stringProp);
return this;
}
/**
* Get stringProp
* @return stringProp
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonIgnore
public String getStringProp() {
return stringProp.orElse(null);
}
@JsonProperty(JSON_PROPERTY_STRING_PROP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<String> getStringProp_JsonNullable() {
return stringProp;
}
@JsonProperty(JSON_PROPERTY_STRING_PROP)
public void setStringProp_JsonNullable(JsonNullable<String> stringProp) {
this.stringProp = stringProp;
}
public void setStringProp(String stringProp) {
this.stringProp = JsonNullable.<String>of(stringProp);
}
public NullableClass dateProp(LocalDate dateProp) {
this.dateProp = JsonNullable.<LocalDate>of(dateProp);
return this;
}
/**
* Get dateProp
* @return dateProp
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonIgnore
public LocalDate getDateProp() {
return dateProp.orElse(null);
}
@JsonProperty(JSON_PROPERTY_DATE_PROP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<LocalDate> getDateProp_JsonNullable() {
return dateProp;
}
@JsonProperty(JSON_PROPERTY_DATE_PROP)
public void setDateProp_JsonNullable(JsonNullable<LocalDate> dateProp) {
this.dateProp = dateProp;
}
public void setDateProp(LocalDate dateProp) {
this.dateProp = JsonNullable.<LocalDate>of(dateProp);
}
public NullableClass datetimeProp(OffsetDateTime datetimeProp) {
this.datetimeProp = JsonNullable.<OffsetDateTime>of(datetimeProp);
return this;
}
/**
* Get datetimeProp
* @return datetimeProp
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonIgnore
public OffsetDateTime getDatetimeProp() {
return datetimeProp.orElse(null);
}
@JsonProperty(JSON_PROPERTY_DATETIME_PROP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<OffsetDateTime> getDatetimeProp_JsonNullable() {
return datetimeProp;
}
@JsonProperty(JSON_PROPERTY_DATETIME_PROP)
public void setDatetimeProp_JsonNullable(JsonNullable<OffsetDateTime> datetimeProp) {
this.datetimeProp = datetimeProp;
}
public void setDatetimeProp(OffsetDateTime datetimeProp) {
this.datetimeProp = JsonNullable.<OffsetDateTime>of(datetimeProp);
}
public NullableClass arrayNullableProp(List<Object> arrayNullableProp) {
this.arrayNullableProp = JsonNullable.<List<Object>>of(arrayNullableProp);
return this;
}
public NullableClass addArrayNullablePropItem(Object arrayNullablePropItem) {
if (this.arrayNullableProp == null || !this.arrayNullableProp.isPresent()) {
this.arrayNullableProp = JsonNullable.<List<Object>>of(new ArrayList<>());
}
try {
this.arrayNullableProp.get().add(arrayNullablePropItem);
} catch (java.util.NoSuchElementException e) {
// this can never happen, as we make sure above that the value is present
}
return this;
}
/**
* Get arrayNullableProp
* @return arrayNullableProp
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonIgnore
public List<Object> getArrayNullableProp() {
return arrayNullableProp.orElse(null);
}
@JsonProperty(JSON_PROPERTY_ARRAY_NULLABLE_PROP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<List<Object>> getArrayNullableProp_JsonNullable() {
return arrayNullableProp;
}
@JsonProperty(JSON_PROPERTY_ARRAY_NULLABLE_PROP)
public void setArrayNullableProp_JsonNullable(JsonNullable<List<Object>> arrayNullableProp) {
this.arrayNullableProp = arrayNullableProp;
}
public void setArrayNullableProp(List<Object> arrayNullableProp) {
this.arrayNullableProp = JsonNullable.<List<Object>>of(arrayNullableProp);
}
public NullableClass arrayAndItemsNullableProp(List<Object> arrayAndItemsNullableProp) {
this.arrayAndItemsNullableProp = JsonNullable.<List<Object>>of(arrayAndItemsNullableProp);
return this;
}
public NullableClass addArrayAndItemsNullablePropItem(Object arrayAndItemsNullablePropItem) {
if (this.arrayAndItemsNullableProp == null || !this.arrayAndItemsNullableProp.isPresent()) {
this.arrayAndItemsNullableProp = JsonNullable.<List<Object>>of(new ArrayList<>());
}
try {
this.arrayAndItemsNullableProp.get().add(arrayAndItemsNullablePropItem);
} catch (java.util.NoSuchElementException e) {
// this can never happen, as we make sure above that the value is present
}
return this;
}
/**
* Get arrayAndItemsNullableProp
* @return arrayAndItemsNullableProp
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonIgnore
public List<Object> getArrayAndItemsNullableProp() {
return arrayAndItemsNullableProp.orElse(null);
}
@JsonProperty(JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<List<Object>> getArrayAndItemsNullableProp_JsonNullable() {
return arrayAndItemsNullableProp;
}
@JsonProperty(JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP)
public void setArrayAndItemsNullableProp_JsonNullable(JsonNullable<List<Object>> arrayAndItemsNullableProp) {
this.arrayAndItemsNullableProp = arrayAndItemsNullableProp;
}
public void setArrayAndItemsNullableProp(List<Object> arrayAndItemsNullableProp) {
this.arrayAndItemsNullableProp = JsonNullable.<List<Object>>of(arrayAndItemsNullableProp);
}
public NullableClass arrayItemsNullable(List<Object> arrayItemsNullable) {
this.arrayItemsNullable = arrayItemsNullable;
return this;
}
public NullableClass addArrayItemsNullableItem(Object arrayItemsNullableItem) {
if (this.arrayItemsNullable == null) {
this.arrayItemsNullable = new ArrayList<>();
}
this.arrayItemsNullable.add(arrayItemsNullableItem);
return this;
}
/**
* Get arrayItemsNullable
* @return arrayItemsNullable
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ARRAY_ITEMS_NULLABLE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<Object> getArrayItemsNullable() {
return arrayItemsNullable;
}
@JsonProperty(JSON_PROPERTY_ARRAY_ITEMS_NULLABLE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setArrayItemsNullable(List<Object> arrayItemsNullable) {
this.arrayItemsNullable = arrayItemsNullable;
}
public NullableClass objectNullableProp(Map<String, Object> objectNullableProp) {
this.objectNullableProp = JsonNullable.<Map<String, Object>>of(objectNullableProp);
return this;
}
public NullableClass putObjectNullablePropItem(String key, Object objectNullablePropItem) {
if (this.objectNullableProp == null || !this.objectNullableProp.isPresent()) {
this.objectNullableProp = JsonNullable.<Map<String, Object>>of(new HashMap<>());
}
try {
this.objectNullableProp.get().put(key, objectNullablePropItem);
} catch (java.util.NoSuchElementException e) {
// this can never happen, as we make sure above that the value is present
}
return this;
}
/**
* Get objectNullableProp
* @return objectNullableProp
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonIgnore
public Map<String, Object> getObjectNullableProp() {
return objectNullableProp.orElse(null);
}
@JsonProperty(JSON_PROPERTY_OBJECT_NULLABLE_PROP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<Map<String, Object>> getObjectNullableProp_JsonNullable() {
return objectNullableProp;
}
@JsonProperty(JSON_PROPERTY_OBJECT_NULLABLE_PROP)
public void setObjectNullableProp_JsonNullable(JsonNullable<Map<String, Object>> objectNullableProp) {
this.objectNullableProp = objectNullableProp;
}
public void setObjectNullableProp(Map<String, Object> objectNullableProp) {
this.objectNullableProp = JsonNullable.<Map<String, Object>>of(objectNullableProp);
}
public NullableClass objectAndItemsNullableProp(Map<String, Object> objectAndItemsNullableProp) {
this.objectAndItemsNullableProp = JsonNullable.<Map<String, Object>>of(objectAndItemsNullableProp);
return this;
}
public NullableClass putObjectAndItemsNullablePropItem(String key, Object objectAndItemsNullablePropItem) {
if (this.objectAndItemsNullableProp == null || !this.objectAndItemsNullableProp.isPresent()) {
this.objectAndItemsNullableProp = JsonNullable.<Map<String, Object>>of(new HashMap<>());
}
try {
this.objectAndItemsNullableProp.get().put(key, objectAndItemsNullablePropItem);
} catch (java.util.NoSuchElementException e) {
// this can never happen, as we make sure above that the value is present
}
return this;
}
/**
* Get objectAndItemsNullableProp
* @return objectAndItemsNullableProp
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonIgnore
public Map<String, Object> getObjectAndItemsNullableProp() {
return objectAndItemsNullableProp.orElse(null);
}
@JsonProperty(JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP)
@JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<Map<String, Object>> getObjectAndItemsNullableProp_JsonNullable() {
return objectAndItemsNullableProp;
}
@JsonProperty(JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP)
public void setObjectAndItemsNullableProp_JsonNullable(JsonNullable<Map<String, Object>> objectAndItemsNullableProp) {
this.objectAndItemsNullableProp = objectAndItemsNullableProp;
}
public void setObjectAndItemsNullableProp(Map<String, Object> objectAndItemsNullableProp) {
this.objectAndItemsNullableProp = JsonNullable.<Map<String, Object>>of(objectAndItemsNullableProp);
}
public NullableClass objectItemsNullable(Map<String, Object> objectItemsNullable) {
this.objectItemsNullable = objectItemsNullable;
return this;
}
public NullableClass putObjectItemsNullableItem(String key, Object objectItemsNullableItem) {
if (this.objectItemsNullable == null) {
this.objectItemsNullable = new HashMap<>();
}
this.objectItemsNullable.put(key, objectItemsNullableItem);
return this;
}
/**
* Get objectItemsNullable
* @return objectItemsNullable
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_OBJECT_ITEMS_NULLABLE)
@JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, Object> getObjectItemsNullable() {
return objectItemsNullable;
}
@JsonProperty(JSON_PROPERTY_OBJECT_ITEMS_NULLABLE)
@JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS)
public void setObjectItemsNullable(Map<String, Object> objectItemsNullable) {
this.objectItemsNullable = objectItemsNullable;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
NullableClass nullableClass = (NullableClass) o;
return Objects.equals(this.integerProp, nullableClass.integerProp) &&
Objects.equals(this.numberProp, nullableClass.numberProp) &&
Objects.equals(this.booleanProp, nullableClass.booleanProp) &&
Objects.equals(this.stringProp, nullableClass.stringProp) &&
Objects.equals(this.dateProp, nullableClass.dateProp) &&
Objects.equals(this.datetimeProp, nullableClass.datetimeProp) &&
Objects.equals(this.arrayNullableProp, nullableClass.arrayNullableProp) &&
Objects.equals(this.arrayAndItemsNullableProp, nullableClass.arrayAndItemsNullableProp) &&
Objects.equals(this.arrayItemsNullable, nullableClass.arrayItemsNullable) &&
Objects.equals(this.objectNullableProp, nullableClass.objectNullableProp) &&
Objects.equals(this.objectAndItemsNullableProp, nullableClass.objectAndItemsNullableProp) &&
Objects.equals(this.objectItemsNullable, nullableClass.objectItemsNullable) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(integerProp, numberProp, booleanProp, stringProp, dateProp, datetimeProp, arrayNullableProp, arrayAndItemsNullableProp, arrayItemsNullable, objectNullableProp, objectAndItemsNullableProp, objectItemsNullable, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class NullableClass {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" integerProp: ").append(toIndentedString(integerProp)).append("\n");
sb.append(" numberProp: ").append(toIndentedString(numberProp)).append("\n");
sb.append(" booleanProp: ").append(toIndentedString(booleanProp)).append("\n");
sb.append(" stringProp: ").append(toIndentedString(stringProp)).append("\n");
sb.append(" dateProp: ").append(toIndentedString(dateProp)).append("\n");
sb.append(" datetimeProp: ").append(toIndentedString(datetimeProp)).append("\n");
sb.append(" arrayNullableProp: ").append(toIndentedString(arrayNullableProp)).append("\n");
sb.append(" arrayAndItemsNullableProp: ").append(toIndentedString(arrayAndItemsNullableProp)).append("\n");
sb.append(" arrayItemsNullable: ").append(toIndentedString(arrayItemsNullable)).append("\n");
sb.append(" objectNullableProp: ").append(toIndentedString(objectNullableProp)).append("\n");
sb.append(" objectAndItemsNullableProp: ").append(toIndentedString(objectAndItemsNullableProp)).append("\n");
sb.append(" objectItemsNullable: ").append(toIndentedString(objectItemsNullable)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,222 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.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 io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import org.openapitools.client.model.DeprecatedObject;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* ObjectWithDeprecatedFields
*/
@JsonPropertyOrder({
ObjectWithDeprecatedFields.JSON_PROPERTY_UUID,
ObjectWithDeprecatedFields.JSON_PROPERTY_ID,
ObjectWithDeprecatedFields.JSON_PROPERTY_DEPRECATED_REF,
ObjectWithDeprecatedFields.JSON_PROPERTY_BARS
})
@JsonTypeName("ObjectWithDeprecatedFields")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class ObjectWithDeprecatedFields {
public static final String JSON_PROPERTY_UUID = "uuid";
private String uuid;
public static final String JSON_PROPERTY_ID = "id";
private BigDecimal id;
public static final String JSON_PROPERTY_DEPRECATED_REF = "deprecatedRef";
private DeprecatedObject deprecatedRef;
public static final String JSON_PROPERTY_BARS = "bars";
private List<String> bars = null;
public ObjectWithDeprecatedFields uuid(String uuid) {
this.uuid = uuid;
return this;
}
/**
* Get uuid
* @return uuid
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_UUID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getUuid() {
return uuid;
}
@JsonProperty(JSON_PROPERTY_UUID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setUuid(String uuid) {
this.uuid = uuid;
}
public ObjectWithDeprecatedFields id(BigDecimal id) {
this.id = id;
return this;
}
/**
* Get id
* @return id
* @deprecated
**/
@Deprecated
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public BigDecimal getId() {
return id;
}
@JsonProperty(JSON_PROPERTY_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setId(BigDecimal id) {
this.id = id;
}
public ObjectWithDeprecatedFields deprecatedRef(DeprecatedObject deprecatedRef) {
this.deprecatedRef = deprecatedRef;
return this;
}
/**
* Get deprecatedRef
* @return deprecatedRef
* @deprecated
**/
@Deprecated
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_DEPRECATED_REF)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public DeprecatedObject getDeprecatedRef() {
return deprecatedRef;
}
@JsonProperty(JSON_PROPERTY_DEPRECATED_REF)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDeprecatedRef(DeprecatedObject deprecatedRef) {
this.deprecatedRef = deprecatedRef;
}
public ObjectWithDeprecatedFields bars(List<String> bars) {
this.bars = bars;
return this;
}
public ObjectWithDeprecatedFields addBarsItem(String barsItem) {
if (this.bars == null) {
this.bars = new ArrayList<>();
}
this.bars.add(barsItem);
return this;
}
/**
* Get bars
* @return bars
* @deprecated
**/
@Deprecated
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_BARS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<String> getBars() {
return bars;
}
@JsonProperty(JSON_PROPERTY_BARS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setBars(List<String> bars) {
this.bars = bars;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ObjectWithDeprecatedFields objectWithDeprecatedFields = (ObjectWithDeprecatedFields) o;
return Objects.equals(this.uuid, objectWithDeprecatedFields.uuid) &&
Objects.equals(this.id, objectWithDeprecatedFields.id) &&
Objects.equals(this.deprecatedRef, objectWithDeprecatedFields.deprecatedRef) &&
Objects.equals(this.bars, objectWithDeprecatedFields.bars);
}
@Override
public int hashCode() {
return Objects.hash(uuid, id, deprecatedRef, bars);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ObjectWithDeprecatedFields {\n");
sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" deprecatedRef: ").append(toIndentedString(deprecatedRef)).append("\n");
sb.append(" bars: ").append(toIndentedString(bars)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -54,7 +54,7 @@ public enum OuterEnum {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
return null;
}
}

View File

@@ -0,0 +1,60 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
/**
* Gets or Sets OuterEnumDefaultValue
*/
public enum OuterEnumDefaultValue {
PLACED("placed"),
APPROVED("approved"),
DELIVERED("delivered");
private String value;
OuterEnumDefaultValue(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static OuterEnumDefaultValue fromValue(String value) {
for (OuterEnumDefaultValue b : OuterEnumDefaultValue.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}

View File

@@ -0,0 +1,60 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
/**
* Gets or Sets OuterEnumInteger
*/
public enum OuterEnumInteger {
NUMBER_0(0),
NUMBER_1(1),
NUMBER_2(2);
private Integer value;
OuterEnumInteger(Integer value) {
this.value = value;
}
@JsonValue
public Integer getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static OuterEnumInteger fromValue(Integer value) {
for (OuterEnumInteger b : OuterEnumInteger.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}

View File

@@ -0,0 +1,60 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
/**
* Gets or Sets OuterEnumIntegerDefaultValue
*/
public enum OuterEnumIntegerDefaultValue {
NUMBER_0(0),
NUMBER_1(1),
NUMBER_2(2);
private Integer value;
OuterEnumIntegerDefaultValue(Integer value) {
this.value = value;
}
@JsonValue
public Integer getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static OuterEnumIntegerDefaultValue fromValue(Integer value) {
for (OuterEnumIntegerDefaultValue b : OuterEnumIntegerDefaultValue.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}

View File

@@ -0,0 +1,106 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.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 io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.openapitools.client.model.OuterEnumInteger;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* OuterObjectWithEnumProperty
*/
@JsonPropertyOrder({
OuterObjectWithEnumProperty.JSON_PROPERTY_VALUE
})
@JsonTypeName("OuterObjectWithEnumProperty")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class OuterObjectWithEnumProperty {
public static final String JSON_PROPERTY_VALUE = "value";
private OuterEnumInteger value;
public OuterObjectWithEnumProperty value(OuterEnumInteger value) {
this.value = value;
return this;
}
/**
* Get value
* @return value
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "")
@JsonProperty(JSON_PROPERTY_VALUE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public OuterEnumInteger getValue() {
return value;
}
@JsonProperty(JSON_PROPERTY_VALUE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setValue(OuterEnumInteger value) {
this.value = value;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
OuterObjectWithEnumProperty outerObjectWithEnumProperty = (OuterObjectWithEnumProperty) o;
return Objects.equals(this.value, outerObjectWithEnumProperty.value);
}
@Override
public int hashCode() {
return Objects.hash(value);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class OuterObjectWithEnumProperty {\n");
sb.append(" value: ").append(toIndentedString(value)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -164,6 +164,7 @@ public class Pet {
* Get name
* @return name
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "doggie", required = true, value = "")
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
@@ -195,6 +196,7 @@ public class Pet {
* Get photoUrls
* @return photoUrls
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "")
@JsonProperty(JSON_PROPERTY_PHOTO_URLS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)

View File

@@ -30,7 +30,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
@JsonPropertyOrder({
SpecialModelName.JSON_PROPERTY_$_SPECIAL_PROPERTY_NAME
})
@JsonTypeName("$special[model.name]")
@JsonTypeName("_special_model.name_")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class SpecialModelName {
public static final String JSON_PROPERTY_$_SPECIAL_PROPERTY_NAME = "$special[property.name]";
@@ -72,8 +72,8 @@ public class SpecialModelName {
if (o == null || getClass() != o.getClass()) {
return false;
}
SpecialModelName $specialModelName = (SpecialModelName) o;
return Objects.equals(this.$specialPropertyName, $specialModelName.$specialPropertyName);
SpecialModelName specialModelName = (SpecialModelName) o;
return Objects.equals(this.$specialPropertyName, specialModelName.$specialPropertyName);
}
@Override

View File

@@ -66,6 +66,7 @@ public class TypeHolderDefault {
* Get stringItem
* @return stringItem
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "")
@JsonProperty(JSON_PROPERTY_STRING_ITEM)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
@@ -92,6 +93,7 @@ public class TypeHolderDefault {
* Get numberItem
* @return numberItem
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "")
@JsonProperty(JSON_PROPERTY_NUMBER_ITEM)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
@@ -118,6 +120,7 @@ public class TypeHolderDefault {
* Get integerItem
* @return integerItem
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "")
@JsonProperty(JSON_PROPERTY_INTEGER_ITEM)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
@@ -144,6 +147,7 @@ public class TypeHolderDefault {
* Get boolItem
* @return boolItem
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "")
@JsonProperty(JSON_PROPERTY_BOOL_ITEM)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
@@ -175,6 +179,7 @@ public class TypeHolderDefault {
* Get arrayItem
* @return arrayItem
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "")
@JsonProperty(JSON_PROPERTY_ARRAY_ITEM)
@JsonInclude(value = JsonInclude.Include.ALWAYS)

View File

@@ -70,6 +70,7 @@ public class TypeHolderExample {
* Get stringItem
* @return stringItem
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "what", required = true, value = "")
@JsonProperty(JSON_PROPERTY_STRING_ITEM)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
@@ -96,6 +97,7 @@ public class TypeHolderExample {
* Get numberItem
* @return numberItem
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "1.234", required = true, value = "")
@JsonProperty(JSON_PROPERTY_NUMBER_ITEM)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
@@ -122,6 +124,7 @@ public class TypeHolderExample {
* Get floatItem
* @return floatItem
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "1.234", required = true, value = "")
@JsonProperty(JSON_PROPERTY_FLOAT_ITEM)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
@@ -148,6 +151,7 @@ public class TypeHolderExample {
* Get integerItem
* @return integerItem
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "-2", required = true, value = "")
@JsonProperty(JSON_PROPERTY_INTEGER_ITEM)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
@@ -174,6 +178,7 @@ public class TypeHolderExample {
* Get boolItem
* @return boolItem
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "true", required = true, value = "")
@JsonProperty(JSON_PROPERTY_BOOL_ITEM)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
@@ -205,6 +210,7 @@ public class TypeHolderExample {
* Get arrayItem
* @return arrayItem
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "")
@JsonProperty(JSON_PROPERTY_ARRAY_ITEM)
@JsonInclude(value = JsonInclude.Include.ALWAYS)

View File

@@ -0,0 +1,47 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.api;
import org.openapitools.client.model.InlineResponseDefault;
import org.junit.Test;
import org.junit.Ignore;
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
*/
@Ignore
public class DefaultApiTest {
private final DefaultApi api = new DefaultApi();
/**
*
*
*
*/
@Test
public void fooGetTest() {
InlineResponseDefault response = api.fooGet().block();
// TODO: test validations
}
}

View File

@@ -0,0 +1,50 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import com.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 io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
/**
* Model tests for DeprecatedObject
*/
public class DeprecatedObjectTest {
private final DeprecatedObject model = new DeprecatedObject();
/**
* Model tests for DeprecatedObject
*/
@Test
public void testDeprecatedObject() {
// TODO: test DeprecatedObject
}
/**
* Test the property 'name'
*/
@Test
public void nameTest() {
// TODO: test name
}
}

View File

@@ -0,0 +1,50 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import com.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 io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
/**
* Model tests for Foo
*/
public class FooTest {
private final Foo model = new Foo();
/**
* Model tests for Foo
*/
@Test
public void testFoo() {
// TODO: test Foo
}
/**
* Test the property 'bar'
*/
@Test
public void barTest() {
// TODO: test bar
}
}

View File

@@ -0,0 +1,53 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import com.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 io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.openapitools.jackson.nullable.JsonNullable;
import java.util.NoSuchElementException;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
/**
* Model tests for HealthCheckResult
*/
public class HealthCheckResultTest {
private final HealthCheckResult model = new HealthCheckResult();
/**
* Model tests for HealthCheckResult
*/
@Test
public void testHealthCheckResult() {
// TODO: test HealthCheckResult
}
/**
* Test the property 'nullableMessage'
*/
@Test
public void nullableMessageTest() {
// TODO: test nullableMessage
}
}

View File

@@ -0,0 +1,51 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import com.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 io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.openapitools.client.model.Foo;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
/**
* Model tests for InlineResponseDefault
*/
public class InlineResponseDefaultTest {
private final InlineResponseDefault model = new InlineResponseDefault();
/**
* Model tests for InlineResponseDefault
*/
@Test
public void testInlineResponseDefault() {
// TODO: test InlineResponseDefault
}
/**
* Test the property 'string'
*/
@Test
public void stringTest() {
// TODO: test string
}
}

View File

@@ -0,0 +1,148 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import com.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 io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.openapitools.jackson.nullable.JsonNullable;
import java.util.NoSuchElementException;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
/**
* Model tests for NullableClass
*/
public class NullableClassTest {
private final NullableClass model = new NullableClass();
/**
* Model tests for NullableClass
*/
@Test
public void testNullableClass() {
// TODO: test NullableClass
}
/**
* Test the property 'integerProp'
*/
@Test
public void integerPropTest() {
// TODO: test integerProp
}
/**
* Test the property 'numberProp'
*/
@Test
public void numberPropTest() {
// TODO: test numberProp
}
/**
* Test the property 'booleanProp'
*/
@Test
public void booleanPropTest() {
// TODO: test booleanProp
}
/**
* Test the property 'stringProp'
*/
@Test
public void stringPropTest() {
// TODO: test stringProp
}
/**
* Test the property 'dateProp'
*/
@Test
public void datePropTest() {
// TODO: test dateProp
}
/**
* Test the property 'datetimeProp'
*/
@Test
public void datetimePropTest() {
// TODO: test datetimeProp
}
/**
* Test the property 'arrayNullableProp'
*/
@Test
public void arrayNullablePropTest() {
// TODO: test arrayNullableProp
}
/**
* Test the property 'arrayAndItemsNullableProp'
*/
@Test
public void arrayAndItemsNullablePropTest() {
// TODO: test arrayAndItemsNullableProp
}
/**
* Test the property 'arrayItemsNullable'
*/
@Test
public void arrayItemsNullableTest() {
// TODO: test arrayItemsNullable
}
/**
* Test the property 'objectNullableProp'
*/
@Test
public void objectNullablePropTest() {
// TODO: test objectNullableProp
}
/**
* Test the property 'objectAndItemsNullableProp'
*/
@Test
public void objectAndItemsNullablePropTest() {
// TODO: test objectAndItemsNullableProp
}
/**
* Test the property 'objectItemsNullable'
*/
@Test
public void objectItemsNullableTest() {
// TODO: test objectItemsNullable
}
}

View File

@@ -0,0 +1,78 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import com.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 io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import org.openapitools.client.model.DeprecatedObject;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
/**
* Model tests for ObjectWithDeprecatedFields
*/
public class ObjectWithDeprecatedFieldsTest {
private final ObjectWithDeprecatedFields model = new ObjectWithDeprecatedFields();
/**
* Model tests for ObjectWithDeprecatedFields
*/
@Test
public void testObjectWithDeprecatedFields() {
// TODO: test ObjectWithDeprecatedFields
}
/**
* Test the property 'uuid'
*/
@Test
public void uuidTest() {
// TODO: test uuid
}
/**
* Test the property 'id'
*/
@Test
public void idTest() {
// TODO: test id
}
/**
* Test the property 'deprecatedRef'
*/
@Test
public void deprecatedRefTest() {
// TODO: test deprecatedRef
}
/**
* Test the property 'bars'
*/
@Test
public void barsTest() {
// TODO: test bars
}
}

View File

@@ -0,0 +1,33 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
/**
* Model tests for OuterEnumDefaultValue
*/
public class OuterEnumDefaultValueTest {
/**
* Model tests for OuterEnumDefaultValue
*/
@Test
public void testOuterEnumDefaultValue() {
// TODO: test OuterEnumDefaultValue
}
}

View File

@@ -0,0 +1,33 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
/**
* Model tests for OuterEnumIntegerDefaultValue
*/
public class OuterEnumIntegerDefaultValueTest {
/**
* Model tests for OuterEnumIntegerDefaultValue
*/
@Test
public void testOuterEnumIntegerDefaultValue() {
// TODO: test OuterEnumIntegerDefaultValue
}
}

View File

@@ -0,0 +1,33 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
/**
* Model tests for OuterEnumInteger
*/
public class OuterEnumIntegerTest {
/**
* Model tests for OuterEnumInteger
*/
@Test
public void testOuterEnumInteger() {
// TODO: test OuterEnumInteger
}
}

View File

@@ -0,0 +1,51 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import com.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 io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.openapitools.client.model.OuterEnumInteger;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
/**
* Model tests for OuterObjectWithEnumProperty
*/
public class OuterObjectWithEnumPropertyTest {
private final OuterObjectWithEnumProperty model = new OuterObjectWithEnumProperty();
/**
* Model tests for OuterObjectWithEnumProperty
*/
@Test
public void testOuterObjectWithEnumProperty() {
// TODO: test OuterObjectWithEnumProperty
}
/**
* Test the property 'value'
*/
@Test
public void valueTest() {
// TODO: test value
}
}