[Java][Native] Support oneOf/anyOf schemas (#7263)

* Java-native add models of oneOf/anyOf

* Java-native refresh samples

* Java-native add a sample project for openapi3
This commit is contained in:
bgong-mdsol
2020-10-15 05:29:51 -04:00
committed by GitHub
parent f76d72edf1
commit edf153eede
494 changed files with 39916 additions and 759 deletions

View File

@@ -0,0 +1,19 @@
# AdditionalPropertiesClass
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**mapProperty** | **Map<String, String>** | | [optional]
**mapOfMapProperty** | [**Map<String, Map<String, String>>**](Map.md) | | [optional]
**anytype1** | **Object** | | [optional]
**mapWithUndeclaredPropertiesAnytype1** | **Object** | | [optional]
**mapWithUndeclaredPropertiesAnytype2** | **Object** | | [optional]
**mapWithUndeclaredPropertiesAnytype3** | **Map<String, Object>** | | [optional]
**emptyMap** | **Object** | an object with no declared properties and no undeclared properties, hence it's an empty map. | [optional]
**mapWithUndeclaredPropertiesString** | **Map<String, String>** | | [optional]

View File

@@ -0,0 +1,13 @@
# Animal
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**className** | **String** | |
**color** | **String** | | [optional]

View File

@@ -0,0 +1,144 @@
# AnotherFakeApi
All URIs are relative to *http://petstore.swagger.io:80/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
[**call123testSpecialTags**](AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
[**call123testSpecialTagsWithHttpInfo**](AnotherFakeApi.md#call123testSpecialTagsWithHttpInfo) | **PATCH** /another-fake/dummy | To test special tags
## call123testSpecialTags
> Client call123testSpecialTags(client)
To test special tags
To test special tags and operation ID starting with number
### 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.AnotherFakeApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient);
Client client = new Client(); // Client | client model
try {
Client result = apiInstance.call123testSpecialTags(client);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags");
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
------------- | ------------- | ------------- | -------------
**client** | [**Client**](Client.md)| client model |
### Return type
[**Client**](Client.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | successful operation | - |
## call123testSpecialTagsWithHttpInfo
> ApiResponse<Client> call123testSpecialTags call123testSpecialTagsWithHttpInfo(client)
To test special tags
To test special tags and operation ID starting with number
### Example
```java
// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.ApiResponse;
import org.openapitools.client.Configuration;
import org.openapitools.client.models.*;
import org.openapitools.client.api.AnotherFakeApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient);
Client client = new Client(); // Client | client model
try {
ApiResponse<Client> response = apiInstance.call123testSpecialTagsWithHttpInfo(client);
System.out.println("Status code: " + response.getStatusCode());
System.out.println("Response headers: " + response.getHeaders());
System.out.println("Response body: " + response.getData());
} catch (ApiException e) {
System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
System.err.println("Reason: " + e.getResponseBody());
e.printStackTrace();
}
}
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**client** | [**Client**](Client.md)| client model |
### Return type
ApiResponse<[**Client**](Client.md)>
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | successful operation | - |

View File

@@ -0,0 +1,13 @@
# Apple
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**cultivar** | **String** | | [optional]
**origin** | **String** | | [optional]

View File

@@ -0,0 +1,13 @@
# AppleReq
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**cultivar** | **String** | |
**mealy** | **Boolean** | | [optional]

View File

@@ -0,0 +1,12 @@
# ArrayOfArrayOfNumberOnly
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**arrayArrayNumber** | [**List&lt;List&lt;BigDecimal&gt;&gt;**](List.md) | | [optional]

View File

@@ -0,0 +1,12 @@
# ArrayOfNumberOnly
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**arrayNumber** | [**List&lt;BigDecimal&gt;**](BigDecimal.md) | | [optional]

View File

@@ -0,0 +1,14 @@
# ArrayTest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**arrayOfString** | **List&lt;String&gt;** | | [optional]
**arrayArrayOfInteger** | [**List&lt;List&lt;Long&gt;&gt;**](List.md) | | [optional]
**arrayArrayOfModel** | [**List&lt;List&lt;ReadOnlyFirst&gt;&gt;**](List.md) | | [optional]

View File

@@ -0,0 +1,12 @@
# Banana
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**lengthCm** | [**BigDecimal**](BigDecimal.md) | | [optional]

View File

@@ -0,0 +1,13 @@
# BananaReq
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**lengthCm** | [**BigDecimal**](BigDecimal.md) | |
**sweet** | **Boolean** | | [optional]

View File

@@ -0,0 +1,12 @@
# BasquePig
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**className** | **String** | |

View File

@@ -0,0 +1,17 @@
# Capitalization
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**smallCamel** | **String** | | [optional]
**capitalCamel** | **String** | | [optional]
**smallSnake** | **String** | | [optional]
**capitalSnake** | **String** | | [optional]
**scAETHFlowPoints** | **String** | | [optional]
**ATT_NAME** | **String** | Name of the pet | [optional]

View File

@@ -0,0 +1,12 @@
# Cat
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**declawed** | **Boolean** | | [optional]

View File

@@ -0,0 +1,12 @@
# CatAllOf
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**declawed** | **Boolean** | | [optional]

View File

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

View File

@@ -0,0 +1,21 @@
# ChildCat
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **String** | | [optional]
**petType** | [**String**](#String) | |
## Enum: String
Name | Value
---- | -----
CHILDCAT | &quot;ChildCat&quot;

View File

@@ -0,0 +1,21 @@
# ChildCatAllOf
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **String** | | [optional]
**petType** | [**String**](#String) | | [optional]
## Enum: String
Name | Value
---- | -----
CHILDCAT | &quot;ChildCat&quot;

View File

@@ -0,0 +1,13 @@
# ClassModel
Model for testing model with \"_class\" property
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**propertyClass** | **String** | | [optional]

View File

@@ -0,0 +1,12 @@
# Client
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**client** | **String** | | [optional]

View File

@@ -0,0 +1,13 @@
# ComplexQuadrilateral
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**shapeType** | **String** | |
**quadrilateralType** | **String** | |

View File

@@ -0,0 +1,12 @@
# DanishPig
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**className** | **String** | |

View File

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

View File

@@ -0,0 +1,12 @@
# Dog
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**breed** | **String** | | [optional]

View File

@@ -0,0 +1,12 @@
# DogAllOf
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**breed** | **String** | | [optional]

View File

@@ -0,0 +1,15 @@
# Drawing
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**mainShape** | [**Shape**](Shape.md) | | [optional]
**shapeOrNull** | [**ShapeOrNull**](ShapeOrNull.md) | | [optional]
**nullableShape** | [**NullableShape**](NullableShape.md) | | [optional]
**shapes** | [**List&lt;Shape&gt;**](Shape.md) | | [optional]

View File

@@ -0,0 +1,31 @@
# EnumArrays
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional]
**arrayEnum** | [**List&lt;ArrayEnumEnum&gt;**](#List&lt;ArrayEnumEnum&gt;) | | [optional]
## Enum: JustSymbolEnum
Name | Value
---- | -----
GREATER_THAN_OR_EQUAL_TO | &quot;&gt;&#x3D;&quot;
DOLLAR | &quot;$&quot;
## Enum: List&lt;ArrayEnumEnum&gt;
Name | Value
---- | -----
FISH | &quot;fish&quot;
CRAB | &quot;crab&quot;

View File

@@ -0,0 +1,15 @@
# EnumClass
## Enum
* `_ABC` (value: `"_abc"`)
* `_EFG` (value: `"-efg"`)
* `_XYZ_` (value: `"(xyz)"`)

View File

@@ -0,0 +1,57 @@
# EnumTest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional]
**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | |
**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional]
**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional]
**outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional]
**outerEnumInteger** | [**OuterEnumInteger**](OuterEnumInteger.md) | | [optional]
**outerEnumDefaultValue** | [**OuterEnumDefaultValue**](OuterEnumDefaultValue.md) | | [optional]
**outerEnumIntegerDefaultValue** | [**OuterEnumIntegerDefaultValue**](OuterEnumIntegerDefaultValue.md) | | [optional]
## Enum: EnumStringEnum
Name | Value
---- | -----
UPPER | &quot;UPPER&quot;
LOWER | &quot;lower&quot;
EMPTY | &quot;&quot;
## Enum: EnumStringRequiredEnum
Name | Value
---- | -----
UPPER | &quot;UPPER&quot;
LOWER | &quot;lower&quot;
EMPTY | &quot;&quot;
## Enum: EnumIntegerEnum
Name | Value
---- | -----
NUMBER_1 | 1
NUMBER_MINUS_1 | -1
## Enum: EnumNumberEnum
Name | Value
---- | -----
NUMBER_1_DOT_1 | 1.1
NUMBER_MINUS_1_DOT_2 | -1.2

View File

@@ -0,0 +1,13 @@
# EquilateralTriangle
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**shapeType** | **String** | |
**triangleType** | **String** | |

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,158 @@
# FakeClassnameTags123Api
All URIs are relative to *http://petstore.swagger.io:80/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
[**testClassname**](FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case
[**testClassnameWithHttpInfo**](FakeClassnameTags123Api.md#testClassnameWithHttpInfo) | **PATCH** /fake_classname_test | To test class name in snake case
## testClassname
> Client testClassname(client)
To test class name in snake case
To test class name in snake case
### 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.FakeClassnameTags123Api;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
// Configure API key authorization: api_key_query
ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query");
api_key_query.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key_query.setApiKeyPrefix("Token");
FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(defaultClient);
Client client = new Client(); // Client | client model
try {
Client result = apiInstance.testClassname(client);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FakeClassnameTags123Api#testClassname");
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
------------- | ------------- | ------------- | -------------
**client** | [**Client**](Client.md)| client model |
### Return type
[**Client**](Client.md)
### Authorization
[api_key_query](../README.md#api_key_query)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | successful operation | - |
## testClassnameWithHttpInfo
> ApiResponse<Client> testClassname testClassnameWithHttpInfo(client)
To test class name in snake case
To test class name in snake case
### Example
```java
// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.ApiResponse;
import org.openapitools.client.Configuration;
import org.openapitools.client.auth.*;
import org.openapitools.client.models.*;
import org.openapitools.client.api.FakeClassnameTags123Api;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
// Configure API key authorization: api_key_query
ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query");
api_key_query.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key_query.setApiKeyPrefix("Token");
FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(defaultClient);
Client client = new Client(); // Client | client model
try {
ApiResponse<Client> response = apiInstance.testClassnameWithHttpInfo(client);
System.out.println("Status code: " + response.getStatusCode());
System.out.println("Response headers: " + response.getHeaders());
System.out.println("Response body: " + response.getData());
} catch (ApiException e) {
System.err.println("Exception when calling FakeClassnameTags123Api#testClassname");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
System.err.println("Reason: " + e.getResponseBody());
e.printStackTrace();
}
}
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**client** | [**Client**](Client.md)| client model |
### Return type
ApiResponse<[**Client**](Client.md)>
### Authorization
[api_key_query](../README.md#api_key_query)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | successful operation | - |

View File

@@ -0,0 +1,13 @@
# FileSchemaTestClass
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**file** | [**java.io.File**](java.io.File.md) | | [optional]
**files** | [**List&lt;java.io.File&gt;**](java.io.File.md) | | [optional]

View File

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

View File

@@ -0,0 +1,26 @@
# FormatTest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**integer** | **Integer** | | [optional]
**int32** | **Integer** | | [optional]
**int64** | **Long** | | [optional]
**number** | [**BigDecimal**](BigDecimal.md) | |
**_float** | **Float** | | [optional]
**_double** | **Double** | | [optional]
**string** | **String** | | [optional]
**_byte** | **byte[]** | |
**binary** | [**File**](File.md) | | [optional]
**date** | [**LocalDate**](LocalDate.md) | |
**dateTime** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional]
**uuid** | [**UUID**](UUID.md) | | [optional]
**password** | **String** | |
**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,37 @@
# Fruit
## oneOf schemas
* [Apple](Apple.md)
* [Banana](Banana.md)
## Example
```java
// Import classes:
import org.openapitools.client.model.Fruit;
import org.openapitools.client.model.Apple;
import org.openapitools.client.model.Banana;
public class Example {
public static void main(String[] args) {
Fruit exampleFruit = new Fruit();
// create a new Apple
Apple exampleApple = new Apple();
// set Fruit to Apple
exampleFruit.setActualInstance(exampleApple);
// to get back the Apple set earlier
Apple testApple = (Apple) exampleFruit.getActualInstance();
// create a new Banana
Banana exampleBanana = new Banana();
// set Fruit to Banana
exampleFruit.setActualInstance(exampleBanana);
// to get back the Banana set earlier
Banana testBanana = (Banana) exampleFruit.getActualInstance();
}
}
```

View File

@@ -0,0 +1,39 @@
# FruitReq
## oneOf schemas
* [AppleReq](AppleReq.md)
* [BananaReq](BananaReq.md)
NOTE: this class is nullable.
## Example
```java
// Import classes:
import org.openapitools.client.model.FruitReq;
import org.openapitools.client.model.AppleReq;
import org.openapitools.client.model.BananaReq;
public class Example {
public static void main(String[] args) {
FruitReq exampleFruitReq = new FruitReq();
// create a new AppleReq
AppleReq exampleAppleReq = new AppleReq();
// set FruitReq to AppleReq
exampleFruitReq.setActualInstance(exampleAppleReq);
// to get back the AppleReq set earlier
AppleReq testAppleReq = (AppleReq) exampleFruitReq.getActualInstance();
// create a new BananaReq
BananaReq exampleBananaReq = new BananaReq();
// set FruitReq to BananaReq
exampleFruitReq.setActualInstance(exampleBananaReq);
// to get back the BananaReq set earlier
BananaReq testBananaReq = (BananaReq) exampleFruitReq.getActualInstance();
}
}
```

View File

@@ -0,0 +1,37 @@
# GmFruit
## anyOf schemas
* [Apple](Apple.md)
* [Banana](Banana.md)
## Example
```java
// Import classes:
import org.openapitools.client.model.GmFruit;
import org.openapitools.client.model.Apple;
import org.openapitools.client.model.Banana;
public class Example {
public static void main(String[] args) {
GmFruit exampleGmFruit = new GmFruit();
// create a new Apple
Apple exampleApple = new Apple();
// set GmFruit to Apple
exampleGmFruit.setActualInstance(exampleApple);
// to get back the Apple set earlier
Apple testApple = (Apple) exampleGmFruit.getActualInstance();
// create a new Banana
Banana exampleBanana = new Banana();
// set GmFruit to Banana
exampleGmFruit.setActualInstance(exampleBanana);
// to get back the Banana set earlier
Banana testBanana = (Banana) exampleGmFruit.getActualInstance();
}
}
```

View File

@@ -0,0 +1,12 @@
# GrandparentAnimal
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**petType** | **String** | |

View File

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

View File

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

View File

@@ -0,0 +1,13 @@
# InlineObject
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **String** | Updated name of the pet | [optional]
**status** | **String** | Updated status of the pet | [optional]

View File

@@ -0,0 +1,13 @@
# InlineObject1
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**additionalMetadata** | **String** | Additional data to pass to server | [optional]
**file** | [**File**](File.md) | file to upload | [optional]

View File

@@ -0,0 +1,32 @@
# InlineObject2
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**enumFormStringArray** | [**List&lt;EnumFormStringArrayEnum&gt;**](#List&lt;EnumFormStringArrayEnum&gt;) | Form parameter enum test (string array) | [optional]
**enumFormString** | [**EnumFormStringEnum**](#EnumFormStringEnum) | Form parameter enum test (string) | [optional]
## Enum: List&lt;EnumFormStringArrayEnum&gt;
Name | Value
---- | -----
GREATER_THAN | &quot;&gt;&quot;
DOLLAR | &quot;$&quot;
## Enum: EnumFormStringEnum
Name | Value
---- | -----
_ABC | &quot;_abc&quot;
_EFG | &quot;-efg&quot;
_XYZ_ | &quot;(xyz)&quot;

View File

@@ -0,0 +1,25 @@
# InlineObject3
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**integer** | **Integer** | None | [optional]
**int32** | **Integer** | None | [optional]
**int64** | **Long** | None | [optional]
**number** | [**BigDecimal**](BigDecimal.md) | None |
**_float** | **Float** | None | [optional]
**_double** | **Double** | None |
**string** | **String** | None | [optional]
**patternWithoutDelimiter** | **String** | None |
**_byte** | **byte[]** | None |
**binary** | [**File**](File.md) | None | [optional]
**date** | [**LocalDate**](LocalDate.md) | None | [optional]
**dateTime** | [**OffsetDateTime**](OffsetDateTime.md) | None | [optional]
**password** | **String** | None | [optional]
**callback** | **String** | None | [optional]

View File

@@ -0,0 +1,13 @@
# InlineObject4
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**param** | **String** | field1 |
**param2** | **String** | field2 |

View File

@@ -0,0 +1,13 @@
# InlineObject5
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**additionalMetadata** | **String** | Additional data to pass to server | [optional]
**requiredFile** | [**File**](File.md) | file to upload |

View File

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

View File

@@ -0,0 +1,13 @@
# IsoscelesTriangle
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**shapeType** | **String** | |
**triangleType** | **String** | |

View File

@@ -0,0 +1,46 @@
# Mammal
## oneOf schemas
* [Pig](Pig.md)
* [Whale](Whale.md)
* [Zebra](Zebra.md)
## Example
```java
// Import classes:
import org.openapitools.client.model.Mammal;
import org.openapitools.client.model.Pig;
import org.openapitools.client.model.Whale;
import org.openapitools.client.model.Zebra;
public class Example {
public static void main(String[] args) {
Mammal exampleMammal = new Mammal();
// create a new Pig
Pig examplePig = new Pig();
// set Mammal to Pig
exampleMammal.setActualInstance(examplePig);
// to get back the Pig set earlier
Pig testPig = (Pig) exampleMammal.getActualInstance();
// create a new Whale
Whale exampleWhale = new Whale();
// set Mammal to Whale
exampleMammal.setActualInstance(exampleWhale);
// to get back the Whale set earlier
Whale testWhale = (Whale) exampleMammal.getActualInstance();
// create a new Zebra
Zebra exampleZebra = new Zebra();
// set Mammal to Zebra
exampleMammal.setActualInstance(exampleZebra);
// to get back the Zebra set earlier
Zebra testZebra = (Zebra) exampleMammal.getActualInstance();
}
}
```

View File

@@ -0,0 +1,24 @@
# MapTest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**mapMapOfString** | [**Map&lt;String, Map&lt;String, String&gt;&gt;**](Map.md) | | [optional]
**mapOfEnumString** | [**Map&lt;String, InnerEnum&gt;**](#Map&lt;String, InnerEnum&gt;) | | [optional]
**directMap** | **Map&lt;String, Boolean&gt;** | | [optional]
**indirectMap** | **Map&lt;String, Boolean&gt;** | | [optional]
## Enum: Map&lt;String, InnerEnum&gt;
Name | Value
---- | -----
UPPER | &quot;UPPER&quot;
LOWER | &quot;lower&quot;

View File

@@ -0,0 +1,14 @@
# MixedPropertiesAndAdditionalPropertiesClass
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**uuid** | [**UUID**](UUID.md) | | [optional]
**dateTime** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional]
**map** | [**Map&lt;String, Animal&gt;**](Animal.md) | | [optional]

View File

@@ -0,0 +1,14 @@
# Model200Response
Model for testing model name starting with number
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **Integer** | | [optional]
**propertyClass** | **String** | | [optional]

View File

@@ -0,0 +1,14 @@
# ModelApiResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**code** | **Integer** | | [optional]
**type** | **String** | | [optional]
**message** | **String** | | [optional]

View File

@@ -0,0 +1,13 @@
# ModelReturn
Model for testing reserved words
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**_return** | **Integer** | | [optional]

View File

@@ -0,0 +1,16 @@
# Name
Model for testing model name same as property name
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **Integer** | |
**snakeCase** | **Integer** | | [optional] [readonly]
**property** | **String** | | [optional]
**_123number** | **Integer** | | [optional] [readonly]

View File

@@ -0,0 +1,23 @@
# NullableClass
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**integerProp** | **Integer** | | [optional]
**numberProp** | [**BigDecimal**](BigDecimal.md) | | [optional]
**booleanProp** | **Boolean** | | [optional]
**stringProp** | **String** | | [optional]
**dateProp** | [**LocalDate**](LocalDate.md) | | [optional]
**datetimeProp** | [**OffsetDateTime**](OffsetDateTime.md) | | [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,41 @@
# NullableShape
The value may be a shape or the 'null' value. The 'nullable' attribute was introduced in OAS schema >= 3.0 and has been deprecated in OAS schema >= 3.1.
## oneOf schemas
* [Quadrilateral](Quadrilateral.md)
* [Triangle](Triangle.md)
NOTE: this class is nullable.
## Example
```java
// Import classes:
import org.openapitools.client.model.NullableShape;
import org.openapitools.client.model.Quadrilateral;
import org.openapitools.client.model.Triangle;
public class Example {
public static void main(String[] args) {
NullableShape exampleNullableShape = new NullableShape();
// create a new Quadrilateral
Quadrilateral exampleQuadrilateral = new Quadrilateral();
// set NullableShape to Quadrilateral
exampleNullableShape.setActualInstance(exampleQuadrilateral);
// to get back the Quadrilateral set earlier
Quadrilateral testQuadrilateral = (Quadrilateral) exampleNullableShape.getActualInstance();
// create a new Triangle
Triangle exampleTriangle = new Triangle();
// set NullableShape to Triangle
exampleNullableShape.setActualInstance(exampleTriangle);
// to get back the Triangle set earlier
Triangle testTriangle = (Triangle) exampleNullableShape.getActualInstance();
}
}
```

View File

@@ -0,0 +1,12 @@
# NumberOnly
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**justNumber** | [**BigDecimal**](BigDecimal.md) | | [optional]

View File

@@ -0,0 +1,27 @@
# Order
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **Long** | | [optional]
**petId** | **Long** | | [optional]
**quantity** | **Integer** | | [optional]
**shipDate** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional]
**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional]
**complete** | **Boolean** | | [optional]
## Enum: StatusEnum
Name | Value
---- | -----
PLACED | &quot;placed&quot;
APPROVED | &quot;approved&quot;
DELIVERED | &quot;delivered&quot;

View File

@@ -0,0 +1,14 @@
# OuterComposite
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**myNumber** | [**BigDecimal**](BigDecimal.md) | | [optional]
**myString** | **String** | | [optional]
**myBoolean** | **Boolean** | | [optional]

View File

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

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,11 @@
# ParentPet
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------

View File

@@ -0,0 +1,27 @@
# Pet
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **Long** | | [optional]
**category** | [**Category**](Category.md) | | [optional]
**name** | **String** | |
**photoUrls** | **List&lt;String&gt;** | |
**tags** | [**List&lt;Tag&gt;**](Tag.md) | | [optional]
**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional]
## Enum: StatusEnum
Name | Value
---- | -----
AVAILABLE | &quot;available&quot;
PENDING | &quot;pending&quot;
SOLD | &quot;sold&quot;

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,37 @@
# Pig
## oneOf schemas
* [BasquePig](BasquePig.md)
* [DanishPig](DanishPig.md)
## Example
```java
// Import classes:
import org.openapitools.client.model.Pig;
import org.openapitools.client.model.BasquePig;
import org.openapitools.client.model.DanishPig;
public class Example {
public static void main(String[] args) {
Pig examplePig = new Pig();
// create a new BasquePig
BasquePig exampleBasquePig = new BasquePig();
// set Pig to BasquePig
examplePig.setActualInstance(exampleBasquePig);
// to get back the BasquePig set earlier
BasquePig testBasquePig = (BasquePig) examplePig.getActualInstance();
// create a new DanishPig
DanishPig exampleDanishPig = new DanishPig();
// set Pig to DanishPig
examplePig.setActualInstance(exampleDanishPig);
// to get back the DanishPig set earlier
DanishPig testDanishPig = (DanishPig) examplePig.getActualInstance();
}
}
```

View File

@@ -0,0 +1,37 @@
# Quadrilateral
## oneOf schemas
* [ComplexQuadrilateral](ComplexQuadrilateral.md)
* [SimpleQuadrilateral](SimpleQuadrilateral.md)
## Example
```java
// Import classes:
import org.openapitools.client.model.Quadrilateral;
import org.openapitools.client.model.ComplexQuadrilateral;
import org.openapitools.client.model.SimpleQuadrilateral;
public class Example {
public static void main(String[] args) {
Quadrilateral exampleQuadrilateral = new Quadrilateral();
// create a new ComplexQuadrilateral
ComplexQuadrilateral exampleComplexQuadrilateral = new ComplexQuadrilateral();
// set Quadrilateral to ComplexQuadrilateral
exampleQuadrilateral.setActualInstance(exampleComplexQuadrilateral);
// to get back the ComplexQuadrilateral set earlier
ComplexQuadrilateral testComplexQuadrilateral = (ComplexQuadrilateral) exampleQuadrilateral.getActualInstance();
// create a new SimpleQuadrilateral
SimpleQuadrilateral exampleSimpleQuadrilateral = new SimpleQuadrilateral();
// set Quadrilateral to SimpleQuadrilateral
exampleQuadrilateral.setActualInstance(exampleSimpleQuadrilateral);
// to get back the SimpleQuadrilateral set earlier
SimpleQuadrilateral testSimpleQuadrilateral = (SimpleQuadrilateral) exampleQuadrilateral.getActualInstance();
}
}
```

View File

@@ -0,0 +1,12 @@
# QuadrilateralInterface
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**quadrilateralType** | **String** | |

View File

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

View File

@@ -0,0 +1,13 @@
# ScaleneTriangle
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**shapeType** | **String** | |
**triangleType** | **String** | |

View File

@@ -0,0 +1,37 @@
# Shape
## oneOf schemas
* [Quadrilateral](Quadrilateral.md)
* [Triangle](Triangle.md)
## Example
```java
// Import classes:
import org.openapitools.client.model.Shape;
import org.openapitools.client.model.Quadrilateral;
import org.openapitools.client.model.Triangle;
public class Example {
public static void main(String[] args) {
Shape exampleShape = new Shape();
// create a new Quadrilateral
Quadrilateral exampleQuadrilateral = new Quadrilateral();
// set Shape to Quadrilateral
exampleShape.setActualInstance(exampleQuadrilateral);
// to get back the Quadrilateral set earlier
Quadrilateral testQuadrilateral = (Quadrilateral) exampleShape.getActualInstance();
// create a new Triangle
Triangle exampleTriangle = new Triangle();
// set Shape to Triangle
exampleShape.setActualInstance(exampleTriangle);
// to get back the Triangle set earlier
Triangle testTriangle = (Triangle) exampleShape.getActualInstance();
}
}
```

View File

@@ -0,0 +1,12 @@
# ShapeInterface
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**shapeType** | **String** | |

View File

@@ -0,0 +1,41 @@
# ShapeOrNull
The value may be a shape or the 'null' value. This is introduced in OAS schema >= 3.1.
## oneOf schemas
* [Quadrilateral](Quadrilateral.md)
* [Triangle](Triangle.md)
NOTE: this class is nullable.
## Example
```java
// Import classes:
import org.openapitools.client.model.ShapeOrNull;
import org.openapitools.client.model.Quadrilateral;
import org.openapitools.client.model.Triangle;
public class Example {
public static void main(String[] args) {
ShapeOrNull exampleShapeOrNull = new ShapeOrNull();
// create a new Quadrilateral
Quadrilateral exampleQuadrilateral = new Quadrilateral();
// set ShapeOrNull to Quadrilateral
exampleShapeOrNull.setActualInstance(exampleQuadrilateral);
// to get back the Quadrilateral set earlier
Quadrilateral testQuadrilateral = (Quadrilateral) exampleShapeOrNull.getActualInstance();
// create a new Triangle
Triangle exampleTriangle = new Triangle();
// set ShapeOrNull to Triangle
exampleShapeOrNull.setActualInstance(exampleTriangle);
// to get back the Triangle set earlier
Triangle testTriangle = (Triangle) exampleShapeOrNull.getActualInstance();
}
}
```

View File

@@ -0,0 +1,13 @@
# SimpleQuadrilateral
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**shapeType** | **String** | |
**quadrilateralType** | **String** | |

View File

@@ -0,0 +1,12 @@
# SpecialModelName
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**$specialPropertyName** | **Long** | | [optional]

View File

@@ -0,0 +1,560 @@
# StoreApi
All URIs are relative to *http://petstore.swagger.io:80/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
[**deleteOrderWithHttpInfo**](StoreApi.md#deleteOrderWithHttpInfo) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
[**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status
[**getInventoryWithHttpInfo**](StoreApi.md#getInventoryWithHttpInfo) | **GET** /store/inventory | Returns pet inventories by status
[**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID
[**getOrderByIdWithHttpInfo**](StoreApi.md#getOrderByIdWithHttpInfo) | **GET** /store/order/{order_id} | Find purchase order by ID
[**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet
[**placeOrderWithHttpInfo**](StoreApi.md#placeOrderWithHttpInfo) | **POST** /store/order | Place an order for a pet
## deleteOrder
> void deleteOrder(orderId)
Delete purchase order by ID
For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
### Example
```java
// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.models.*;
import org.openapitools.client.api.StoreApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
StoreApi apiInstance = new StoreApi(defaultClient);
String orderId = "orderId_example"; // String | ID of the order that needs to be deleted
try {
apiInstance.deleteOrder(orderId);
} catch (ApiException e) {
System.err.println("Exception when calling StoreApi#deleteOrder");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**orderId** | **String**| ID of the order that needs to be deleted |
### Return type
null (empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **400** | Invalid ID supplied | - |
| **404** | Order not found | - |
## deleteOrderWithHttpInfo
> ApiResponse<Void> deleteOrder deleteOrderWithHttpInfo(orderId)
Delete purchase order by ID
For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
### Example
```java
// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.ApiResponse;
import org.openapitools.client.Configuration;
import org.openapitools.client.models.*;
import org.openapitools.client.api.StoreApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
StoreApi apiInstance = new StoreApi(defaultClient);
String orderId = "orderId_example"; // String | ID of the order that needs to be deleted
try {
ApiResponse<Void> response = apiInstance.deleteOrderWithHttpInfo(orderId);
System.out.println("Status code: " + response.getStatusCode());
System.out.println("Response headers: " + response.getHeaders());
} catch (ApiException e) {
System.err.println("Exception when calling StoreApi#deleteOrder");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
System.err.println("Reason: " + e.getResponseBody());
e.printStackTrace();
}
}
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**orderId** | **String**| ID of the order that needs to be deleted |
### Return type
ApiResponse<Void>
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **400** | Invalid ID supplied | - |
| **404** | Order not found | - |
## getInventory
> Map<String, Integer> getInventory()
Returns pet inventories by status
Returns a map of status codes to quantities
### Example
```java
// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.auth.*;
import org.openapitools.client.models.*;
import org.openapitools.client.api.StoreApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
StoreApi apiInstance = new StoreApi(defaultClient);
try {
Map<String, Integer> result = apiInstance.getInventory();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling StoreApi#getInventory");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
**Map&lt;String, Integer&gt;**
### Authorization
[api_key](../README.md#api_key)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | successful operation | - |
## getInventoryWithHttpInfo
> ApiResponse<Map<String, Integer>> getInventory getInventoryWithHttpInfo()
Returns pet inventories by status
Returns a map of status codes to quantities
### Example
```java
// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.ApiResponse;
import org.openapitools.client.Configuration;
import org.openapitools.client.auth.*;
import org.openapitools.client.models.*;
import org.openapitools.client.api.StoreApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
StoreApi apiInstance = new StoreApi(defaultClient);
try {
ApiResponse<Map<String, Integer>> response = apiInstance.getInventoryWithHttpInfo();
System.out.println("Status code: " + response.getStatusCode());
System.out.println("Response headers: " + response.getHeaders());
System.out.println("Response body: " + response.getData());
} catch (ApiException e) {
System.err.println("Exception when calling StoreApi#getInventory");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
System.err.println("Reason: " + e.getResponseBody());
e.printStackTrace();
}
}
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
ApiResponse<**Map&lt;String, Integer&gt;**>
### Authorization
[api_key](../README.md#api_key)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | successful operation | - |
## getOrderById
> Order getOrderById(orderId)
Find purchase order by ID
For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
### Example
```java
// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.models.*;
import org.openapitools.client.api.StoreApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
StoreApi apiInstance = new StoreApi(defaultClient);
Long orderId = 56L; // Long | ID of pet that needs to be fetched
try {
Order result = apiInstance.getOrderById(orderId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling StoreApi#getOrderById");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**orderId** | **Long**| ID of pet that needs to be fetched |
### Return type
[**Order**](Order.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | successful operation | - |
| **400** | Invalid ID supplied | - |
| **404** | Order not found | - |
## getOrderByIdWithHttpInfo
> ApiResponse<Order> getOrderById getOrderByIdWithHttpInfo(orderId)
Find purchase order by ID
For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
### Example
```java
// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.ApiResponse;
import org.openapitools.client.Configuration;
import org.openapitools.client.models.*;
import org.openapitools.client.api.StoreApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
StoreApi apiInstance = new StoreApi(defaultClient);
Long orderId = 56L; // Long | ID of pet that needs to be fetched
try {
ApiResponse<Order> response = apiInstance.getOrderByIdWithHttpInfo(orderId);
System.out.println("Status code: " + response.getStatusCode());
System.out.println("Response headers: " + response.getHeaders());
System.out.println("Response body: " + response.getData());
} catch (ApiException e) {
System.err.println("Exception when calling StoreApi#getOrderById");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
System.err.println("Reason: " + e.getResponseBody());
e.printStackTrace();
}
}
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**orderId** | **Long**| ID of pet that needs to be fetched |
### Return type
ApiResponse<[**Order**](Order.md)>
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | successful operation | - |
| **400** | Invalid ID supplied | - |
| **404** | Order not found | - |
## placeOrder
> Order placeOrder(order)
Place an order for a pet
### Example
```java
// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.models.*;
import org.openapitools.client.api.StoreApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
StoreApi apiInstance = new StoreApi(defaultClient);
Order order = new Order(); // Order | order placed for purchasing the pet
try {
Order result = apiInstance.placeOrder(order);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling StoreApi#placeOrder");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**order** | [**Order**](Order.md)| order placed for purchasing the pet |
### Return type
[**Order**](Order.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/xml, application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | successful operation | - |
| **400** | Invalid Order | - |
## placeOrderWithHttpInfo
> ApiResponse<Order> placeOrder placeOrderWithHttpInfo(order)
Place an order for a pet
### Example
```java
// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.ApiResponse;
import org.openapitools.client.Configuration;
import org.openapitools.client.models.*;
import org.openapitools.client.api.StoreApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
StoreApi apiInstance = new StoreApi(defaultClient);
Order order = new Order(); // Order | order placed for purchasing the pet
try {
ApiResponse<Order> response = apiInstance.placeOrderWithHttpInfo(order);
System.out.println("Status code: " + response.getStatusCode());
System.out.println("Response headers: " + response.getHeaders());
System.out.println("Response body: " + response.getData());
} catch (ApiException e) {
System.err.println("Exception when calling StoreApi#placeOrder");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
System.err.println("Reason: " + e.getResponseBody());
e.printStackTrace();
}
}
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**order** | [**Order**](Order.md)| order placed for purchasing the pet |
### Return type
ApiResponse<[**Order**](Order.md)>
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/xml, application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | successful operation | - |
| **400** | Invalid Order | - |

View File

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

View File

@@ -0,0 +1,46 @@
# Triangle
## oneOf schemas
* [EquilateralTriangle](EquilateralTriangle.md)
* [IsoscelesTriangle](IsoscelesTriangle.md)
* [ScaleneTriangle](ScaleneTriangle.md)
## Example
```java
// Import classes:
import org.openapitools.client.model.Triangle;
import org.openapitools.client.model.EquilateralTriangle;
import org.openapitools.client.model.IsoscelesTriangle;
import org.openapitools.client.model.ScaleneTriangle;
public class Example {
public static void main(String[] args) {
Triangle exampleTriangle = new Triangle();
// create a new EquilateralTriangle
EquilateralTriangle exampleEquilateralTriangle = new EquilateralTriangle();
// set Triangle to EquilateralTriangle
exampleTriangle.setActualInstance(exampleEquilateralTriangle);
// to get back the EquilateralTriangle set earlier
EquilateralTriangle testEquilateralTriangle = (EquilateralTriangle) exampleTriangle.getActualInstance();
// create a new IsoscelesTriangle
IsoscelesTriangle exampleIsoscelesTriangle = new IsoscelesTriangle();
// set Triangle to IsoscelesTriangle
exampleTriangle.setActualInstance(exampleIsoscelesTriangle);
// to get back the IsoscelesTriangle set earlier
IsoscelesTriangle testIsoscelesTriangle = (IsoscelesTriangle) exampleTriangle.getActualInstance();
// create a new ScaleneTriangle
ScaleneTriangle exampleScaleneTriangle = new ScaleneTriangle();
// set Triangle to ScaleneTriangle
exampleTriangle.setActualInstance(exampleScaleneTriangle);
// to get back the ScaleneTriangle set earlier
ScaleneTriangle testScaleneTriangle = (ScaleneTriangle) exampleTriangle.getActualInstance();
}
}
```

View File

@@ -0,0 +1,12 @@
# TriangleInterface
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**triangleType** | **String** | |

View File

@@ -0,0 +1,23 @@
# User
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **Long** | | [optional]
**username** | **String** | | [optional]
**firstName** | **String** | | [optional]
**lastName** | **String** | | [optional]
**email** | **String** | | [optional]
**password** | **String** | | [optional]
**phone** | **String** | | [optional]
**userStatus** | **Integer** | User Status | [optional]
**objectWithNoDeclaredProps** | **Object** | test code generation for objects Value must be a map of strings to values. It cannot be the &#39;null&#39; value. | [optional]
**objectWithNoDeclaredPropsNullable** | **Object** | test code generation for nullable objects. Value must be a map of strings to values or the &#39;null&#39; value. | [optional]
**anyTypeProp** | **Object** | test code generation for any type Here the &#39;type&#39; attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 | [optional]
**anyTypePropNullable** | **Object** | test code generation for any type Here the &#39;type&#39; attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The &#39;nullable&#39; attribute does not change the allowed values. | [optional]

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,14 @@
# Whale
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**hasBaleen** | **Boolean** | | [optional]
**hasTeeth** | **Boolean** | | [optional]
**className** | **String** | |

View File

@@ -0,0 +1,23 @@
# Zebra
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**type** | [**TypeEnum**](#TypeEnum) | | [optional]
**className** | **String** | |
## Enum: TypeEnum
Name | Value
---- | -----
PLAINS | &quot;plains&quot;
MOUNTAIN | &quot;mountain&quot;
GREVYS | &quot;grevys&quot;