[java] improve petstore tests with openapi v3 spec (#16447)

* regenerate tests in jersey2-java8 client

* update samples

* fix java google api client tests

* update java resteasy to use v3 spec for tests

* update java vertx to test with v3 spec

* update java resttemplate to test with v3 spec

* add new files

* regenerate jersey1 tests
This commit is contained in:
William Cheng
2023-08-30 12:33:01 +08:00
committed by GitHub
parent 611a60411b
commit 8386a6eaaf
615 changed files with 22444 additions and 10026 deletions

View File

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

View File

@@ -0,0 +1,14 @@
# AllOfWithSingleRef
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**username** | **String** | | [optional] |
|**singleRefType** | **SingleRefType** | | [optional] |

View File

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

View File

@@ -0,0 +1,69 @@
# DefaultApi
All URIs are relative to *http://petstore.swagger.io:80/v2*
| Method | HTTP request | Description |
|------------- | ------------- | -------------|
| [**fooGet**](DefaultApi.md#fooGet) | **GET** /foo | |
## fooGet
> FooGetDefaultResponse fooGet()
### Example
```java
// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.models.*;
import org.openapitools.client.api.DefaultApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
DefaultApi apiInstance = new DefaultApi(defaultClient);
try {
FooGetDefaultResponse result = apiInstance.fooGet();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#fooGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**FooGetDefaultResponse**](FooGetDefaultResponse.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **0** | response | - |

View File

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

View File

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

View File

@@ -4,15 +4,19 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
| Method | HTTP request | Description |
|------------- | ------------- | -------------|
| [**createXmlItem**](FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem |
| [**fakeBigDecimalMap**](FakeApi.md#fakeBigDecimalMap) | **GET** /fake/BigDecimalMap | |
| [**fakeHealthGet**](FakeApi.md#fakeHealthGet) | **GET** /fake/health | Health check endpoint |
| [**fakeHttpSignatureTest**](FakeApi.md#fakeHttpSignatureTest) | **GET** /fake/http-signature-test | test http signature authentication |
| [**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | |
| [**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | |
| [**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | |
| [**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | |
| [**fakePropertyEnumIntegerSerialize**](FakeApi.md#fakePropertyEnumIntegerSerialize) | **POST** /fake/property/enum-int | |
| [**testBodyWithBinary**](FakeApi.md#testBodyWithBinary) | **PUT** /fake/body-with-binary | |
| [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | |
| [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | |
| [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model |
| [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 |
| [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 |
| [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters |
| [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) |
| [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties |
@@ -21,13 +25,13 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
## createXmlItem
## fakeBigDecimalMap
> createXmlItem(xmlItem)
> FakeBigDecimalMap200Response fakeBigDecimalMap()
creates an XmlItem
this route creates an XmlItem
for Java apache and Java native, test toUrlQueryString for maps with BegDecimal keys
### Example
@@ -45,11 +49,135 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
FakeApi apiInstance = new FakeApi(defaultClient);
XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body
try {
apiInstance.createXmlItem(xmlItem);
FakeBigDecimalMap200Response result = apiInstance.fakeBigDecimalMap();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#createXmlItem");
System.err.println("Exception when calling FakeApi#fakeBigDecimalMap");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**FakeBigDecimalMap200Response**](FakeBigDecimalMap200Response.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: */*
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | successful operation | - |
## fakeHealthGet
> HealthCheckResult fakeHealthGet()
Health check endpoint
### Example
```java
// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.models.*;
import org.openapitools.client.api.FakeApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
FakeApi apiInstance = new FakeApi(defaultClient);
try {
HealthCheckResult result = apiInstance.fakeHealthGet();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#fakeHealthGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**HealthCheckResult**](HealthCheckResult.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | The instance started successfully | - |
## fakeHttpSignatureTest
> fakeHttpSignatureTest(pet, query1, header1)
test http signature authentication
### Example
```java
// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.auth.*;
import org.openapitools.client.models.*;
import org.openapitools.client.api.FakeApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
FakeApi apiInstance = new FakeApi(defaultClient);
Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store
String query1 = "query1_example"; // String | query parameter
String header1 = "header1_example"; // String | header parameter
try {
apiInstance.fakeHttpSignatureTest(pet, query1, header1);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#fakeHttpSignatureTest");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
@@ -64,7 +192,9 @@ public class Example {
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | |
| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | |
| **query1** | **String**| query parameter | [optional] |
| **header1** | **String**| header parameter | [optional] |
### Return type
@@ -72,18 +202,18 @@ null (empty response body)
### Authorization
No authorization required
[http_signature_test](../README.md#http_signature_test)
### HTTP request headers
- **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16
- **Content-Type**: application/json, application/xml
- **Accept**: Not defined
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | successful operation | - |
| **200** | The instance started successfully | - |
## fakeOuterBooleanSerialize
@@ -142,7 +272,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: */*
@@ -154,7 +284,7 @@ No authorization required
## fakeOuterCompositeSerialize
> OuterComposite fakeOuterCompositeSerialize(body)
> OuterComposite fakeOuterCompositeSerialize(outerComposite)
@@ -176,9 +306,9 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
FakeApi apiInstance = new FakeApi(defaultClient);
OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body
OuterComposite outerComposite = new OuterComposite(); // OuterComposite | Input composite as post body
try {
OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body);
OuterComposite result = apiInstance.fakeOuterCompositeSerialize(outerComposite);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize");
@@ -196,7 +326,7 @@ public class Example {
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] |
| **outerComposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] |
### Return type
@@ -208,7 +338,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: */*
@@ -274,7 +404,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: */*
@@ -340,7 +470,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: */*
@@ -350,13 +480,13 @@ No authorization required
| **200** | Output string | - |
## testBodyWithFileSchema
## fakePropertyEnumIntegerSerialize
> testBodyWithFileSchema(body)
> OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty)
For this test, the body for this request much reference a schema named `File`.
Test serialization of enum (int) properties with examples
### Example
@@ -374,9 +504,140 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
FakeApi apiInstance = new FakeApi(defaultClient);
FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass |
OuterObjectWithEnumProperty outerObjectWithEnumProperty = new OuterObjectWithEnumProperty(); // OuterObjectWithEnumProperty | Input enum (int) as post body
try {
apiInstance.testBodyWithFileSchema(body);
OuterObjectWithEnumProperty result = apiInstance.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#fakePropertyEnumIntegerSerialize");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
```
### Parameters
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **outerObjectWithEnumProperty** | [**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md)| Input enum (int) as post body | |
### Return type
[**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: */*
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Output enum (int) | - |
## testBodyWithBinary
> testBodyWithBinary(body)
For this test, the body has to be a binary file.
### Example
```java
// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.models.*;
import org.openapitools.client.api.FakeApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
FakeApi apiInstance = new FakeApi(defaultClient);
File body = new File("/path/to/file"); // File | image to upload
try {
apiInstance.testBodyWithBinary(body);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#testBodyWithBinary");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
```
### Parameters
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **body** | **File**| image to upload | |
### Return type
null (empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: image/png
- **Accept**: Not defined
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Success | - |
## testBodyWithFileSchema
> testBodyWithFileSchema(fileSchemaTestClass)
For this test, the body for this request must reference a schema named `File`.
### Example
```java
// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.models.*;
import org.openapitools.client.api.FakeApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
FakeApi apiInstance = new FakeApi(defaultClient);
FileSchemaTestClass fileSchemaTestClass = new FileSchemaTestClass(); // FileSchemaTestClass |
try {
apiInstance.testBodyWithFileSchema(fileSchemaTestClass);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#testBodyWithFileSchema");
System.err.println("Status code: " + e.getCode());
@@ -393,7 +654,7 @@ public class Example {
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | |
| **fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | |
### Return type
@@ -417,7 +678,7 @@ No authorization required
## testBodyWithQueryParams
> testBodyWithQueryParams(query, body)
> testBodyWithQueryParams(query, user)
@@ -438,9 +699,9 @@ public class Example {
FakeApi apiInstance = new FakeApi(defaultClient);
String query = "query_example"; // String |
User body = new User(); // User |
User user = new User(); // User |
try {
apiInstance.testBodyWithQueryParams(query, body);
apiInstance.testBodyWithQueryParams(query, user);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#testBodyWithQueryParams");
System.err.println("Status code: " + e.getCode());
@@ -458,7 +719,7 @@ public class Example {
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **query** | **String**| | |
| **body** | [**User**](User.md)| | |
| **user** | [**User**](User.md)| | |
### Return type
@@ -482,7 +743,7 @@ No authorization required
## testClientModel
> Client testClientModel(body)
> Client testClientModel(client)
To test \"client\" model
@@ -504,9 +765,9 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
FakeApi apiInstance = new FakeApi(defaultClient);
Client body = new Client(); // Client | client model
Client client = new Client(); // Client | client model
try {
Client result = apiInstance.testClientModel(body);
Client result = apiInstance.testClientModel(client);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#testClientModel");
@@ -524,7 +785,7 @@ public class Example {
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **body** | [**Client**](Client.md)| client model | |
| **client** | [**Client**](Client.md)| client model | |
### Return type
@@ -550,9 +811,9 @@ No authorization required
> testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback)
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
### Example
@@ -646,7 +907,7 @@ null (empty response body)
## testEnumParameters
> testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString)
> testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString)
To test enum parameters
@@ -674,10 +935,11 @@ public class Example {
String enumQueryString = "_abc"; // String | Query parameter enum test (string)
Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double)
Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double)
List<EnumClass> enumQueryModelArray = Arrays.asList(-efg); // List<EnumClass> |
List<String> enumFormStringArray = Arrays.asList("$"); // List<String> | Form parameter enum test (string array)
String enumFormString = "_abc"; // String | Form parameter enum test (string)
try {
apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#testEnumParameters");
System.err.println("Status code: " + e.getCode());
@@ -700,6 +962,7 @@ public class Example {
| **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] |
| **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] |
| **enumQueryModelArray** | [**List&lt;EnumClass&gt;**](EnumClass.md)| | [optional] |
| **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)] |
@@ -739,6 +1002,7 @@ Fake endpoint to test group parameters (optional)
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.auth.*;
import org.openapitools.client.models.*;
import org.openapitools.client.api.FakeApi;
@@ -746,6 +1010,10 @@ public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
// Configure HTTP bearer authorization: bearer_test
HttpBearerAuth bearer_test = (HttpBearerAuth) defaultClient.getAuthentication("bearer_test");
bearer_test.setBearerToken("BEARER TOKEN");
FakeApi apiInstance = new FakeApi(defaultClient);
Integer requiredStringGroup = 56; // Integer | Required String in group parameters
@@ -785,7 +1053,7 @@ null (empty response body)
### Authorization
No authorization required
[bearer_test](../README.md#bearer_test)
### HTTP request headers
@@ -801,10 +1069,12 @@ No authorization required
## testInlineAdditionalProperties
> testInlineAdditionalProperties(param)
> testInlineAdditionalProperties(requestBody)
test inline additionalProperties
### Example
```java
@@ -821,9 +1091,9 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
FakeApi apiInstance = new FakeApi(defaultClient);
Map<String, String> param = new HashMap(); // Map<String, String> | request body
Map<String, String> requestBody = new HashMap(); // Map<String, String> | request body
try {
apiInstance.testInlineAdditionalProperties(param);
apiInstance.testInlineAdditionalProperties(requestBody);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties");
System.err.println("Status code: " + e.getCode());
@@ -840,7 +1110,7 @@ public class Example {
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **param** | [**Map&lt;String, String&gt;**](String.md)| request body | |
| **requestBody** | [**Map&lt;String, String&gt;**](String.md)| request body | |
### Return type
@@ -868,6 +1138,8 @@ No authorization required
test json serialization of form data
### Example
```java
@@ -929,7 +1201,7 @@ No authorization required
## testQueryParameterCollectionFormat
> testQueryParameterCollectionFormat(pipe, ioutil, http, url, context)
> testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language)
@@ -956,8 +1228,10 @@ public class Example {
List<String> http = Arrays.asList(); // List<String> |
List<String> url = Arrays.asList(); // List<String> |
List<String> context = Arrays.asList(); // List<String> |
String allowEmpty = "allowEmpty_example"; // String |
Map<String, String> language = new HashMap(); // Map<String, String> |
try {
apiInstance.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context);
apiInstance.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#testQueryParameterCollectionFormat");
System.err.println("Status code: " + e.getCode());
@@ -979,6 +1253,8 @@ public class Example {
| **http** | [**List&lt;String&gt;**](String.md)| | |
| **url** | [**List&lt;String&gt;**](String.md)| | |
| **context** | [**List&lt;String&gt;**](String.md)| | |
| **allowEmpty** | **String**| | |
| **language** | [**Map&lt;String, String&gt;**](String.md)| | [optional] |
### Return type

View File

@@ -0,0 +1,14 @@
# FakeBigDecimalMap200Response
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**someId** | **BigDecimal** | | [optional] |
|**someMap** | **Map&lt;String, BigDecimal&gt;** | | [optional] |

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -18,10 +18,12 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
## addPet
> addPet(body)
> addPet(pet)
Add a new pet to the store
### Example
```java
@@ -43,9 +45,9 @@ public class Example {
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
PetApi apiInstance = new PetApi(defaultClient);
Pet body = new Pet(); // Pet | Pet object that needs to be added to the store
Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store
try {
apiInstance.addPet(body);
apiInstance.addPet(pet);
} catch (ApiException e) {
System.err.println("Exception when calling PetApi#addPet");
System.err.println("Status code: " + e.getCode());
@@ -62,7 +64,7 @@ public class Example {
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | |
| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | |
### Return type
@@ -81,7 +83,7 @@ null (empty response body)
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | successful operation | - |
| **200** | Successful operation | - |
| **405** | Invalid input | - |
@@ -91,6 +93,8 @@ null (empty response body)
Deletes a pet
### Example
```java
@@ -152,7 +156,7 @@ null (empty response body)
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | successful operation | - |
| **200** | Successful operation | - |
| **400** | Invalid pet value | - |
@@ -377,10 +381,12 @@ public class Example {
## updatePet
> updatePet(body)
> updatePet(pet)
Update an existing pet
### Example
```java
@@ -402,9 +408,9 @@ public class Example {
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
PetApi apiInstance = new PetApi(defaultClient);
Pet body = new Pet(); // Pet | Pet object that needs to be added to the store
Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store
try {
apiInstance.updatePet(body);
apiInstance.updatePet(pet);
} catch (ApiException e) {
System.err.println("Exception when calling PetApi#updatePet");
System.err.println("Status code: " + e.getCode());
@@ -421,7 +427,7 @@ public class Example {
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | |
| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | |
### Return type
@@ -440,7 +446,7 @@ null (empty response body)
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | successful operation | - |
| **200** | Successful operation | - |
| **400** | Invalid ID supplied | - |
| **404** | Pet not found | - |
| **405** | Validation exception | - |
@@ -452,6 +458,8 @@ null (empty response body)
Updates a pet in the store with form data
### Example
```java
@@ -515,6 +523,7 @@ null (empty response body)
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Successful operation | - |
| **405** | Invalid input | - |
@@ -524,6 +533,8 @@ null (empty response body)
uploads an image
### Example
```java
@@ -597,6 +608,8 @@ public class Example {
uploads an image (required)
### Example
```java

View File

@@ -0,0 +1,13 @@
# SingleRefType
## Enum
* `ADMIN` (value: `"admin"`)
* `USER` (value: `"user"`)

View File

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

View File

@@ -17,7 +17,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
## createUser
> createUser(body)
> createUser(user)
Create user
@@ -39,9 +39,9 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
UserApi apiInstance = new UserApi(defaultClient);
User body = new User(); // User | Created user object
User user = new User(); // User | Created user object
try {
apiInstance.createUser(body);
apiInstance.createUser(user);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#createUser");
System.err.println("Status code: " + e.getCode());
@@ -58,7 +58,7 @@ public class Example {
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **body** | [**User**](User.md)| Created user object | |
| **user** | [**User**](User.md)| Created user object | |
### Return type
@@ -70,7 +70,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: Not defined
@@ -82,10 +82,12 @@ No authorization required
## createUsersWithArrayInput
> createUsersWithArrayInput(body)
> createUsersWithArrayInput(user)
Creates list of users with given input array
### Example
```java
@@ -102,9 +104,9 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
UserApi apiInstance = new UserApi(defaultClient);
List<User> body = Arrays.asList(); // List<User> | List of user object
List<User> user = Arrays.asList(); // List<User> | List of user object
try {
apiInstance.createUsersWithArrayInput(body);
apiInstance.createUsersWithArrayInput(user);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#createUsersWithArrayInput");
System.err.println("Status code: " + e.getCode());
@@ -121,7 +123,7 @@ public class Example {
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **body** | [**List&lt;User&gt;**](User.md)| List of user object | |
| **user** | [**List&lt;User&gt;**](User.md)| List of user object | |
### Return type
@@ -133,7 +135,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: Not defined
@@ -145,10 +147,12 @@ No authorization required
## createUsersWithListInput
> createUsersWithListInput(body)
> createUsersWithListInput(user)
Creates list of users with given input array
### Example
```java
@@ -165,9 +169,9 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
UserApi apiInstance = new UserApi(defaultClient);
List<User> body = Arrays.asList(); // List<User> | List of user object
List<User> user = Arrays.asList(); // List<User> | List of user object
try {
apiInstance.createUsersWithListInput(body);
apiInstance.createUsersWithListInput(user);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#createUsersWithListInput");
System.err.println("Status code: " + e.getCode());
@@ -184,7 +188,7 @@ public class Example {
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **body** | [**List&lt;User&gt;**](User.md)| List of user object | |
| **user** | [**List&lt;User&gt;**](User.md)| List of user object | |
### Return type
@@ -196,7 +200,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: Not defined
@@ -278,6 +282,8 @@ No authorization required
Get user by user name
### Example
```java
@@ -344,6 +350,8 @@ No authorization required
Logs user into the system
### Example
```java
@@ -411,6 +419,8 @@ No authorization required
Logs out current logged in user session
### Example
```java
@@ -466,7 +476,7 @@ No authorization required
## updateUser
> updateUser(username, body)
> updateUser(username, user)
Updated user
@@ -489,9 +499,9 @@ public class Example {
UserApi apiInstance = new UserApi(defaultClient);
String username = "username_example"; // String | name that need to be deleted
User body = new User(); // User | Updated user object
User user = new User(); // User | Updated user object
try {
apiInstance.updateUser(username, body);
apiInstance.updateUser(username, user);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#updateUser");
System.err.println("Status code: " + e.getCode());
@@ -509,7 +519,7 @@ public class Example {
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **username** | **String**| name that need to be deleted | |
| **body** | [**User**](User.md)| Updated user object | |
| **user** | [**User**](User.md)| Updated user object | |
### Return type
@@ -521,7 +531,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: Not defined