[Java] [Microprofile] Add Json-B polymorphism type info annotations (#20164)

* [Microprofile] Add Json-B polymorphism annotations

* [Microprofile] Set openApiNullable in configs to false

* [Microprofile] Bump JSON Bind version to 3.0

* [Microprofile] Only apply JSON-B polymorphism for MP 3.0

* Update samples

* [Microprofile] Update documentation/configs for openApiNullable

* Update docs
This commit is contained in:
DielN
2024-12-03 05:02:54 +01:00
committed by GitHub
parent 06f0b68eee
commit b9f6fe6b1f
572 changed files with 38137 additions and 525 deletions

View File

@@ -0,0 +1,14 @@
# AdditionalPropertiesClass
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**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

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

View File

@@ -0,0 +1,75 @@
# 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 |
## 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 | - |

View File

@@ -0,0 +1,13 @@
# ArrayOfArrayOfNumberOnly
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**arrayArrayNumber** | **List<List<BigDecimal>>** | | [optional] |

View File

@@ -0,0 +1,13 @@
# ArrayOfNumberOnly
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**arrayNumber** | **List<BigDecimal>** | | [optional] |

View File

@@ -0,0 +1,15 @@
# ArrayTest
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**arrayOfString** | **List<String>** | | [optional] |
|**arrayArrayOfInteger** | **List<List<Long>>** | | [optional] |
|**arrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] |

View File

@@ -0,0 +1,18 @@
# 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,13 @@
# Cat
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**declawed** | **Boolean** | | [optional] |

View File

@@ -2,14 +2,13 @@
# Category
A category for a pet
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**id** | **Long** | | [optional] |
|**name** | **String** | | [optional] |
|**name** | **String** | | |

View File

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

View File

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

View File

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

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 |
|-------------|-------------|------------------|
| **200** | response | - |

View File

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

View File

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

View File

@@ -0,0 +1,32 @@
# EnumArrays
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional] |
|**arrayEnum** | [**List<ArrayEnumEnum>**](#List<ArrayEnumEnum>) | | [optional] |
## Enum: JustSymbolEnum
| Name | Value |
|---- | -----|
| GREATER_THAN_OR_EQUAL_TO | ">=" |
| DOLLAR | "$" |
## Enum: List<ArrayEnumEnum>
| Name | Value |
|---- | -----|
| FISH | "fish" |
| CRAB | "crab" |

View File

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

View File

@@ -0,0 +1,58 @@
# EnumTest
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional] |
|**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | | |
|**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] |
|**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] |
|**outerEnum** | **OuterEnum** | | [optional] |
|**outerEnumInteger** | **OuterEnumInteger** | | [optional] |
|**outerEnumDefaultValue** | **OuterEnumDefaultValue** | | [optional] |
|**outerEnumIntegerDefaultValue** | **OuterEnumIntegerDefaultValue** | | [optional] |
## Enum: EnumStringEnum
| Name | Value |
|---- | -----|
| UPPER | "UPPER" |
| LOWER | "lower" |
| EMPTY | "" |
## Enum: EnumStringRequiredEnum
| Name | Value |
|---- | -----|
| UPPER | "UPPER" |
| LOWER | "lower" |
| EMPTY | "" |
## 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 |

File diff suppressed because it is too large Load Diff

View File

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

View File

@@ -0,0 +1,82 @@
# 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 |
## 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 | - |

View File

@@ -0,0 +1,14 @@
# FileSchemaTestClass
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**_file** | [**ModelFile**](ModelFile.md) | | [optional] |
|**files** | [**List<ModelFile>**](ModelFile.md) | | [optional] |

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

@@ -0,0 +1,28 @@
# FormatTest
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**integer** | **Integer** | | [optional] |
|**int32** | **Integer** | | [optional] |
|**int64** | **Long** | | [optional] |
|**number** | **BigDecimal** | | |
|**_float** | **Float** | | [optional] |
|**_double** | **Double** | | [optional] |
|**decimal** | **BigDecimal** | | [optional] |
|**string** | **String** | | [optional] |
|**_byte** | **byte[]** | | |
|**binary** | **File** | | [optional] |
|**date** | **Date** | | |
|**dateTime** | **Date** | | [optional] |
|**uuid** | **UUID** | | [optional] |
|**password** | **String** | | |
|**patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] |
|**patternWithDigitsAndDelimiter** | **String** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional] |

View File

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

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,25 @@
# MapTest
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**mapMapOfString** | **Map<String, Map<String, String>>** | | [optional] |
|**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] |
|**directMap** | **Map<String, Boolean>** | | [optional] |
|**indirectMap** | **Map<String, Boolean>** | | [optional] |
## Enum: Map<String, InnerEnum>
| Name | Value |
|---- | -----|
| UPPER | "UPPER" |
| LOWER | "lower" |

View File

@@ -0,0 +1,15 @@
# MixedPropertiesAndAdditionalPropertiesClass
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**uuid** | **UUID** | | [optional] |
|**dateTime** | **Date** | | [optional] |
|**map** | [**Map<String, Animal>**](Animal.md) | | [optional] |

View File

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

View File

@@ -2,7 +2,6 @@
# ModelApiResponse
Describes the result of uploading an image resource
## Properties

View File

@@ -0,0 +1,14 @@
# ModelFile
Must be named `File` for test.
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**sourceURI** | **String** | Test capitalization | [optional] |

View File

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

View File

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

View File

@@ -0,0 +1,17 @@
# 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,24 @@
# NullableClass
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**integerProp** | **Integer** | | [optional] |
|**numberProp** | **BigDecimal** | | [optional] |
|**booleanProp** | **Boolean** | | [optional] |
|**stringProp** | **String** | | [optional] |
|**dateProp** | **Date** | | [optional] |
|**datetimeProp** | **Date** | | [optional] |
|**arrayNullableProp** | **List<Object>** | | [optional] |
|**arrayAndItemsNullableProp** | **List<Object>** | | [optional] |
|**arrayItemsNullable** | **List<Object>** | | [optional] |
|**objectNullableProp** | **Map<String, Object>** | | [optional] |
|**objectAndItemsNullableProp** | **Map<String, Object>** | | [optional] |
|**objectItemsNullable** | **Map<String, Object>** | | [optional] |

View File

@@ -0,0 +1,13 @@
# NumberOnly
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**justNumber** | **BigDecimal** | | [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<String>** | | [optional] |

View File

@@ -2,7 +2,6 @@
# Order
An order for a pets from the pet store
## Properties

View File

@@ -0,0 +1,15 @@
# OuterComposite
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**myNumber** | **BigDecimal** | | [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,13 @@
# OuterObjectWithEnumProperty
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**value** | **OuterEnumInteger** | | |

View File

@@ -0,0 +1,22 @@
# ParentWithNullable
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**type** | [**TypeEnum**](#TypeEnum) | | [optional] |
|**nullableProperty** | **String** | | [optional] |
## Enum: TypeEnum
| Name | Value |
|---- | -----|
| CHILD_WITH_NULLABLE | "ChildWithNullable" |

View File

@@ -2,7 +2,6 @@
# Pet
A pet for sale in the pet store
## Properties
@@ -11,7 +10,7 @@ A pet for sale in the pet store
|**id** | **Long** | | [optional] |
|**category** | [**Category**](Category.md) | | [optional] |
|**name** | **String** | | |
|**photoUrls** | **List<String>** | | |
|**photoUrls** | **Set<String>** | | |
|**tags** | [**List<Tag>**](Tag.md) | | [optional] |
|**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] |

View File

@@ -1,6 +1,6 @@
# PetApi
All URIs are relative to *http://petstore.swagger.io/v2*
All URIs are relative to *http://petstore.swagger.io:80/v2*
| Method | HTTP request | Description |
|------------- | ------------- | -------------|
@@ -12,12 +12,13 @@ All URIs are relative to *http://petstore.swagger.io/v2*
| [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet |
| [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data |
| [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image |
| [**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) |
## addPet
> Pet addPet(pet)
> void addPet(pet)
Add a new pet to the store
@@ -37,7 +38,7 @@ import org.openapitools.client.api.PetApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io/v2");
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
// Configure OAuth2 access token for authorization: petstore_auth
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
@@ -46,7 +47,7 @@ public class Example {
PetApi apiInstance = new PetApi(defaultClient);
Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store
try {
Pet result = apiInstance.addPet(pet);
void result = apiInstance.addPet(pet);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PetApi#addPet");
@@ -68,7 +69,7 @@ public class Example {
### Return type
[**Pet**](Pet.md)
[**void**](Void.md)
### Authorization
@@ -77,13 +78,13 @@ public class Example {
### HTTP request headers
- **Content-Type**: application/json, application/xml
- **Accept**: application/xml, application/json
- **Accept**: Not defined
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | successful operation | - |
| **200** | Successful operation | - |
| **405** | Invalid input | - |
@@ -109,7 +110,7 @@ import org.openapitools.client.api.PetApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io/v2");
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
// Configure OAuth2 access token for authorization: petstore_auth
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
@@ -157,6 +158,7 @@ public class Example {
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Successful operation | - |
| **400** | Invalid pet value | - |
@@ -182,7 +184,7 @@ import org.openapitools.client.api.PetApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io/v2");
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
// Configure OAuth2 access token for authorization: petstore_auth
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
@@ -234,7 +236,7 @@ public class Example {
## findPetsByTags
> List<Pet> findPetsByTags(tags)
> Set<Pet> findPetsByTags(tags)
Finds Pets by tags
@@ -254,16 +256,16 @@ import org.openapitools.client.api.PetApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io/v2");
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
// Configure OAuth2 access token for authorization: petstore_auth
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
PetApi apiInstance = new PetApi(defaultClient);
List<String> tags = Arrays.asList(); // List<String> | Tags to filter by
Set<String> tags = Arrays.asList(); // Set<String> | Tags to filter by
try {
List<Pet> result = apiInstance.findPetsByTags(tags);
Set<Pet> result = apiInstance.findPetsByTags(tags);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PetApi#findPetsByTags");
@@ -281,11 +283,11 @@ public class Example {
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **tags** | [**List&lt;String&gt;**](String.md)| Tags to filter by | |
| **tags** | [**Set&lt;String&gt;**](String.md)| Tags to filter by | |
### Return type
[**List&lt;Pet&gt;**](Pet.md)
[**Set&lt;Pet&gt;**](Pet.md)
### Authorization
@@ -326,7 +328,7 @@ import org.openapitools.client.api.PetApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io/v2");
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
@@ -381,7 +383,7 @@ public class Example {
## updatePet
> Pet updatePet(pet)
> void updatePet(pet)
Update an existing pet
@@ -401,7 +403,7 @@ import org.openapitools.client.api.PetApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io/v2");
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
// Configure OAuth2 access token for authorization: petstore_auth
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
@@ -410,7 +412,7 @@ public class Example {
PetApi apiInstance = new PetApi(defaultClient);
Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store
try {
Pet result = apiInstance.updatePet(pet);
void result = apiInstance.updatePet(pet);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PetApi#updatePet");
@@ -432,7 +434,7 @@ public class Example {
### Return type
[**Pet**](Pet.md)
[**void**](Void.md)
### Authorization
@@ -441,13 +443,13 @@ public class Example {
### HTTP request headers
- **Content-Type**: application/json, application/xml
- **Accept**: application/xml, application/json
- **Accept**: Not defined
### 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 | - |
@@ -475,7 +477,7 @@ import org.openapitools.client.api.PetApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io/v2");
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
// Configure OAuth2 access token for authorization: petstore_auth
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
@@ -525,6 +527,7 @@ public class Example {
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Successful operation | - |
| **405** | Invalid input | - |
@@ -550,7 +553,7 @@ import org.openapitools.client.api.PetApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io/v2");
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
// Configure OAuth2 access token for authorization: petstore_auth
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
@@ -602,3 +605,78 @@ public class Example {
|-------------|-------------|------------------|
| **200** | successful operation | - |
## uploadFileWithRequiredFile
> ModelApiResponse uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata)
uploads an image (required)
### Example
```java
// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.auth.*;
import org.openapitools.client.models.*;
import org.openapitools.client.api.PetApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
// Configure OAuth2 access token for authorization: petstore_auth
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
PetApi apiInstance = new PetApi(defaultClient);
Long petId = 56L; // Long | ID of pet to update
File requiredFile = new File("/path/to/file"); // File | file to upload
String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server
try {
ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
```
### Parameters
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **petId** | **Long**| ID of pet to update | |
| **requiredFile** | **File**| file to upload | |
| **additionalMetadata** | **String**| Additional data to pass to server | [optional] |
### Return type
[**ModelApiResponse**](ModelApiResponse.md)
### Authorization
[petstore_auth](../README.md#petstore_auth)
### HTTP request headers
- **Content-Type**: multipart/form-data
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | successful operation | - |

View File

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

View File

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

View File

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

View File

@@ -1,12 +1,12 @@
# StoreApi
All URIs are relative to *http://petstore.swagger.io/v2*
All URIs are relative to *http://petstore.swagger.io:80/v2*
| Method | HTTP request | Description |
|------------- | ------------- | -------------|
| [**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID |
| [**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID |
| [**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status |
| [**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID |
| [**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID |
| [**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet |
@@ -32,7 +32,7 @@ import org.openapitools.client.api.StoreApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io/v2");
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
@@ -100,7 +100,7 @@ import org.openapitools.client.api.StoreApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io/v2");
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
@@ -168,7 +168,7 @@ import org.openapitools.client.api.StoreApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io/v2");
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
@@ -236,7 +236,7 @@ import org.openapitools.client.api.StoreApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io/v2");
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
StoreApi apiInstance = new StoreApi(defaultClient);
Order order = new Order(); // Order | order placed for purchasing the pet

View File

@@ -2,7 +2,6 @@
# Tag
A tag for a pet
## Properties

View File

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

View File

@@ -2,7 +2,6 @@
# User
A User who is purchasing from the pet store
## Properties

View File

@@ -1,6 +1,6 @@
# UserApi
All URIs are relative to *http://petstore.swagger.io/v2*
All URIs are relative to *http://petstore.swagger.io:80/v2*
| Method | HTTP request | Description |
|------------- | ------------- | -------------|
@@ -30,20 +30,13 @@ This can only be done by the logged in user.
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.auth.*;
import org.openapitools.client.models.*;
import org.openapitools.client.api.UserApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io/v2");
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
UserApi apiInstance = new UserApi(defaultClient);
User user = new User(); // User | Created user object
@@ -74,7 +67,7 @@ public class Example {
### Authorization
[api_key](../README.md#api_key)
No authorization required
### HTTP request headers
@@ -103,20 +96,13 @@ Creates list of users with given input array
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.auth.*;
import org.openapitools.client.models.*;
import org.openapitools.client.api.UserApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io/v2");
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
UserApi apiInstance = new UserApi(defaultClient);
List<User> user = Arrays.asList(); // List<User> | List of user object
@@ -147,7 +133,7 @@ public class Example {
### Authorization
[api_key](../README.md#api_key)
No authorization required
### HTTP request headers
@@ -176,20 +162,13 @@ Creates list of users with given input array
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.auth.*;
import org.openapitools.client.models.*;
import org.openapitools.client.api.UserApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io/v2");
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
UserApi apiInstance = new UserApi(defaultClient);
List<User> user = Arrays.asList(); // List<User> | List of user object
@@ -220,7 +199,7 @@ public class Example {
### Authorization
[api_key](../README.md#api_key)
No authorization required
### HTTP request headers
@@ -249,20 +228,13 @@ This can only be done by the logged in user.
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.auth.*;
import org.openapitools.client.models.*;
import org.openapitools.client.api.UserApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io/v2");
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
UserApi apiInstance = new UserApi(defaultClient);
String username = "username_example"; // String | The name that needs to be deleted
@@ -293,7 +265,7 @@ public class Example {
### Authorization
[api_key](../README.md#api_key)
No authorization required
### HTTP request headers
@@ -329,7 +301,7 @@ import org.openapitools.client.api.UserApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io/v2");
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
UserApi apiInstance = new UserApi(defaultClient);
String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing.
@@ -397,7 +369,7 @@ import org.openapitools.client.api.UserApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io/v2");
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
UserApi apiInstance = new UserApi(defaultClient);
String username = "username_example"; // String | The user name for login
@@ -441,7 +413,7 @@ No authorization required
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | successful operation | * Set-Cookie - Cookie authentication key for use with the &#x60;api_key&#x60; apiKey authentication. <br> * X-Rate-Limit - calls per hour allowed by the user <br> * X-Expires-After - date in UTC when token expires <br> |
| **200** | successful operation | * X-Rate-Limit - calls per hour allowed by the user <br> * X-Expires-After - date in UTC when token expires <br> |
| **400** | Invalid username/password supplied | - |
@@ -460,20 +432,13 @@ Logs out current logged in user session
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.auth.*;
import org.openapitools.client.models.*;
import org.openapitools.client.api.UserApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io/v2");
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
UserApi apiInstance = new UserApi(defaultClient);
try {
@@ -500,7 +465,7 @@ This endpoint does not need any parameter.
### Authorization
[api_key](../README.md#api_key)
No authorization required
### HTTP request headers
@@ -529,20 +494,13 @@ This can only be done by the logged in user.
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.auth.*;
import org.openapitools.client.models.*;
import org.openapitools.client.api.UserApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io/v2");
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
UserApi apiInstance = new UserApi(defaultClient);
String username = "username_example"; // String | name that need to be deleted
@@ -575,7 +533,7 @@ public class Example {
### Authorization
[api_key](../README.md#api_key)
No authorization required
### HTTP request headers