fix java binary mapping (#158)

This commit is contained in:
William Cheng 2018-04-20 14:20:13 +08:00 committed by Jérémie Bresson
parent 28a1255c0e
commit 03490e9230
27 changed files with 680 additions and 296 deletions

View File

@ -839,7 +839,7 @@ public class DefaultCodegen implements CodegenConfig {
typeMapping.put("object", "Object"); typeMapping.put("object", "Object");
typeMapping.put("integer", "Integer"); typeMapping.put("integer", "Integer");
typeMapping.put("ByteArray", "byte[]"); typeMapping.put("ByteArray", "byte[]");
typeMapping.put("binary", "byte[]"); typeMapping.put("binary", "File");
typeMapping.put("file", "File"); typeMapping.put("file", "File");
typeMapping.put("UUID", "UUID"); typeMapping.put("UUID", "UUID");
//typeMapping.put("BigDecimal", "BigDecimal"); //TODO need the mapping? //typeMapping.put("BigDecimal", "BigDecimal"); //TODO need the mapping?

View File

@ -81,8 +81,8 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
modelDocTemplateFiles.put("model_doc.mustache", ".md"); modelDocTemplateFiles.put("model_doc.mustache", ".md");
apiDocTemplateFiles.put("api_doc.mustache", ".md"); apiDocTemplateFiles.put("api_doc.mustache", ".md");
hideGenerationTimestamp = false; hideGenerationTimestamp = false;
setReservedWordsLowerCase( setReservedWordsLowerCase(
Arrays.asList( Arrays.asList(
// used as internal variables, can collide with parameter names // used as internal variables, can collide with parameter names
@ -801,19 +801,19 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
@Override @Override
public String getSchemaType(Schema p) { public String getSchemaType(Schema p) {
String swaggerType = super.getSchemaType(p); String openAPIType = super.getSchemaType(p);
swaggerType = getAlias(swaggerType); openAPIType = getAlias(openAPIType);
// don't apply renaming on types from the typeMapping // don't apply renaming on types from the typeMapping
if (typeMapping.containsKey(swaggerType)) { if (typeMapping.containsKey(openAPIType)) {
return typeMapping.get(swaggerType); return typeMapping.get(openAPIType);
} }
if (null == swaggerType) { if (null == openAPIType) {
LOGGER.error("No Type defined for Schema " + p); LOGGER.error("No Type defined for Schema " + p);
} }
return toModelName(swaggerType); return toModelName(openAPIType);
} }
@Override @Override

View File

@ -161,7 +161,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#parcela
return false; return false;
}{{#hasVars}} }{{#hasVars}}
{{classname}} {{classVarName}} = ({{classname}}) o; {{classname}} {{classVarName}} = ({{classname}}) o;
return {{#vars}}{{#isByteArray}}Arrays{{/isByteArray}}{{#isBinary}}Arrays{{/isBinary}}{{^isByteArray}}{{^isBinary}}Objects{{/isBinary}}{{/isByteArray}}.equals(this.{{name}}, {{classVarName}}.{{name}}){{#hasMore}} && return {{#vars}}{{#isByteArray}}Arrays{{/isByteArray}}{{^isByteArray}}Objects{{/isByteArray}}.equals(this.{{name}}, {{classVarName}}.{{name}}){{#hasMore}} &&
{{/hasMore}}{{/vars}}{{#parent}} && {{/hasMore}}{{/vars}}{{#parent}} &&
super.equals(o){{/parent}};{{/hasVars}}{{^hasVars}} super.equals(o){{/parent}};{{/hasVars}}{{^hasVars}}
return {{#parent}}super.equals(o){{/parent}}{{^parent}}true{{/parent}};{{/hasVars}} return {{#parent}}super.equals(o){{/parent}}{{^parent}}true{{/parent}};{{/hasVars}}
@ -169,7 +169,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#parcela
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hash({{#vars}}{{^isByteArray}}{{^isBinary}}{{name}}{{/isBinary}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{#isBinary}}Arrays.hashCode({{name}}){{/isBinary}}{{#hasMore}}, {{/hasMore}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}}); return Objects.hash({{#vars}}{{^isByteArray}}{{name}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{#hasMore}}, {{/hasMore}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}});
} }
{{/supportJava6}} {{/supportJava6}}

View File

@ -9,7 +9,7 @@ Method | HTTP request | Description
<a name="testSpecialTags"></a> <a name="testSpecialTags"></a>
# **testSpecialTags** # **testSpecialTags**
> Client testSpecialTags(body) > Client testSpecialTags(client)
To test special tags To test special tags
@ -23,9 +23,9 @@ To test special tags
AnotherFakeApi apiInstance = new AnotherFakeApi(); AnotherFakeApi apiInstance = new AnotherFakeApi();
Client body = new Client(); // Client | client model Client client = new Client(); // Client | client model
try { try {
Client result = apiInstance.testSpecialTags(body); Client result = apiInstance.testSpecialTags(client);
System.out.println(result); System.out.println(result);
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling AnotherFakeApi#testSpecialTags"); System.err.println("Exception when calling AnotherFakeApi#testSpecialTags");
@ -37,7 +37,7 @@ try {
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**body** | [**Client**](Client.md)| client model | **client** | [**Client**](Client.md)| client model |
### Return type ### Return type

View File

@ -5,6 +5,7 @@
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional] **enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional]
**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | |
**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] **enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional]
**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] **enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional]
**outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional] **outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional]
@ -19,6 +20,15 @@ LOWER | &quot;lower&quot;
EMPTY | &quot;&quot; EMPTY | &quot;&quot;
<a name="EnumStringRequiredEnum"></a>
## Enum: EnumStringRequiredEnum
Name | Value
---- | -----
UPPER | &quot;UPPER&quot;
LOWER | &quot;lower&quot;
EMPTY | &quot;&quot;
<a name="EnumIntegerEnum"></a> <a name="EnumIntegerEnum"></a>
## Enum: EnumIntegerEnum ## Enum: EnumIntegerEnum
Name | Value Name | Value

View File

@ -8,6 +8,7 @@ Method | HTTP request | Description
[**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | [**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite |
[**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | [**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number |
[**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | [**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string |
[**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params |
[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \&quot;client\&quot; model [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \&quot;client\&quot; 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 [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
@ -17,7 +18,7 @@ Method | HTTP request | Description
<a name="fakeOuterBooleanSerialize"></a> <a name="fakeOuterBooleanSerialize"></a>
# **fakeOuterBooleanSerialize** # **fakeOuterBooleanSerialize**
> Boolean fakeOuterBooleanSerialize(body) > Boolean fakeOuterBooleanSerialize(booleanPostBody)
@ -31,9 +32,9 @@ Test serialization of outer boolean types
FakeApi apiInstance = new FakeApi(); FakeApi apiInstance = new FakeApi();
Boolean body = true; // Boolean | Input boolean as post body Boolean booleanPostBody = true; // Boolean | Input boolean as post body
try { try {
Boolean result = apiInstance.fakeOuterBooleanSerialize(body); Boolean result = apiInstance.fakeOuterBooleanSerialize(booleanPostBody);
System.out.println(result); System.out.println(result);
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize"); System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize");
@ -45,7 +46,7 @@ try {
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**body** | [**Boolean**](Boolean.md)| Input boolean as post body | [optional] **booleanPostBody** | **Boolean**| Input boolean as post body | [optional]
### Return type ### Return type
@ -58,11 +59,11 @@ No authorization required
### HTTP request headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: Not defined - **Accept**: */*
<a name="fakeOuterCompositeSerialize"></a> <a name="fakeOuterCompositeSerialize"></a>
# **fakeOuterCompositeSerialize** # **fakeOuterCompositeSerialize**
> OuterComposite fakeOuterCompositeSerialize(body) > OuterComposite fakeOuterCompositeSerialize(outerComposite)
@ -76,9 +77,9 @@ Test serialization of object with outer number type
FakeApi apiInstance = new FakeApi(); FakeApi apiInstance = new FakeApi();
OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body OuterComposite outerComposite = new OuterComposite(); // OuterComposite | Input composite as post body
try { try {
OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body); OuterComposite result = apiInstance.fakeOuterCompositeSerialize(outerComposite);
System.out.println(result); System.out.println(result);
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize"); System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize");
@ -90,7 +91,7 @@ try {
Name | Type | Description | Notes 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 ### Return type
@ -103,7 +104,7 @@ No authorization required
### HTTP request headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: Not defined - **Accept**: */*
<a name="fakeOuterNumberSerialize"></a> <a name="fakeOuterNumberSerialize"></a>
# **fakeOuterNumberSerialize** # **fakeOuterNumberSerialize**
@ -135,7 +136,7 @@ try {
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**body** | [**BigDecimal**](BigDecimal.md)| Input number as post body | [optional] **body** | **BigDecimal**| Input number as post body | [optional]
### Return type ### Return type
@ -148,7 +149,7 @@ No authorization required
### HTTP request headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: Not defined - **Accept**: */*
<a name="fakeOuterStringSerialize"></a> <a name="fakeOuterStringSerialize"></a>
# **fakeOuterStringSerialize** # **fakeOuterStringSerialize**
@ -180,7 +181,7 @@ try {
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**body** | [**String**](String.md)| Input string as post body | [optional] **body** | **String**| Input string as post body | [optional]
### Return type ### Return type
@ -193,11 +194,55 @@ No authorization required
### HTTP request headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: */*
<a name="testBodyWithQueryParams"></a>
# **testBodyWithQueryParams**
> testBodyWithQueryParams(query, user)
### Example
```java
// Import classes:
//import io.swagger.client.ApiException;
//import io.swagger.client.api.FakeApi;
FakeApi apiInstance = new FakeApi();
String query = "query_example"; // String |
User user = new User(); // User |
try {
apiInstance.testBodyWithQueryParams(query, user);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#testBodyWithQueryParams");
e.printStackTrace();
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**query** | **String**| |
**user** | [**User**](User.md)| |
### Return type
null (empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: Not defined - **Accept**: Not defined
<a name="testClientModel"></a> <a name="testClientModel"></a>
# **testClientModel** # **testClientModel**
> Client testClientModel(body) > Client testClientModel(client)
To test \&quot;client\&quot; model To test \&quot;client\&quot; model
@ -211,9 +256,9 @@ To test \&quot;client\&quot; model
FakeApi apiInstance = new FakeApi(); FakeApi apiInstance = new FakeApi();
Client body = new Client(); // Client | client model Client client = new Client(); // Client | client model
try { try {
Client result = apiInstance.testClientModel(body); Client result = apiInstance.testClientModel(client);
System.out.println(result); System.out.println(result);
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling FakeApi#testClientModel"); System.err.println("Exception when calling FakeApi#testClientModel");
@ -225,7 +270,7 @@ try {
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**body** | [**Client**](Client.md)| client model | **client** | [**Client**](Client.md)| client model |
### Return type ### Return type
@ -268,13 +313,13 @@ FakeApi apiInstance = new FakeApi();
BigDecimal number = new BigDecimal(); // BigDecimal | None BigDecimal number = new BigDecimal(); // BigDecimal | None
Double _double = 3.4D; // Double | None Double _double = 3.4D; // Double | None
String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None
byte[] _byte = B; // byte[] | None byte[] _byte = null; // byte[] | None
Integer integer = 56; // Integer | None Integer integer = 56; // Integer | None
Integer int32 = 56; // Integer | None Integer int32 = 56; // Integer | None
Long int64 = 789L; // Long | None Long int64 = 56L; // Long | None
Float _float = 3.4F; // Float | None Float _float = 3.4F; // Float | None
String string = "string_example"; // String | None String string = "string_example"; // String | None
byte[] binary = B; // byte[] | None File binary = new File("/path/to/file"); // File | None
LocalDate date = new LocalDate(); // LocalDate | None LocalDate date = new LocalDate(); // LocalDate | None
OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None
String password = "password_example"; // String | None String password = "password_example"; // String | None
@ -295,12 +340,12 @@ Name | Type | Description | Notes
**_double** | **Double**| None | **_double** | **Double**| None |
**patternWithoutDelimiter** | **String**| None | **patternWithoutDelimiter** | **String**| None |
**_byte** | **byte[]**| None | **_byte** | **byte[]**| None |
**integer** | **Integer**| None | [optional] **integer** | **Integer**| None | [optional] [enum: ]
**int32** | **Integer**| None | [optional] **int32** | **Integer**| None | [optional] [enum: ]
**int64** | **Long**| None | [optional] **int64** | **Long**| None | [optional]
**_float** | **Float**| None | [optional] **_float** | **Float**| None | [optional]
**string** | **String**| None | [optional] **string** | **String**| None | [optional]
**binary** | **byte[]**| None | [optional] **binary** | **File**| None | [optional]
**date** | **LocalDate**| None | [optional] **date** | **LocalDate**| None | [optional]
**dateTime** | **OffsetDateTime**| None | [optional] **dateTime** | **OffsetDateTime**| None | [optional]
**password** | **String**| None | [optional] **password** | **String**| None | [optional]
@ -316,12 +361,12 @@ null (empty response body)
### HTTP request headers ### HTTP request headers
- **Content-Type**: application/xml; charset=utf-8, application/json; charset=utf-8 - **Content-Type**: application/x-www-form-urlencoded
- **Accept**: application/xml; charset=utf-8, application/json; charset=utf-8 - **Accept**: Not defined
<a name="testEnumParameters"></a> <a name="testEnumParameters"></a>
# **testEnumParameters** # **testEnumParameters**
> testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble) > testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString)
To test enum parameters To test enum parameters
@ -335,16 +380,16 @@ To test enum parameters
FakeApi apiInstance = new FakeApi(); FakeApi apiInstance = new FakeApi();
List<String> enumFormStringArray = Arrays.asList("enumFormStringArray_example"); // List<String> | Form parameter enum test (string array)
String enumFormString = "-efg"; // String | Form parameter enum test (string)
List<String> enumHeaderStringArray = Arrays.asList("enumHeaderStringArray_example"); // List<String> | Header parameter enum test (string array) List<String> enumHeaderStringArray = Arrays.asList("enumHeaderStringArray_example"); // List<String> | Header parameter enum test (string array)
String enumHeaderString = "-efg"; // String | Header parameter enum test (string) String enumHeaderString = "-efg"; // String | Header parameter enum test (string)
List<String> enumQueryStringArray = Arrays.asList("enumQueryStringArray_example"); // List<String> | Query parameter enum test (string array) List<String> enumQueryStringArray = Arrays.asList("enumQueryStringArray_example"); // List<String> | Query parameter enum test (string array)
String enumQueryString = "-efg"; // String | Query parameter enum test (string) String enumQueryString = "-efg"; // String | Query parameter enum test (string)
Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double)
Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double)
List<String> enumFormStringArray = new List(); // List<String> | Form parameter enum test (string array)
String enumFormString = "enumFormString_example"; // String | Form parameter enum test (string)
try { try {
apiInstance.testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble); apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling FakeApi#testEnumParameters"); System.err.println("Exception when calling FakeApi#testEnumParameters");
e.printStackTrace(); e.printStackTrace();
@ -355,14 +400,14 @@ try {
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**enumFormStringArray** | [**List&lt;String&gt;**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $]
**enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)]
**enumHeaderStringArray** | [**List&lt;String&gt;**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] **enumHeaderStringArray** | [**List&lt;String&gt;**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $]
**enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)]
**enumQueryStringArray** | [**List&lt;String&gt;**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] **enumQueryStringArray** | [**List&lt;String&gt;**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $]
**enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)]
**enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2]
**enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2]
**enumFormStringArray** | [**List&lt;String&gt;**](List.md)| Form parameter enum test (string array) | [optional] [enum: >, $]
**enumFormString** | **String**| Form parameter enum test (string) | [optional] [enum: _abc, -efg, (xyz)]
### Return type ### Return type
@ -374,17 +419,15 @@ No authorization required
### HTTP request headers ### HTTP request headers
- **Content-Type**: */* - **Content-Type**: application/x-www-form-urlencoded
- **Accept**: */* - **Accept**: Not defined
<a name="testInlineAdditionalProperties"></a> <a name="testInlineAdditionalProperties"></a>
# **testInlineAdditionalProperties** # **testInlineAdditionalProperties**
> testInlineAdditionalProperties(param) > testInlineAdditionalProperties(requestBody)
test inline additionalProperties test inline additionalProperties
### Example ### Example
```java ```java
// Import classes: // Import classes:
@ -393,9 +436,9 @@ test inline additionalProperties
FakeApi apiInstance = new FakeApi(); FakeApi apiInstance = new FakeApi();
Object param = null; // Object | request body String requestBody = new HashMap(); // String | request body
try { try {
apiInstance.testInlineAdditionalProperties(param); apiInstance.testInlineAdditionalProperties(requestBody);
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties");
e.printStackTrace(); e.printStackTrace();
@ -406,7 +449,7 @@ try {
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**param** | **Object**| request body | **requestBody** | [**String**](String.md)| request body |
### Return type ### Return type
@ -427,8 +470,6 @@ No authorization required
test json serialization of form data test json serialization of form data
### Example ### Example
```java ```java
// Import classes: // Import classes:
@ -464,6 +505,6 @@ No authorization required
### HTTP request headers ### HTTP request headers
- **Content-Type**: application/json - **Content-Type**: application/x-www-form-urlencoded
- **Accept**: Not defined - **Accept**: Not defined

View File

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

View File

@ -12,7 +12,7 @@ Name | Type | Description | Notes
**_double** | **Double** | | [optional] **_double** | **Double** | | [optional]
**string** | **String** | | [optional] **string** | **String** | | [optional]
**_byte** | **byte[]** | | **_byte** | **byte[]** | |
**binary** | **byte[]** | | [optional] **binary** | [**File**](File.md) | | [optional]
**date** | [**LocalDate**](LocalDate.md) | | **date** | [**LocalDate**](LocalDate.md) | |
**dateTime** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional] **dateTime** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional]
**uuid** | [**UUID**](UUID.md) | | [optional] **uuid** | [**UUID**](UUID.md) | | [optional]

View File

@ -0,0 +1,9 @@
# OuterBoolean
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------

View File

@ -0,0 +1,9 @@
# OuterNumber
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------

View File

@ -0,0 +1,9 @@
# OuterString
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------

View File

@ -16,12 +16,10 @@ Method | HTTP request | Description
<a name="addPet"></a> <a name="addPet"></a>
# **addPet** # **addPet**
> addPet(body) > addPet(pet)
Add a new pet to the store Add a new pet to the store
### Example ### Example
```java ```java
// Import classes: // Import classes:
@ -38,9 +36,9 @@ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
PetApi apiInstance = new PetApi(); PetApi apiInstance = new PetApi();
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 { try {
apiInstance.addPet(body); apiInstance.addPet(pet);
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling PetApi#addPet"); System.err.println("Exception when calling PetApi#addPet");
e.printStackTrace(); e.printStackTrace();
@ -51,7 +49,7 @@ try {
Name | Type | Description | Notes 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 ### Return type
@ -64,7 +62,7 @@ null (empty response body)
### HTTP request headers ### HTTP request headers
- **Content-Type**: application/json, application/xml - **Content-Type**: application/json, application/xml
- **Accept**: application/xml, application/json - **Accept**: Not defined
<a name="deletePet"></a> <a name="deletePet"></a>
# **deletePet** # **deletePet**
@ -72,8 +70,6 @@ null (empty response body)
Deletes a pet Deletes a pet
### Example ### Example
```java ```java
// Import classes: // Import classes:
@ -90,7 +86,7 @@ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
PetApi apiInstance = new PetApi(); PetApi apiInstance = new PetApi();
Long petId = 789L; // Long | Pet id to delete Long petId = 56L; // Long | Pet id to delete
String apiKey = "apiKey_example"; // String | String apiKey = "apiKey_example"; // String |
try { try {
apiInstance.deletePet(petId, apiKey); apiInstance.deletePet(petId, apiKey);
@ -118,7 +114,7 @@ null (empty response body)
### HTTP request headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: Not defined
<a name="findPetsByStatus"></a> <a name="findPetsByStatus"></a>
# **findPetsByStatus** # **findPetsByStatus**
@ -252,7 +248,7 @@ api_key.setApiKey("YOUR API KEY");
//api_key.setApiKeyPrefix("Token"); //api_key.setApiKeyPrefix("Token");
PetApi apiInstance = new PetApi(); PetApi apiInstance = new PetApi();
Long petId = 789L; // Long | ID of pet to return Long petId = 56L; // Long | ID of pet to return
try { try {
Pet result = apiInstance.getPetById(petId); Pet result = apiInstance.getPetById(petId);
System.out.println(result); System.out.println(result);
@ -283,12 +279,10 @@ Name | Type | Description | Notes
<a name="updatePet"></a> <a name="updatePet"></a>
# **updatePet** # **updatePet**
> updatePet(body) > updatePet(pet)
Update an existing pet Update an existing pet
### Example ### Example
```java ```java
// Import classes: // Import classes:
@ -305,9 +299,9 @@ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
PetApi apiInstance = new PetApi(); PetApi apiInstance = new PetApi();
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 { try {
apiInstance.updatePet(body); apiInstance.updatePet(pet);
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling PetApi#updatePet"); System.err.println("Exception when calling PetApi#updatePet");
e.printStackTrace(); e.printStackTrace();
@ -318,7 +312,7 @@ try {
Name | Type | Description | Notes 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 ### Return type
@ -331,7 +325,7 @@ null (empty response body)
### HTTP request headers ### HTTP request headers
- **Content-Type**: application/json, application/xml - **Content-Type**: application/json, application/xml
- **Accept**: application/xml, application/json - **Accept**: Not defined
<a name="updatePetWithForm"></a> <a name="updatePetWithForm"></a>
# **updatePetWithForm** # **updatePetWithForm**
@ -339,8 +333,6 @@ null (empty response body)
Updates a pet in the store with form data Updates a pet in the store with form data
### Example ### Example
```java ```java
// Import classes: // Import classes:
@ -357,7 +349,7 @@ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
PetApi apiInstance = new PetApi(); PetApi apiInstance = new PetApi();
Long petId = 789L; // Long | ID of pet that needs to be updated Long petId = 56L; // Long | ID of pet that needs to be updated
String name = "name_example"; // String | Updated name of the pet String name = "name_example"; // String | Updated name of the pet
String status = "status_example"; // String | Updated status of the pet String status = "status_example"; // String | Updated status of the pet
try { try {
@ -387,7 +379,7 @@ null (empty response body)
### HTTP request headers ### HTTP request headers
- **Content-Type**: application/x-www-form-urlencoded - **Content-Type**: application/x-www-form-urlencoded
- **Accept**: application/xml, application/json - **Accept**: Not defined
<a name="uploadFile"></a> <a name="uploadFile"></a>
# **uploadFile** # **uploadFile**
@ -395,8 +387,6 @@ null (empty response body)
uploads an image uploads an image
### Example ### Example
```java ```java
// Import classes: // Import classes:
@ -413,9 +403,9 @@ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
PetApi apiInstance = new PetApi(); PetApi apiInstance = new PetApi();
Long petId = 789L; // Long | ID of pet to update Long petId = 56L; // Long | ID of pet to update
String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server
File file = new File("/path/to/file.txt"); // File | file to upload File file = new File("/path/to/file"); // File | file to upload
try { try {
ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file);
System.out.println(result); System.out.println(result);

View File

@ -52,7 +52,7 @@ No authorization required
### HTTP request headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: Not defined
<a name="getInventory"></a> <a name="getInventory"></a>
# **getInventory** # **getInventory**
@ -121,7 +121,7 @@ For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other val
StoreApi apiInstance = new StoreApi(); StoreApi apiInstance = new StoreApi();
Long orderId = 789L; // Long | ID of pet that needs to be fetched Long orderId = 56L; // Long | ID of pet that needs to be fetched
try { try {
Order result = apiInstance.getOrderById(orderId); Order result = apiInstance.getOrderById(orderId);
System.out.println(result); System.out.println(result);
@ -135,7 +135,7 @@ try {
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**orderId** | **Long**| ID of pet that needs to be fetched | **orderId** | **Long**| ID of pet that needs to be fetched | [enum: ]
### Return type ### Return type
@ -152,12 +152,10 @@ No authorization required
<a name="placeOrder"></a> <a name="placeOrder"></a>
# **placeOrder** # **placeOrder**
> Order placeOrder(body) > Order placeOrder(order)
Place an order for a pet Place an order for a pet
### Example ### Example
```java ```java
// Import classes: // Import classes:
@ -166,9 +164,9 @@ Place an order for a pet
StoreApi apiInstance = new StoreApi(); StoreApi apiInstance = new StoreApi();
Order body = new Order(); // Order | order placed for purchasing the pet Order order = new Order(); // Order | order placed for purchasing the pet
try { try {
Order result = apiInstance.placeOrder(body); Order result = apiInstance.placeOrder(order);
System.out.println(result); System.out.println(result);
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling StoreApi#placeOrder"); System.err.println("Exception when calling StoreApi#placeOrder");
@ -180,7 +178,7 @@ try {
Name | Type | Description | Notes 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 ### Return type

View File

@ -16,7 +16,7 @@ Method | HTTP request | Description
<a name="createUser"></a> <a name="createUser"></a>
# **createUser** # **createUser**
> createUser(body) > createUser(user)
Create user Create user
@ -30,9 +30,9 @@ This can only be done by the logged in user.
UserApi apiInstance = new UserApi(); UserApi apiInstance = new UserApi();
User body = new User(); // User | Created user object User user = new User(); // User | Created user object
try { try {
apiInstance.createUser(body); apiInstance.createUser(user);
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling UserApi#createUser"); System.err.println("Exception when calling UserApi#createUser");
e.printStackTrace(); e.printStackTrace();
@ -43,7 +43,7 @@ try {
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**body** | [**User**](User.md)| Created user object | **user** | [**User**](User.md)| Created user object |
### Return type ### Return type
@ -56,16 +56,14 @@ No authorization required
### HTTP request headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: Not defined
<a name="createUsersWithArrayInput"></a> <a name="createUsersWithArrayInput"></a>
# **createUsersWithArrayInput** # **createUsersWithArrayInput**
> createUsersWithArrayInput(body) > createUsersWithArrayInput(user)
Creates list of users with given input array Creates list of users with given input array
### Example ### Example
```java ```java
// Import classes: // Import classes:
@ -74,9 +72,9 @@ Creates list of users with given input array
UserApi apiInstance = new UserApi(); UserApi apiInstance = new UserApi();
List<User> body = Arrays.asList(new User()); // List<User> | List of user object List<User> user = Arrays.asList(new List()); // List<User> | List of user object
try { try {
apiInstance.createUsersWithArrayInput(body); apiInstance.createUsersWithArrayInput(user);
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); System.err.println("Exception when calling UserApi#createUsersWithArrayInput");
e.printStackTrace(); e.printStackTrace();
@ -87,7 +85,7 @@ try {
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**body** | [**List&lt;User&gt;**](User.md)| List of user object | **user** | [**List&lt;User&gt;**](List.md)| List of user object |
### Return type ### Return type
@ -100,16 +98,14 @@ No authorization required
### HTTP request headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: Not defined
<a name="createUsersWithListInput"></a> <a name="createUsersWithListInput"></a>
# **createUsersWithListInput** # **createUsersWithListInput**
> createUsersWithListInput(body) > createUsersWithListInput(user)
Creates list of users with given input array Creates list of users with given input array
### Example ### Example
```java ```java
// Import classes: // Import classes:
@ -118,9 +114,9 @@ Creates list of users with given input array
UserApi apiInstance = new UserApi(); UserApi apiInstance = new UserApi();
List<User> body = Arrays.asList(new User()); // List<User> | List of user object List<User> user = Arrays.asList(new List()); // List<User> | List of user object
try { try {
apiInstance.createUsersWithListInput(body); apiInstance.createUsersWithListInput(user);
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling UserApi#createUsersWithListInput"); System.err.println("Exception when calling UserApi#createUsersWithListInput");
e.printStackTrace(); e.printStackTrace();
@ -131,7 +127,7 @@ try {
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**body** | [**List&lt;User&gt;**](User.md)| List of user object | **user** | [**List&lt;User&gt;**](List.md)| List of user object |
### Return type ### Return type
@ -144,7 +140,7 @@ No authorization required
### HTTP request headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: Not defined
<a name="deleteUser"></a> <a name="deleteUser"></a>
# **deleteUser** # **deleteUser**
@ -188,7 +184,7 @@ No authorization required
### HTTP request headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: Not defined
<a name="getUserByName"></a> <a name="getUserByName"></a>
# **getUserByName** # **getUserByName**
@ -196,8 +192,6 @@ No authorization required
Get user by user name Get user by user name
### Example ### Example
```java ```java
// Import classes: // Import classes:
@ -241,8 +235,6 @@ No authorization required
Logs user into the system Logs user into the system
### Example ### Example
```java ```java
// Import classes: // Import classes:
@ -288,8 +280,6 @@ No authorization required
Logs out current logged in user session Logs out current logged in user session
### Example ### Example
```java ```java
// Import classes: // Import classes:
@ -320,11 +310,11 @@ No authorization required
### HTTP request headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: Not defined
<a name="updateUser"></a> <a name="updateUser"></a>
# **updateUser** # **updateUser**
> updateUser(username, body) > updateUser(username, user)
Updated user Updated user
@ -339,9 +329,9 @@ This can only be done by the logged in user.
UserApi apiInstance = new UserApi(); UserApi apiInstance = new UserApi();
String username = "username_example"; // String | name that need to be deleted 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 { try {
apiInstance.updateUser(username, body); apiInstance.updateUser(username, user);
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling UserApi#updateUser"); System.err.println("Exception when calling UserApi#updateUser");
e.printStackTrace(); e.printStackTrace();
@ -353,7 +343,7 @@ try {
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**username** | **String**| name that need to be deleted | **username** | **String**| name that need to be deleted |
**body** | [**User**](User.md)| Updated user object | **user** | [**User**](User.md)| Updated user object |
### Return type ### Return type
@ -366,5 +356,5 @@ No authorization required
### HTTP request headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: Not defined

View File

@ -139,8 +139,7 @@
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version> <version>3.6.1</version>
<configuration> <configuration>
<source> <source>1.8</source>
1.8</source>
<target>1.8</target> <target>1.8</target>
</configuration> </configuration>
</plugin> </plugin>

View File

@ -38,27 +38,27 @@ public class AnotherFakeApi {
/** /**
* To test special tags * To test special tags
* To test special tags * To test special tags
* @param body client model (required) * @param client client model (required)
* @return Client * @return Client
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public Client testSpecialTags(Client body) throws ApiException { public Client testSpecialTags(Client client) throws ApiException {
return testSpecialTagsWithHttpInfo(body).getData(); return testSpecialTagsWithHttpInfo(client).getData();
} }
/** /**
* To test special tags * To test special tags
* To test special tags * To test special tags
* @param body client model (required) * @param client client model (required)
* @return ApiResponse&lt;Client&gt; * @return ApiResponse&lt;Client&gt;
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public ApiResponse<Client> testSpecialTagsWithHttpInfo(Client body) throws ApiException { public ApiResponse<Client> testSpecialTagsWithHttpInfo(Client client) throws ApiException {
Object localVarPostBody = body; Object localVarPostBody = client;
// verify the required parameter 'body' is set // verify the required parameter 'client' is set
if (body == null) { if (client == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling testSpecialTags"); throw new ApiException(400, "Missing the required parameter 'client' when calling testSpecialTags");
} }
// create path and map variables // create path and map variables

View File

@ -10,9 +10,11 @@ import javax.ws.rs.core.GenericType;
import java.math.BigDecimal; import java.math.BigDecimal;
import io.swagger.client.model.Client; import io.swagger.client.model.Client;
import java.io.File;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.OffsetDateTime; import java.time.OffsetDateTime;
import io.swagger.client.model.OuterComposite; import io.swagger.client.model.OuterComposite;
import io.swagger.client.model.User;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
@ -42,23 +44,23 @@ public class FakeApi {
/** /**
* *
* Test serialization of outer boolean types * Test serialization of outer boolean types
* @param body Input boolean as post body (optional) * @param booleanPostBody Input boolean as post body (optional)
* @return Boolean * @return Boolean
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public Boolean fakeOuterBooleanSerialize(Boolean body) throws ApiException { public Boolean fakeOuterBooleanSerialize(Boolean booleanPostBody) throws ApiException {
return fakeOuterBooleanSerializeWithHttpInfo(body).getData(); return fakeOuterBooleanSerializeWithHttpInfo(booleanPostBody).getData();
} }
/** /**
* *
* Test serialization of outer boolean types * Test serialization of outer boolean types
* @param body Input boolean as post body (optional) * @param booleanPostBody Input boolean as post body (optional)
* @return ApiResponse&lt;Boolean&gt; * @return ApiResponse&lt;Boolean&gt;
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public ApiResponse<Boolean> fakeOuterBooleanSerializeWithHttpInfo(Boolean body) throws ApiException { public ApiResponse<Boolean> fakeOuterBooleanSerializeWithHttpInfo(Boolean booleanPostBody) throws ApiException {
Object localVarPostBody = body; Object localVarPostBody = booleanPostBody;
// create path and map variables // create path and map variables
String localVarPath = "/fake/outer/boolean"; String localVarPath = "/fake/outer/boolean";
@ -72,7 +74,7 @@ public class FakeApi {
final String[] localVarAccepts = { final String[] localVarAccepts = {
"*/*"
}; };
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@ -89,23 +91,23 @@ public class FakeApi {
/** /**
* *
* Test serialization of object with outer number type * Test serialization of object with outer number type
* @param body Input composite as post body (optional) * @param outerComposite Input composite as post body (optional)
* @return OuterComposite * @return OuterComposite
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public OuterComposite fakeOuterCompositeSerialize(OuterComposite body) throws ApiException { public OuterComposite fakeOuterCompositeSerialize(OuterComposite outerComposite) throws ApiException {
return fakeOuterCompositeSerializeWithHttpInfo(body).getData(); return fakeOuterCompositeSerializeWithHttpInfo(outerComposite).getData();
} }
/** /**
* *
* Test serialization of object with outer number type * Test serialization of object with outer number type
* @param body Input composite as post body (optional) * @param outerComposite Input composite as post body (optional)
* @return ApiResponse&lt;OuterComposite&gt; * @return ApiResponse&lt;OuterComposite&gt;
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public ApiResponse<OuterComposite> fakeOuterCompositeSerializeWithHttpInfo(OuterComposite body) throws ApiException { public ApiResponse<OuterComposite> fakeOuterCompositeSerializeWithHttpInfo(OuterComposite outerComposite) throws ApiException {
Object localVarPostBody = body; Object localVarPostBody = outerComposite;
// create path and map variables // create path and map variables
String localVarPath = "/fake/outer/composite"; String localVarPath = "/fake/outer/composite";
@ -119,7 +121,7 @@ public class FakeApi {
final String[] localVarAccepts = { final String[] localVarAccepts = {
"*/*"
}; };
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@ -166,7 +168,7 @@ public class FakeApi {
final String[] localVarAccepts = { final String[] localVarAccepts = {
"*/*"
}; };
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@ -213,7 +215,7 @@ public class FakeApi {
final String[] localVarAccepts = { final String[] localVarAccepts = {
"*/*"
}; };
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@ -227,30 +229,89 @@ public class FakeApi {
GenericType<String> localVarReturnType = new GenericType<String>() {}; GenericType<String> localVarReturnType = new GenericType<String>() {};
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
} }
/**
*
*
* @param query (required)
* @param user (required)
* @throws ApiException if fails to make API call
*/
public void testBodyWithQueryParams(String query, User user) throws ApiException {
testBodyWithQueryParamsWithHttpInfo(query, user);
}
/**
*
*
* @param query (required)
* @param user (required)
* @throws ApiException if fails to make API call
*/
public ApiResponse<Void> testBodyWithQueryParamsWithHttpInfo(String query, User user) throws ApiException {
Object localVarPostBody = user;
// verify the required parameter 'query' is set
if (query == null) {
throw new ApiException(400, "Missing the required parameter 'query' when calling testBodyWithQueryParams");
}
// verify the required parameter 'user' is set
if (user == null) {
throw new ApiException(400, "Missing the required parameter 'user' when calling testBodyWithQueryParams");
}
// create path and map variables
String localVarPath = "/fake/body-with-query-params";
// query params
List<Pair> localVarQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query));
final String[] localVarAccepts = {
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
}
/** /**
* To test \&quot;client\&quot; model * To test \&quot;client\&quot; model
* To test \&quot;client\&quot; model * To test \&quot;client\&quot; model
* @param body client model (required) * @param client client model (required)
* @return Client * @return Client
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public Client testClientModel(Client body) throws ApiException { public Client testClientModel(Client client) throws ApiException {
return testClientModelWithHttpInfo(body).getData(); return testClientModelWithHttpInfo(client).getData();
} }
/** /**
* To test \&quot;client\&quot; model * To test \&quot;client\&quot; model
* To test \&quot;client\&quot; model * To test \&quot;client\&quot; model
* @param body client model (required) * @param client client model (required)
* @return ApiResponse&lt;Client&gt; * @return ApiResponse&lt;Client&gt;
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public ApiResponse<Client> testClientModelWithHttpInfo(Client body) throws ApiException { public ApiResponse<Client> testClientModelWithHttpInfo(Client client) throws ApiException {
Object localVarPostBody = body; Object localVarPostBody = client;
// verify the required parameter 'body' is set // verify the required parameter 'client' is set
if (body == null) { if (client == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling testClientModel"); throw new ApiException(400, "Missing the required parameter 'client' when calling testClientModel");
} }
// create path and map variables // create path and map variables
@ -298,7 +359,7 @@ public class FakeApi {
* @param paramCallback None (optional) * @param paramCallback None (optional)
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, byte[] binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws ApiException { public void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws ApiException {
testEndpointParametersWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); testEndpointParametersWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback);
} }
@ -322,7 +383,7 @@ public class FakeApi {
* @param paramCallback None (optional) * @param paramCallback None (optional)
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public ApiResponse<Void> testEndpointParametersWithHttpInfo(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, byte[] binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws ApiException { public ApiResponse<Void> testEndpointParametersWithHttpInfo(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws ApiException {
Object localVarPostBody = null; Object localVarPostBody = null;
// verify the required parameter 'number' is set // verify the required parameter 'number' is set
@ -385,12 +446,12 @@ if (paramCallback != null)
localVarFormParams.put("callback", paramCallback); localVarFormParams.put("callback", paramCallback);
final String[] localVarAccepts = { final String[] localVarAccepts = {
"application/xml; charset=utf-8", "application/json; charset=utf-8"
}; };
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { final String[] localVarContentTypes = {
"application/xml; charset=utf-8", "application/json; charset=utf-8" "application/x-www-form-urlencoded"
}; };
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
@ -402,35 +463,35 @@ if (paramCallback != null)
/** /**
* To test enum parameters * To test enum parameters
* To test enum parameters * To test enum parameters
* @param enumFormStringArray Form parameter enum test (string array) (optional)
* @param enumFormString Form parameter enum test (string) (optional, default to -efg)
* @param enumHeaderStringArray Header parameter enum test (string array) (optional) * @param enumHeaderStringArray Header parameter enum test (string array) (optional)
* @param enumHeaderString Header parameter enum test (string) (optional, default to -efg) * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg)
* @param enumQueryStringArray Query parameter enum test (string array) (optional) * @param enumQueryStringArray Query parameter enum test (string array) (optional)
* @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryString Query parameter enum test (string) (optional, default to -efg)
* @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryInteger Query parameter enum test (double) (optional)
* @param enumQueryDouble Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional)
* @param enumFormStringArray Form parameter enum test (string array) (optional)
* @param enumFormString Form parameter enum test (string) (optional)
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public void testEnumParameters(List<String> enumFormStringArray, String enumFormString, List<String> enumHeaderStringArray, String enumHeaderString, List<String> enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble) throws ApiException { public void testEnumParameters(List<String> enumHeaderStringArray, String enumHeaderString, List<String> enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List<String> enumFormStringArray, String enumFormString) throws ApiException {
testEnumParametersWithHttpInfo(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble); testEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
} }
/** /**
* To test enum parameters * To test enum parameters
* To test enum parameters * To test enum parameters
* @param enumFormStringArray Form parameter enum test (string array) (optional)
* @param enumFormString Form parameter enum test (string) (optional, default to -efg)
* @param enumHeaderStringArray Header parameter enum test (string array) (optional) * @param enumHeaderStringArray Header parameter enum test (string array) (optional)
* @param enumHeaderString Header parameter enum test (string) (optional, default to -efg) * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg)
* @param enumQueryStringArray Query parameter enum test (string array) (optional) * @param enumQueryStringArray Query parameter enum test (string array) (optional)
* @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryString Query parameter enum test (string) (optional, default to -efg)
* @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryInteger Query parameter enum test (double) (optional)
* @param enumQueryDouble Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional)
* @param enumFormStringArray Form parameter enum test (string array) (optional)
* @param enumFormString Form parameter enum test (string) (optional)
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public ApiResponse<Void> testEnumParametersWithHttpInfo(List<String> enumFormStringArray, String enumFormString, List<String> enumHeaderStringArray, String enumHeaderString, List<String> enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble) throws ApiException { public ApiResponse<Void> testEnumParametersWithHttpInfo(List<String> enumHeaderStringArray, String enumHeaderString, List<String> enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List<String> enumFormStringArray, String enumFormString) throws ApiException {
Object localVarPostBody = null; Object localVarPostBody = null;
// create path and map variables // create path and map variables
@ -441,9 +502,10 @@ if (paramCallback != null)
Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "enum_query_string_array", enumQueryStringArray)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "enum_query_string_array", enumQueryStringArray));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "enum_query_string", enumQueryString)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "enum_query_string", enumQueryString));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "enum_query_integer", enumQueryInteger)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "enum_query_integer", enumQueryInteger));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "enum_query_double", enumQueryDouble));
if (enumHeaderStringArray != null) if (enumHeaderStringArray != null)
localVarHeaderParams.put("enum_header_string_array", apiClient.parameterToString(enumHeaderStringArray)); localVarHeaderParams.put("enum_header_string_array", apiClient.parameterToString(enumHeaderStringArray));
@ -454,16 +516,14 @@ if (enumHeaderString != null)
localVarFormParams.put("enum_form_string_array", enumFormStringArray); localVarFormParams.put("enum_form_string_array", enumFormStringArray);
if (enumFormString != null) if (enumFormString != null)
localVarFormParams.put("enum_form_string", enumFormString); localVarFormParams.put("enum_form_string", enumFormString);
if (enumQueryDouble != null)
localVarFormParams.put("enum_query_double", enumQueryDouble);
final String[] localVarAccepts = { final String[] localVarAccepts = {
"*/*"
}; };
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { final String[] localVarContentTypes = {
"*/*" "application/x-www-form-urlencoded"
}; };
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
@ -475,26 +535,26 @@ if (enumQueryDouble != null)
/** /**
* test inline additionalProperties * test inline additionalProperties
* *
* @param param request body (required) * @param requestBody request body (required)
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public void testInlineAdditionalProperties(Object param) throws ApiException { public void testInlineAdditionalProperties(String requestBody) throws ApiException {
testInlineAdditionalPropertiesWithHttpInfo(param); testInlineAdditionalPropertiesWithHttpInfo(requestBody);
} }
/** /**
* test inline additionalProperties * test inline additionalProperties
* *
* @param param request body (required) * @param requestBody request body (required)
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public ApiResponse<Void> testInlineAdditionalPropertiesWithHttpInfo(Object param) throws ApiException { public ApiResponse<Void> testInlineAdditionalPropertiesWithHttpInfo(String requestBody) throws ApiException {
Object localVarPostBody = param; Object localVarPostBody = requestBody;
// verify the required parameter 'param' is set // verify the required parameter 'requestBody' is set
if (param == null) { if (requestBody == null) {
throw new ApiException(400, "Missing the required parameter 'param' when calling testInlineAdditionalProperties"); throw new ApiException(400, "Missing the required parameter 'requestBody' when calling testInlineAdditionalProperties");
} }
// create path and map variables // create path and map variables
@ -576,7 +636,7 @@ if (param2 != null)
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { final String[] localVarContentTypes = {
"application/json" "application/x-www-form-urlencoded"
}; };
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

View File

@ -38,27 +38,27 @@ public class FakeClassnameTags123Api {
/** /**
* To test class name in snake case * To test class name in snake case
* To test class name in snake case * To test class name in snake case
* @param body client model (required) * @param client client model (required)
* @return Client * @return Client
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public Client testClassname(Client body) throws ApiException { public Client testClassname(Client client) throws ApiException {
return testClassnameWithHttpInfo(body).getData(); return testClassnameWithHttpInfo(client).getData();
} }
/** /**
* To test class name in snake case * To test class name in snake case
* To test class name in snake case * To test class name in snake case
* @param body client model (required) * @param client client model (required)
* @return ApiResponse&lt;Client&gt; * @return ApiResponse&lt;Client&gt;
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public ApiResponse<Client> testClassnameWithHttpInfo(Client body) throws ApiException { public ApiResponse<Client> testClassnameWithHttpInfo(Client client) throws ApiException {
Object localVarPostBody = body; Object localVarPostBody = client;
// verify the required parameter 'body' is set // verify the required parameter 'client' is set
if (body == null) { if (client == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling testClassname"); throw new ApiException(400, "Missing the required parameter 'client' when calling testClassname");
} }
// create path and map variables // create path and map variables

View File

@ -40,26 +40,26 @@ public class PetApi {
/** /**
* Add a new pet to the store * Add a new pet to the store
* *
* @param body Pet object that needs to be added to the store (required) * @param pet Pet object that needs to be added to the store (required)
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public void addPet(Pet body) throws ApiException { public void addPet(Pet pet) throws ApiException {
addPetWithHttpInfo(body); addPetWithHttpInfo(pet);
} }
/** /**
* Add a new pet to the store * Add a new pet to the store
* *
* @param body Pet object that needs to be added to the store (required) * @param pet Pet object that needs to be added to the store (required)
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public ApiResponse<Void> addPetWithHttpInfo(Pet body) throws ApiException { public ApiResponse<Void> addPetWithHttpInfo(Pet pet) throws ApiException {
Object localVarPostBody = body; Object localVarPostBody = pet;
// verify the required parameter 'body' is set // verify the required parameter 'pet' is set
if (body == null) { if (pet == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling addPet"); throw new ApiException(400, "Missing the required parameter 'pet' when calling addPet");
} }
// create path and map variables // create path and map variables
@ -74,7 +74,7 @@ public class PetApi {
final String[] localVarAccepts = { final String[] localVarAccepts = {
"application/xml", "application/json"
}; };
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@ -130,7 +130,7 @@ public class PetApi {
final String[] localVarAccepts = { final String[] localVarAccepts = {
"application/xml", "application/json"
}; };
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@ -178,7 +178,7 @@ public class PetApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "status", status)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "status", status));
@ -235,7 +235,7 @@ public class PetApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "tags", tags)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "tags", tags));
@ -310,26 +310,26 @@ public class PetApi {
/** /**
* Update an existing pet * Update an existing pet
* *
* @param body Pet object that needs to be added to the store (required) * @param pet Pet object that needs to be added to the store (required)
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public void updatePet(Pet body) throws ApiException { public void updatePet(Pet pet) throws ApiException {
updatePetWithHttpInfo(body); updatePetWithHttpInfo(pet);
} }
/** /**
* Update an existing pet * Update an existing pet
* *
* @param body Pet object that needs to be added to the store (required) * @param pet Pet object that needs to be added to the store (required)
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public ApiResponse<Void> updatePetWithHttpInfo(Pet body) throws ApiException { public ApiResponse<Void> updatePetWithHttpInfo(Pet pet) throws ApiException {
Object localVarPostBody = body; Object localVarPostBody = pet;
// verify the required parameter 'body' is set // verify the required parameter 'pet' is set
if (body == null) { if (pet == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling updatePet"); throw new ApiException(400, "Missing the required parameter 'pet' when calling updatePet");
} }
// create path and map variables // create path and map variables
@ -344,7 +344,7 @@ public class PetApi {
final String[] localVarAccepts = { final String[] localVarAccepts = {
"application/xml", "application/json"
}; };
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@ -404,7 +404,7 @@ if (status != null)
localVarFormParams.put("status", status); localVarFormParams.put("status", status);
final String[] localVarAccepts = { final String[] localVarAccepts = {
"application/xml", "application/json"
}; };
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

View File

@ -73,7 +73,7 @@ public class StoreApi {
final String[] localVarAccepts = { final String[] localVarAccepts = {
"application/xml", "application/json"
}; };
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@ -188,27 +188,27 @@ public class StoreApi {
/** /**
* Place an order for a pet * Place an order for a pet
* *
* @param body order placed for purchasing the pet (required) * @param order order placed for purchasing the pet (required)
* @return Order * @return Order
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public Order placeOrder(Order body) throws ApiException { public Order placeOrder(Order order) throws ApiException {
return placeOrderWithHttpInfo(body).getData(); return placeOrderWithHttpInfo(order).getData();
} }
/** /**
* Place an order for a pet * Place an order for a pet
* *
* @param body order placed for purchasing the pet (required) * @param order order placed for purchasing the pet (required)
* @return ApiResponse&lt;Order&gt; * @return ApiResponse&lt;Order&gt;
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public ApiResponse<Order> placeOrderWithHttpInfo(Order body) throws ApiException { public ApiResponse<Order> placeOrderWithHttpInfo(Order order) throws ApiException {
Object localVarPostBody = body; Object localVarPostBody = order;
// verify the required parameter 'body' is set // verify the required parameter 'order' is set
if (body == null) { if (order == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling placeOrder"); throw new ApiException(400, "Missing the required parameter 'order' when calling placeOrder");
} }
// create path and map variables // create path and map variables

View File

@ -38,26 +38,26 @@ public class UserApi {
/** /**
* Create user * Create user
* This can only be done by the logged in user. * This can only be done by the logged in user.
* @param body Created user object (required) * @param user Created user object (required)
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public void createUser(User body) throws ApiException { public void createUser(User user) throws ApiException {
createUserWithHttpInfo(body); createUserWithHttpInfo(user);
} }
/** /**
* Create user * Create user
* This can only be done by the logged in user. * This can only be done by the logged in user.
* @param body Created user object (required) * @param user Created user object (required)
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public ApiResponse<Void> createUserWithHttpInfo(User body) throws ApiException { public ApiResponse<Void> createUserWithHttpInfo(User user) throws ApiException {
Object localVarPostBody = body; Object localVarPostBody = user;
// verify the required parameter 'body' is set // verify the required parameter 'user' is set
if (body == null) { if (user == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling createUser"); throw new ApiException(400, "Missing the required parameter 'user' when calling createUser");
} }
// create path and map variables // create path and map variables
@ -72,7 +72,7 @@ public class UserApi {
final String[] localVarAccepts = { final String[] localVarAccepts = {
"application/xml", "application/json"
}; };
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@ -89,26 +89,26 @@ public class UserApi {
/** /**
* Creates list of users with given input array * Creates list of users with given input array
* *
* @param body List of user object (required) * @param user List of user object (required)
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public void createUsersWithArrayInput(List<User> body) throws ApiException { public void createUsersWithArrayInput(List<User> user) throws ApiException {
createUsersWithArrayInputWithHttpInfo(body); createUsersWithArrayInputWithHttpInfo(user);
} }
/** /**
* Creates list of users with given input array * Creates list of users with given input array
* *
* @param body List of user object (required) * @param user List of user object (required)
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public ApiResponse<Void> createUsersWithArrayInputWithHttpInfo(List<User> body) throws ApiException { public ApiResponse<Void> createUsersWithArrayInputWithHttpInfo(List<User> user) throws ApiException {
Object localVarPostBody = body; Object localVarPostBody = user;
// verify the required parameter 'body' is set // verify the required parameter 'user' is set
if (body == null) { if (user == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling createUsersWithArrayInput"); throw new ApiException(400, "Missing the required parameter 'user' when calling createUsersWithArrayInput");
} }
// create path and map variables // create path and map variables
@ -123,7 +123,7 @@ public class UserApi {
final String[] localVarAccepts = { final String[] localVarAccepts = {
"application/xml", "application/json"
}; };
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@ -140,26 +140,26 @@ public class UserApi {
/** /**
* Creates list of users with given input array * Creates list of users with given input array
* *
* @param body List of user object (required) * @param user List of user object (required)
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public void createUsersWithListInput(List<User> body) throws ApiException { public void createUsersWithListInput(List<User> user) throws ApiException {
createUsersWithListInputWithHttpInfo(body); createUsersWithListInputWithHttpInfo(user);
} }
/** /**
* Creates list of users with given input array * Creates list of users with given input array
* *
* @param body List of user object (required) * @param user List of user object (required)
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public ApiResponse<Void> createUsersWithListInputWithHttpInfo(List<User> body) throws ApiException { public ApiResponse<Void> createUsersWithListInputWithHttpInfo(List<User> user) throws ApiException {
Object localVarPostBody = body; Object localVarPostBody = user;
// verify the required parameter 'body' is set // verify the required parameter 'user' is set
if (body == null) { if (user == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling createUsersWithListInput"); throw new ApiException(400, "Missing the required parameter 'user' when calling createUsersWithListInput");
} }
// create path and map variables // create path and map variables
@ -174,7 +174,7 @@ public class UserApi {
final String[] localVarAccepts = { final String[] localVarAccepts = {
"application/xml", "application/json"
}; };
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@ -226,7 +226,7 @@ public class UserApi {
final String[] localVarAccepts = { final String[] localVarAccepts = {
"application/xml", "application/json"
}; };
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@ -384,7 +384,7 @@ public class UserApi {
final String[] localVarAccepts = { final String[] localVarAccepts = {
"application/xml", "application/json"
}; };
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@ -402,32 +402,32 @@ public class UserApi {
* Updated user * Updated user
* This can only be done by the logged in user. * This can only be done by the logged in user.
* @param username name that need to be deleted (required) * @param username name that need to be deleted (required)
* @param body Updated user object (required) * @param user Updated user object (required)
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public void updateUser(String username, User body) throws ApiException { public void updateUser(String username, User user) throws ApiException {
updateUserWithHttpInfo(username, body); updateUserWithHttpInfo(username, user);
} }
/** /**
* Updated user * Updated user
* This can only be done by the logged in user. * This can only be done by the logged in user.
* @param username name that need to be deleted (required) * @param username name that need to be deleted (required)
* @param body Updated user object (required) * @param user Updated user object (required)
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public ApiResponse<Void> updateUserWithHttpInfo(String username, User body) throws ApiException { public ApiResponse<Void> updateUserWithHttpInfo(String username, User user) throws ApiException {
Object localVarPostBody = body; Object localVarPostBody = user;
// verify the required parameter 'username' is set // verify the required parameter 'username' is set
if (username == null) { if (username == null) {
throw new ApiException(400, "Missing the required parameter 'username' when calling updateUser"); throw new ApiException(400, "Missing the required parameter 'username' when calling updateUser");
} }
// verify the required parameter 'body' is set // verify the required parameter 'user' is set
if (body == null) { if (user == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling updateUser"); throw new ApiException(400, "Missing the required parameter 'user' when calling updateUser");
} }
// create path and map variables // create path and map variables
@ -443,7 +443,7 @@ public class UserApi {
final String[] localVarAccepts = { final String[] localVarAccepts = {
"application/xml", "application/json"
}; };
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

View File

@ -67,6 +67,46 @@ public class EnumTest {
@JsonProperty("enum_string") @JsonProperty("enum_string")
private EnumStringEnum enumString = null; private EnumStringEnum enumString = null;
/**
* Gets or Sets enumStringRequired
*/
public enum EnumStringRequiredEnum {
UPPER("UPPER"),
LOWER("lower"),
EMPTY("");
private String value;
EnumStringRequiredEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static EnumStringRequiredEnum fromValue(String text) {
for (EnumStringRequiredEnum b : EnumStringRequiredEnum.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
return null;
}
}
@JsonProperty("enum_string_required")
private EnumStringRequiredEnum enumStringRequired = null;
/** /**
* Gets or Sets enumInteger * Gets or Sets enumInteger
*/ */
@ -164,6 +204,24 @@ public class EnumTest {
this.enumString = enumString; this.enumString = enumString;
} }
public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) {
this.enumStringRequired = enumStringRequired;
return this;
}
/**
* Get enumStringRequired
* @return enumStringRequired
**/
@ApiModelProperty(required = true, value = "")
public EnumStringRequiredEnum getEnumStringRequired() {
return enumStringRequired;
}
public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) {
this.enumStringRequired = enumStringRequired;
}
public EnumTest enumInteger(EnumIntegerEnum enumInteger) { public EnumTest enumInteger(EnumIntegerEnum enumInteger) {
this.enumInteger = enumInteger; this.enumInteger = enumInteger;
return this; return this;
@ -229,6 +287,7 @@ public class EnumTest {
} }
EnumTest enumTest = (EnumTest) o; EnumTest enumTest = (EnumTest) o;
return Objects.equals(this.enumString, enumTest.enumString) && return Objects.equals(this.enumString, enumTest.enumString) &&
Objects.equals(this.enumStringRequired, enumTest.enumStringRequired) &&
Objects.equals(this.enumInteger, enumTest.enumInteger) && Objects.equals(this.enumInteger, enumTest.enumInteger) &&
Objects.equals(this.enumNumber, enumTest.enumNumber) && Objects.equals(this.enumNumber, enumTest.enumNumber) &&
Objects.equals(this.outerEnum, enumTest.outerEnum); Objects.equals(this.outerEnum, enumTest.outerEnum);
@ -236,7 +295,7 @@ public class EnumTest {
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hash(enumString, enumInteger, enumNumber, outerEnum); return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, outerEnum);
} }
@ -246,6 +305,7 @@ public class EnumTest {
sb.append("class EnumTest {\n"); sb.append("class EnumTest {\n");
sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n");
sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n");
sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n");
sb.append(" enumNumber: ").append(toIndentedString(enumNumber)).append("\n"); sb.append(" enumNumber: ").append(toIndentedString(enumNumber)).append("\n");
sb.append(" outerEnum: ").append(toIndentedString(outerEnum)).append("\n"); sb.append(" outerEnum: ").append(toIndentedString(outerEnum)).append("\n");

View File

@ -20,6 +20,7 @@ import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import java.io.File;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.OffsetDateTime; import java.time.OffsetDateTime;
@ -55,7 +56,7 @@ public class FormatTest {
private byte[] _byte = null; private byte[] _byte = null;
@JsonProperty("binary") @JsonProperty("binary")
private byte[] binary = null; private File binary = null;
@JsonProperty("date") @JsonProperty("date")
private LocalDate date = null; private LocalDate date = null;
@ -223,7 +224,7 @@ public class FormatTest {
this._byte = _byte; this._byte = _byte;
} }
public FormatTest binary(byte[] binary) { public FormatTest binary(File binary) {
this.binary = binary; this.binary = binary;
return this; return this;
} }
@ -233,11 +234,11 @@ public class FormatTest {
* @return binary * @return binary
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public byte[] getBinary() { public File getBinary() {
return binary; return binary;
} }
public void setBinary(byte[] binary) { public void setBinary(File binary) {
this.binary = binary; this.binary = binary;
} }
@ -331,7 +332,7 @@ public class FormatTest {
Objects.equals(this._double, formatTest._double) && Objects.equals(this._double, formatTest._double) &&
Objects.equals(this.string, formatTest.string) && Objects.equals(this.string, formatTest.string) &&
Arrays.equals(this._byte, formatTest._byte) && Arrays.equals(this._byte, formatTest._byte) &&
Arrays.equals(this.binary, formatTest.binary) && Objects.equals(this.binary, formatTest.binary) &&
Objects.equals(this.date, formatTest.date) && Objects.equals(this.date, formatTest.date) &&
Objects.equals(this.dateTime, formatTest.dateTime) && Objects.equals(this.dateTime, formatTest.dateTime) &&
Objects.equals(this.uuid, formatTest.uuid) && Objects.equals(this.uuid, formatTest.uuid) &&
@ -340,7 +341,7 @@ public class FormatTest {
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hash(integer, int32, int64, number, _float, _double, string, Arrays.hashCode(_byte), Arrays.hashCode(binary), date, dateTime, uuid, password); return Objects.hash(integer, int32, int64, number, _float, _double, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password);
} }

View File

@ -0,0 +1,63 @@
/*
* Swagger 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: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package io.swagger.client.model;
import java.util.Objects;
import java.util.Arrays;
/**
* OuterBoolean
*/
public class OuterBoolean {
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
return true;
}
@Override
public int hashCode() {
return Objects.hash();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class OuterBoolean {\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(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,63 @@
/*
* Swagger 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: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package io.swagger.client.model;
import java.util.Objects;
import java.util.Arrays;
/**
* OuterNumber
*/
public class OuterNumber {
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
return true;
}
@Override
public int hashCode() {
return Objects.hash();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class OuterNumber {\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(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,63 @@
/*
* Swagger 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: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package io.swagger.client.model;
import java.util.Objects;
import java.util.Arrays;
/**
* OuterString
*/
public class OuterString {
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
return true;
}
@Override
public int hashCode() {
return Objects.hash();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class OuterString {\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(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -16,9 +16,11 @@ package io.swagger.client.api;
import io.swagger.client.ApiException; import io.swagger.client.ApiException;
import java.math.BigDecimal; import java.math.BigDecimal;
import io.swagger.client.model.Client; import io.swagger.client.model.Client;
import java.io.File;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.OffsetDateTime; import java.time.OffsetDateTime;
import io.swagger.client.model.OuterComposite; import io.swagger.client.model.OuterComposite;
import io.swagger.client.model.User;
import org.junit.Test; import org.junit.Test;
import org.junit.Ignore; import org.junit.Ignore;
@ -46,8 +48,8 @@ public class FakeApiTest {
*/ */
@Test @Test
public void fakeOuterBooleanSerializeTest() throws ApiException { public void fakeOuterBooleanSerializeTest() throws ApiException {
Boolean body = null; Boolean booleanPostBody = null;
Boolean response = api.fakeOuterBooleanSerialize(body); Boolean response = api.fakeOuterBooleanSerialize(booleanPostBody);
// TODO: test validations // TODO: test validations
} }
@ -62,8 +64,8 @@ public class FakeApiTest {
*/ */
@Test @Test
public void fakeOuterCompositeSerializeTest() throws ApiException { public void fakeOuterCompositeSerializeTest() throws ApiException {
OuterComposite body = null; OuterComposite outerComposite = null;
OuterComposite response = api.fakeOuterCompositeSerialize(body); OuterComposite response = api.fakeOuterCompositeSerialize(outerComposite);
// TODO: test validations // TODO: test validations
} }
@ -100,6 +102,23 @@ public class FakeApiTest {
// TODO: test validations // TODO: test validations
} }
/**
*
*
*
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void testBodyWithQueryParamsTest() throws ApiException {
String query = null;
User user = null;
api.testBodyWithQueryParams(query, user);
// TODO: test validations
}
/** /**
* To test \&quot;client\&quot; model * To test \&quot;client\&quot; model
* *
@ -110,8 +129,8 @@ public class FakeApiTest {
*/ */
@Test @Test
public void testClientModelTest() throws ApiException { public void testClientModelTest() throws ApiException {
Client body = null; Client client = null;
Client response = api.testClientModel(body); Client response = api.testClientModel(client);
// TODO: test validations // TODO: test validations
} }
@ -135,7 +154,7 @@ public class FakeApiTest {
Long int64 = null; Long int64 = null;
Float _float = null; Float _float = null;
String string = null; String string = null;
byte[] binary = null; File binary = null;
LocalDate date = null; LocalDate date = null;
OffsetDateTime dateTime = null; OffsetDateTime dateTime = null;
String password = null; String password = null;
@ -155,15 +174,15 @@ public class FakeApiTest {
*/ */
@Test @Test
public void testEnumParametersTest() throws ApiException { public void testEnumParametersTest() throws ApiException {
List<String> enumFormStringArray = null;
String enumFormString = null;
List<String> enumHeaderStringArray = null; List<String> enumHeaderStringArray = null;
String enumHeaderString = null; String enumHeaderString = null;
List<String> enumQueryStringArray = null; List<String> enumQueryStringArray = null;
String enumQueryString = null; String enumQueryString = null;
Integer enumQueryInteger = null; Integer enumQueryInteger = null;
Double enumQueryDouble = null; Double enumQueryDouble = null;
api.testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble); List<String> enumFormStringArray = null;
String enumFormString = null;
api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
// TODO: test validations // TODO: test validations
} }
@ -178,8 +197,8 @@ public class FakeApiTest {
*/ */
@Test @Test
public void testInlineAdditionalPropertiesTest() throws ApiException { public void testInlineAdditionalPropertiesTest() throws ApiException {
Object param = null; String requestBody = null;
api.testInlineAdditionalProperties(param); api.testInlineAdditionalProperties(requestBody);
// TODO: test validations // TODO: test validations
} }