mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-10 17:32:43 +00:00
[java] Intro openApiNullable property to enable/disable OpenAPI Jackson Nullable library (#6154)
* Add option to prevent usage of jackson-nullable (#2901) Add a option for all java client and server to prevent usage of third party library (jackson-databind-nullable) which may be forbidden in some company Add samples for Vertx, Spring MVC, Spring Cloud, Feign and Play Upgrade dependencies for org.openapitools:jackson-databind-nullable * Samples - Remove dependency org.openapitools:jackson-databind-nullable (#2901) * Fix generation of gradle file for vertx (#2901) * Regenerate samples (#2901) * Fix documentation and up to date (#2901) * Fix forgotten regeneration of vertx after dependency integration (#2901) * Regenerate template after rebase (#2901) * Use yaml config files introduce in #6509 to manage samples (#2901) * Regenerate template using the config (#2901) * Fix bad version during testing generated samples (#2901) * Regenerate template after fix bad version (#2901) * Fix merge, allow for set importing on codegen model Co-authored-by: Jim Schubert <james.schubert@gmail.com>
This commit is contained in:
21
samples/client/petstore/java/vertx-no-nullable/.gitignore
vendored
Normal file
21
samples/client/petstore/java/vertx-no-nullable/.gitignore
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
*.class
|
||||
|
||||
# Mobile Tools for Java (J2ME)
|
||||
.mtj.tmp/
|
||||
|
||||
# Package Files #
|
||||
*.jar
|
||||
*.war
|
||||
*.ear
|
||||
|
||||
# exclude jar for gradle wrapper
|
||||
!gradle/wrapper/*.jar
|
||||
|
||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||
hs_err_pid*
|
||||
|
||||
# build files
|
||||
**/target
|
||||
target
|
||||
.gradle
|
||||
build
|
||||
@@ -0,0 +1,23 @@
|
||||
# OpenAPI Generator Ignore
|
||||
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
||||
|
||||
# Use this file to prevent files from being overwritten by the generator.
|
||||
# The patterns follow closely to .gitignore or .dockerignore.
|
||||
|
||||
# As an example, the C# client generator defines ApiClient.cs.
|
||||
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
||||
#ApiClient.cs
|
||||
|
||||
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
||||
#foo/*/qux
|
||||
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
||||
|
||||
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
||||
#foo/**/qux
|
||||
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
||||
|
||||
# You can also negate patterns with an exclamation (!).
|
||||
# For example, you can ignore all files in a docs folder with the file extension .md:
|
||||
#docs/*.md
|
||||
# Then explicitly reverse the ignore rule for a single file:
|
||||
#!docs/README.md
|
||||
@@ -0,0 +1,146 @@
|
||||
.gitignore
|
||||
.travis.yml
|
||||
README.md
|
||||
api/openapi.yaml
|
||||
build.gradle
|
||||
build.sbt
|
||||
docs/AdditionalPropertiesAnyType.md
|
||||
docs/AdditionalPropertiesArray.md
|
||||
docs/AdditionalPropertiesBoolean.md
|
||||
docs/AdditionalPropertiesClass.md
|
||||
docs/AdditionalPropertiesInteger.md
|
||||
docs/AdditionalPropertiesNumber.md
|
||||
docs/AdditionalPropertiesObject.md
|
||||
docs/AdditionalPropertiesString.md
|
||||
docs/Animal.md
|
||||
docs/AnotherFakeApi.md
|
||||
docs/ArrayOfArrayOfNumberOnly.md
|
||||
docs/ArrayOfNumberOnly.md
|
||||
docs/ArrayTest.md
|
||||
docs/BigCat.md
|
||||
docs/BigCatAllOf.md
|
||||
docs/Capitalization.md
|
||||
docs/Cat.md
|
||||
docs/CatAllOf.md
|
||||
docs/Category.md
|
||||
docs/ClassModel.md
|
||||
docs/Client.md
|
||||
docs/Dog.md
|
||||
docs/DogAllOf.md
|
||||
docs/EnumArrays.md
|
||||
docs/EnumClass.md
|
||||
docs/EnumTest.md
|
||||
docs/FakeApi.md
|
||||
docs/FakeClassnameTags123Api.md
|
||||
docs/FileSchemaTestClass.md
|
||||
docs/FormatTest.md
|
||||
docs/HasOnlyReadOnly.md
|
||||
docs/MapTest.md
|
||||
docs/MixedPropertiesAndAdditionalPropertiesClass.md
|
||||
docs/Model200Response.md
|
||||
docs/ModelApiResponse.md
|
||||
docs/ModelReturn.md
|
||||
docs/Name.md
|
||||
docs/NumberOnly.md
|
||||
docs/Order.md
|
||||
docs/OuterComposite.md
|
||||
docs/OuterEnum.md
|
||||
docs/Pet.md
|
||||
docs/PetApi.md
|
||||
docs/ReadOnlyFirst.md
|
||||
docs/SpecialModelName.md
|
||||
docs/StoreApi.md
|
||||
docs/Tag.md
|
||||
docs/TypeHolderDefault.md
|
||||
docs/TypeHolderExample.md
|
||||
docs/User.md
|
||||
docs/UserApi.md
|
||||
docs/XmlItem.md
|
||||
git_push.sh
|
||||
gradle.properties
|
||||
gradle/wrapper/gradle-wrapper.jar
|
||||
gradle/wrapper/gradle-wrapper.properties
|
||||
gradlew
|
||||
gradlew.bat
|
||||
pom.xml
|
||||
settings.gradle
|
||||
src/main/AndroidManifest.xml
|
||||
src/main/java/org/openapitools/client/ApiClient.java
|
||||
src/main/java/org/openapitools/client/ApiException.java
|
||||
src/main/java/org/openapitools/client/Configuration.java
|
||||
src/main/java/org/openapitools/client/CustomInstantDeserializer.java
|
||||
src/main/java/org/openapitools/client/Pair.java
|
||||
src/main/java/org/openapitools/client/RFC3339DateFormat.java
|
||||
src/main/java/org/openapitools/client/ServerConfiguration.java
|
||||
src/main/java/org/openapitools/client/ServerVariable.java
|
||||
src/main/java/org/openapitools/client/StringUtil.java
|
||||
src/main/java/org/openapitools/client/api/AnotherFakeApi.java
|
||||
src/main/java/org/openapitools/client/api/AnotherFakeApiImpl.java
|
||||
src/main/java/org/openapitools/client/api/FakeApi.java
|
||||
src/main/java/org/openapitools/client/api/FakeApiImpl.java
|
||||
src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java
|
||||
src/main/java/org/openapitools/client/api/FakeClassnameTags123ApiImpl.java
|
||||
src/main/java/org/openapitools/client/api/PetApi.java
|
||||
src/main/java/org/openapitools/client/api/PetApiImpl.java
|
||||
src/main/java/org/openapitools/client/api/StoreApi.java
|
||||
src/main/java/org/openapitools/client/api/StoreApiImpl.java
|
||||
src/main/java/org/openapitools/client/api/UserApi.java
|
||||
src/main/java/org/openapitools/client/api/UserApiImpl.java
|
||||
src/main/java/org/openapitools/client/api/rxjava/AnotherFakeApi.java
|
||||
src/main/java/org/openapitools/client/api/rxjava/FakeApi.java
|
||||
src/main/java/org/openapitools/client/api/rxjava/FakeClassnameTags123Api.java
|
||||
src/main/java/org/openapitools/client/api/rxjava/PetApi.java
|
||||
src/main/java/org/openapitools/client/api/rxjava/StoreApi.java
|
||||
src/main/java/org/openapitools/client/api/rxjava/UserApi.java
|
||||
src/main/java/org/openapitools/client/auth/ApiKeyAuth.java
|
||||
src/main/java/org/openapitools/client/auth/Authentication.java
|
||||
src/main/java/org/openapitools/client/auth/HttpBasicAuth.java
|
||||
src/main/java/org/openapitools/client/auth/HttpBearerAuth.java
|
||||
src/main/java/org/openapitools/client/auth/OAuth.java
|
||||
src/main/java/org/openapitools/client/auth/OAuthFlow.java
|
||||
src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java
|
||||
src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java
|
||||
src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java
|
||||
src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
|
||||
src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java
|
||||
src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java
|
||||
src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java
|
||||
src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java
|
||||
src/main/java/org/openapitools/client/model/Animal.java
|
||||
src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java
|
||||
src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java
|
||||
src/main/java/org/openapitools/client/model/ArrayTest.java
|
||||
src/main/java/org/openapitools/client/model/BigCat.java
|
||||
src/main/java/org/openapitools/client/model/BigCatAllOf.java
|
||||
src/main/java/org/openapitools/client/model/Capitalization.java
|
||||
src/main/java/org/openapitools/client/model/Cat.java
|
||||
src/main/java/org/openapitools/client/model/CatAllOf.java
|
||||
src/main/java/org/openapitools/client/model/Category.java
|
||||
src/main/java/org/openapitools/client/model/ClassModel.java
|
||||
src/main/java/org/openapitools/client/model/Client.java
|
||||
src/main/java/org/openapitools/client/model/Dog.java
|
||||
src/main/java/org/openapitools/client/model/DogAllOf.java
|
||||
src/main/java/org/openapitools/client/model/EnumArrays.java
|
||||
src/main/java/org/openapitools/client/model/EnumClass.java
|
||||
src/main/java/org/openapitools/client/model/EnumTest.java
|
||||
src/main/java/org/openapitools/client/model/FileSchemaTestClass.java
|
||||
src/main/java/org/openapitools/client/model/FormatTest.java
|
||||
src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java
|
||||
src/main/java/org/openapitools/client/model/MapTest.java
|
||||
src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java
|
||||
src/main/java/org/openapitools/client/model/Model200Response.java
|
||||
src/main/java/org/openapitools/client/model/ModelApiResponse.java
|
||||
src/main/java/org/openapitools/client/model/ModelReturn.java
|
||||
src/main/java/org/openapitools/client/model/Name.java
|
||||
src/main/java/org/openapitools/client/model/NumberOnly.java
|
||||
src/main/java/org/openapitools/client/model/Order.java
|
||||
src/main/java/org/openapitools/client/model/OuterComposite.java
|
||||
src/main/java/org/openapitools/client/model/OuterEnum.java
|
||||
src/main/java/org/openapitools/client/model/Pet.java
|
||||
src/main/java/org/openapitools/client/model/ReadOnlyFirst.java
|
||||
src/main/java/org/openapitools/client/model/SpecialModelName.java
|
||||
src/main/java/org/openapitools/client/model/Tag.java
|
||||
src/main/java/org/openapitools/client/model/TypeHolderDefault.java
|
||||
src/main/java/org/openapitools/client/model/TypeHolderExample.java
|
||||
src/main/java/org/openapitools/client/model/User.java
|
||||
src/main/java/org/openapitools/client/model/XmlItem.java
|
||||
@@ -0,0 +1 @@
|
||||
5.0.0-SNAPSHOT
|
||||
22
samples/client/petstore/java/vertx-no-nullable/.travis.yml
Normal file
22
samples/client/petstore/java/vertx-no-nullable/.travis.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
#
|
||||
# Generated by OpenAPI Generator: https://openapi-generator.tech
|
||||
#
|
||||
# Ref: https://docs.travis-ci.com/user/languages/java/
|
||||
#
|
||||
language: java
|
||||
jdk:
|
||||
- openjdk12
|
||||
- openjdk11
|
||||
- openjdk10
|
||||
- openjdk9
|
||||
- openjdk8
|
||||
before_install:
|
||||
# ensure gradlew has proper permission
|
||||
- chmod a+x ./gradlew
|
||||
script:
|
||||
# test using maven
|
||||
#- mvn test
|
||||
# test using gradle
|
||||
- gradle test
|
||||
# test using sbt
|
||||
# - sbt test
|
||||
238
samples/client/petstore/java/vertx-no-nullable/README.md
Normal file
238
samples/client/petstore/java/vertx-no-nullable/README.md
Normal file
@@ -0,0 +1,238 @@
|
||||
# petstore-vertx-no-nullable
|
||||
|
||||
OpenAPI Petstore
|
||||
|
||||
- API version: 1.0.0
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
|
||||
*Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)*
|
||||
|
||||
## Requirements
|
||||
|
||||
Building the API client library requires:
|
||||
|
||||
1. Java 1.8+
|
||||
2. Maven/Gradle
|
||||
|
||||
## Installation
|
||||
|
||||
To install the API client library to your local Maven repository, simply execute:
|
||||
|
||||
```shell
|
||||
mvn clean install
|
||||
```
|
||||
|
||||
To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
|
||||
|
||||
```shell
|
||||
mvn clean deploy
|
||||
```
|
||||
|
||||
Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information.
|
||||
|
||||
### Maven users
|
||||
|
||||
Add this dependency to your project's POM:
|
||||
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>petstore-vertx-no-nullable</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
### Gradle users
|
||||
|
||||
Add this dependency to your project's build file:
|
||||
|
||||
```groovy
|
||||
compile "org.openapitools:petstore-vertx-no-nullable:1.0.0"
|
||||
```
|
||||
|
||||
### Others
|
||||
|
||||
At first generate the JAR by executing:
|
||||
|
||||
```shell
|
||||
mvn clean package
|
||||
```
|
||||
|
||||
Then manually install the following JARs:
|
||||
|
||||
- `target/petstore-vertx-no-nullable-1.0.0.jar`
|
||||
- `target/lib/*.jar`
|
||||
|
||||
## Getting Started
|
||||
|
||||
Please follow the [installation](#installation) instruction and execute the following Java code:
|
||||
|
||||
```java
|
||||
|
||||
import org.openapitools.client.*;
|
||||
import org.openapitools.client.auth.*;
|
||||
import org.openapitools.client.model.*;
|
||||
import org.openapitools.client.api.AnotherFakeApi;
|
||||
|
||||
public class AnotherFakeApiExample {
|
||||
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
||||
|
||||
AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient);
|
||||
Client body = new Client(); // Client | client model
|
||||
try {
|
||||
Client result = apiInstance.call123testSpecialTags(body);
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
## Documentation for API Endpoints
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
*AnotherFakeApi* | [**call123testSpecialTags**](docs/AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
|
||||
*FakeApi* | [**createXmlItem**](docs/FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem
|
||||
*FakeApi* | [**fakeOuterBooleanSerialize**](docs/FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean |
|
||||
*FakeApi* | [**fakeOuterCompositeSerialize**](docs/FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite |
|
||||
*FakeApi* | [**fakeOuterNumberSerialize**](docs/FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number |
|
||||
*FakeApi* | [**fakeOuterStringSerialize**](docs/FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string |
|
||||
*FakeApi* | [**testBodyWithFileSchema**](docs/FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema |
|
||||
*FakeApi* | [**testBodyWithQueryParams**](docs/FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params |
|
||||
*FakeApi* | [**testClientModel**](docs/FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
|
||||
*FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
*FakeApi* | [**testEnumParameters**](docs/FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
|
||||
*FakeApi* | [**testGroupParameters**](docs/FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional)
|
||||
*FakeApi* | [**testInlineAdditionalProperties**](docs/FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
|
||||
*FakeApi* | [**testJsonFormData**](docs/FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||
*FakeApi* | [**testQueryParameterCollectionFormat**](docs/FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-paramters |
|
||||
*FakeClassnameTags123Api* | [**testClassname**](docs/FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case
|
||||
*PetApi* | [**addPet**](docs/PetApi.md#addPet) | **POST** /pet | Add a new pet to the store
|
||||
*PetApi* | [**deletePet**](docs/PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet
|
||||
*PetApi* | [**findPetsByStatus**](docs/PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
|
||||
*PetApi* | [**findPetsByTags**](docs/PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags
|
||||
*PetApi* | [**getPetById**](docs/PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID
|
||||
*PetApi* | [**updatePet**](docs/PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
|
||||
*PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||
*PetApi* | [**uploadFile**](docs/PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||
*PetApi* | [**uploadFileWithRequiredFile**](docs/PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
|
||||
*StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
|
||||
*StoreApi* | [**getInventory**](docs/StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status
|
||||
*StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID
|
||||
*StoreApi* | [**placeOrder**](docs/StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet
|
||||
*UserApi* | [**createUser**](docs/UserApi.md#createUser) | **POST** /user | Create user
|
||||
*UserApi* | [**createUsersWithArrayInput**](docs/UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array
|
||||
*UserApi* | [**createUsersWithListInput**](docs/UserApi.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array
|
||||
*UserApi* | [**deleteUser**](docs/UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user
|
||||
*UserApi* | [**getUserByName**](docs/UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name
|
||||
*UserApi* | [**loginUser**](docs/UserApi.md#loginUser) | **GET** /user/login | Logs user into the system
|
||||
*UserApi* | [**logoutUser**](docs/UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session
|
||||
*UserApi* | [**updateUser**](docs/UserApi.md#updateUser) | **PUT** /user/{username} | Updated user
|
||||
|
||||
|
||||
## Documentation for Models
|
||||
|
||||
- [AdditionalPropertiesAnyType](docs/AdditionalPropertiesAnyType.md)
|
||||
- [AdditionalPropertiesArray](docs/AdditionalPropertiesArray.md)
|
||||
- [AdditionalPropertiesBoolean](docs/AdditionalPropertiesBoolean.md)
|
||||
- [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md)
|
||||
- [AdditionalPropertiesInteger](docs/AdditionalPropertiesInteger.md)
|
||||
- [AdditionalPropertiesNumber](docs/AdditionalPropertiesNumber.md)
|
||||
- [AdditionalPropertiesObject](docs/AdditionalPropertiesObject.md)
|
||||
- [AdditionalPropertiesString](docs/AdditionalPropertiesString.md)
|
||||
- [Animal](docs/Animal.md)
|
||||
- [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
|
||||
- [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
|
||||
- [ArrayTest](docs/ArrayTest.md)
|
||||
- [BigCat](docs/BigCat.md)
|
||||
- [BigCatAllOf](docs/BigCatAllOf.md)
|
||||
- [Capitalization](docs/Capitalization.md)
|
||||
- [Cat](docs/Cat.md)
|
||||
- [CatAllOf](docs/CatAllOf.md)
|
||||
- [Category](docs/Category.md)
|
||||
- [ClassModel](docs/ClassModel.md)
|
||||
- [Client](docs/Client.md)
|
||||
- [Dog](docs/Dog.md)
|
||||
- [DogAllOf](docs/DogAllOf.md)
|
||||
- [EnumArrays](docs/EnumArrays.md)
|
||||
- [EnumClass](docs/EnumClass.md)
|
||||
- [EnumTest](docs/EnumTest.md)
|
||||
- [FileSchemaTestClass](docs/FileSchemaTestClass.md)
|
||||
- [FormatTest](docs/FormatTest.md)
|
||||
- [HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
|
||||
- [MapTest](docs/MapTest.md)
|
||||
- [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md)
|
||||
- [Model200Response](docs/Model200Response.md)
|
||||
- [ModelApiResponse](docs/ModelApiResponse.md)
|
||||
- [ModelReturn](docs/ModelReturn.md)
|
||||
- [Name](docs/Name.md)
|
||||
- [NumberOnly](docs/NumberOnly.md)
|
||||
- [Order](docs/Order.md)
|
||||
- [OuterComposite](docs/OuterComposite.md)
|
||||
- [OuterEnum](docs/OuterEnum.md)
|
||||
- [Pet](docs/Pet.md)
|
||||
- [ReadOnlyFirst](docs/ReadOnlyFirst.md)
|
||||
- [SpecialModelName](docs/SpecialModelName.md)
|
||||
- [Tag](docs/Tag.md)
|
||||
- [TypeHolderDefault](docs/TypeHolderDefault.md)
|
||||
- [TypeHolderExample](docs/TypeHolderExample.md)
|
||||
- [User](docs/User.md)
|
||||
- [XmlItem](docs/XmlItem.md)
|
||||
|
||||
|
||||
## Documentation for Authorization
|
||||
|
||||
Authentication schemes defined for the API:
|
||||
### api_key
|
||||
|
||||
|
||||
- **Type**: API key
|
||||
- **API key parameter name**: api_key
|
||||
- **Location**: HTTP header
|
||||
|
||||
### api_key_query
|
||||
|
||||
|
||||
- **Type**: API key
|
||||
- **API key parameter name**: api_key_query
|
||||
- **Location**: URL query string
|
||||
|
||||
### http_basic_test
|
||||
|
||||
|
||||
- **Type**: HTTP basic authentication
|
||||
|
||||
### petstore_auth
|
||||
|
||||
|
||||
- **Type**: OAuth
|
||||
- **Flow**: implicit
|
||||
- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
|
||||
- **Scopes**:
|
||||
- write:pets: modify pets in your account
|
||||
- read:pets: read your pets
|
||||
|
||||
|
||||
## Recommendation
|
||||
|
||||
It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues.
|
||||
|
||||
## Author
|
||||
|
||||
|
||||
|
||||
2190
samples/client/petstore/java/vertx-no-nullable/api/openapi.yaml
Normal file
2190
samples/client/petstore/java/vertx-no-nullable/api/openapi.yaml
Normal file
File diff suppressed because it is too large
Load Diff
51
samples/client/petstore/java/vertx-no-nullable/build.gradle
Normal file
51
samples/client/petstore/java/vertx-no-nullable/build.gradle
Normal file
@@ -0,0 +1,51 @@
|
||||
apply plugin: 'idea'
|
||||
apply plugin: 'eclipse'
|
||||
|
||||
group = 'org.openapitools'
|
||||
version = '1.0.0'
|
||||
|
||||
repositories {
|
||||
maven { url "https://repo1.maven.org/maven2" }
|
||||
jcenter()
|
||||
}
|
||||
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'maven'
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
|
||||
install {
|
||||
repositories.mavenInstaller {
|
||||
pom.artifactId = 'petstore-vertx-no-nullable'
|
||||
}
|
||||
}
|
||||
|
||||
task execute(type:JavaExec) {
|
||||
main = System.getProperty('mainClass')
|
||||
classpath = sourceSets.main.runtimeClasspath
|
||||
}
|
||||
|
||||
ext {
|
||||
swagger_annotations_version = "1.5.21"
|
||||
jackson_version = "2.10.4"
|
||||
jackson_databind_version = "2.10.4"
|
||||
vertx_version = "3.4.2"
|
||||
junit_version = "4.13"
|
||||
jackson_threeten_version = "2.9.10"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
compile "com.google.code.findbugs:jsr305:3.0.2"
|
||||
compile "io.vertx:vertx-web-client:$vertx_version"
|
||||
compile "io.vertx:vertx-rx-java:$vertx_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
|
||||
compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
|
||||
compile "com.github.joschi.jackson:jackson-datatype-threetenbp:jackson_threeten_version"
|
||||
compile 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testCompile "junit:junit:$junit_version"
|
||||
testCompile "io.vertx:vertx-unit:$vertx_version"
|
||||
}
|
||||
1
samples/client/petstore/java/vertx-no-nullable/build.sbt
Normal file
1
samples/client/petstore/java/vertx-no-nullable/build.sbt
Normal file
@@ -0,0 +1 @@
|
||||
# TODO
|
||||
@@ -0,0 +1,12 @@
|
||||
|
||||
|
||||
# AdditionalPropertiesAnyType
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **String** | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
|
||||
|
||||
# AdditionalPropertiesArray
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **String** | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
|
||||
|
||||
# AdditionalPropertiesBoolean
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **String** | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
|
||||
|
||||
# AdditionalPropertiesClass
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**mapString** | **Map<String, String>** | | [optional]
|
||||
**mapNumber** | [**Map<String, BigDecimal>**](BigDecimal.md) | | [optional]
|
||||
**mapInteger** | **Map<String, Integer>** | | [optional]
|
||||
**mapBoolean** | **Map<String, Boolean>** | | [optional]
|
||||
**mapArrayInteger** | [**Map<String, List<Integer>>**](List.md) | | [optional]
|
||||
**mapArrayAnytype** | [**Map<String, List<Object>>**](List.md) | | [optional]
|
||||
**mapMapString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional]
|
||||
**mapMapAnytype** | [**Map<String, Map<String, Object>>**](Map.md) | | [optional]
|
||||
**anytype1** | **Object** | | [optional]
|
||||
**anytype2** | **Object** | | [optional]
|
||||
**anytype3** | **Object** | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
|
||||
|
||||
# AdditionalPropertiesInteger
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **String** | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
|
||||
|
||||
# AdditionalPropertiesNumber
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **String** | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
|
||||
|
||||
# AdditionalPropertiesObject
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **String** | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
|
||||
|
||||
# AdditionalPropertiesString
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **String** | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
|
||||
|
||||
# Animal
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**className** | **String** | |
|
||||
**color** | **String** | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
# 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(body)
|
||||
|
||||
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 body = new Client(); // Client | client model
|
||||
try {
|
||||
Client result = apiInstance.call123testSpecialTags(body);
|
||||
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
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**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 | - |
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
|
||||
|
||||
# ArrayOfArrayOfNumberOnly
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**arrayArrayNumber** | [**List<List<BigDecimal>>**](List.md) | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
|
||||
|
||||
# ArrayOfNumberOnly
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**arrayNumber** | [**List<BigDecimal>**](BigDecimal.md) | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
|
||||
|
||||
# ArrayTest
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**arrayOfString** | **List<String>** | | [optional]
|
||||
**arrayArrayOfInteger** | [**List<List<Long>>**](List.md) | | [optional]
|
||||
**arrayArrayOfModel** | [**List<List<ReadOnlyFirst>>**](List.md) | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
|
||||
# BigCat
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**kind** | [**KindEnum**](#KindEnum) | | [optional]
|
||||
|
||||
|
||||
|
||||
## Enum: KindEnum
|
||||
|
||||
Name | Value
|
||||
---- | -----
|
||||
LIONS | "lions"
|
||||
TIGERS | "tigers"
|
||||
LEOPARDS | "leopards"
|
||||
JAGUARS | "jaguars"
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
|
||||
# BigCatAllOf
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**kind** | [**KindEnum**](#KindEnum) | | [optional]
|
||||
|
||||
|
||||
|
||||
## Enum: KindEnum
|
||||
|
||||
Name | Value
|
||||
---- | -----
|
||||
LIONS | "lions"
|
||||
TIGERS | "tigers"
|
||||
LEOPARDS | "leopards"
|
||||
JAGUARS | "jaguars"
|
||||
|
||||
|
||||
|
||||
@@ -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]
|
||||
|
||||
|
||||
|
||||
12
samples/client/petstore/java/vertx-no-nullable/docs/Cat.md
Normal file
12
samples/client/petstore/java/vertx-no-nullable/docs/Cat.md
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
|
||||
# Cat
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**declawed** | **Boolean** | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
|
||||
|
||||
# CatAllOf
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**declawed** | **Boolean** | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
|
||||
|
||||
# Category
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **Long** | | [optional]
|
||||
**name** | **String** | |
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
|
||||
|
||||
# ClassModel
|
||||
|
||||
Model for testing model with \"_class\" property
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**propertyClass** | **String** | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
|
||||
|
||||
# Client
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**client** | **String** | | [optional]
|
||||
|
||||
|
||||
|
||||
12
samples/client/petstore/java/vertx-no-nullable/docs/Dog.md
Normal file
12
samples/client/petstore/java/vertx-no-nullable/docs/Dog.md
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
|
||||
# Dog
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**breed** | **String** | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
|
||||
|
||||
# DogAllOf
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**breed** | **String** | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
|
||||
|
||||
# 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"
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
|
||||
|
||||
# EnumClass
|
||||
|
||||
## Enum
|
||||
|
||||
|
||||
* `_ABC` (value: `"_abc"`)
|
||||
|
||||
* `_EFG` (value: `"-efg"`)
|
||||
|
||||
* `_XYZ_` (value: `"(xyz)"`)
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
|
||||
|
||||
# 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]
|
||||
|
||||
|
||||
|
||||
## 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
|
||||
|
||||
|
||||
|
||||
987
samples/client/petstore/java/vertx-no-nullable/docs/FakeApi.md
Normal file
987
samples/client/petstore/java/vertx-no-nullable/docs/FakeApi.md
Normal file
@@ -0,0 +1,987 @@
|
||||
# FakeApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**createXmlItem**](FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem
|
||||
[**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean |
|
||||
[**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite |
|
||||
[**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number |
|
||||
[**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string |
|
||||
[**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema |
|
||||
[**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params |
|
||||
[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
|
||||
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
|
||||
[**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional)
|
||||
[**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
|
||||
[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||
[**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-paramters |
|
||||
|
||||
|
||||
|
||||
## createXmlItem
|
||||
|
||||
> createXmlItem(xmlItem)
|
||||
|
||||
creates an XmlItem
|
||||
|
||||
this route creates an XmlItem
|
||||
|
||||
### Example
|
||||
|
||||
```java
|
||||
// Import classes:
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.Configuration;
|
||||
import org.openapitools.client.models.*;
|
||||
import org.openapitools.client.api.FakeApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
||||
|
||||
FakeApi apiInstance = new FakeApi(defaultClient);
|
||||
XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body
|
||||
try {
|
||||
apiInstance.createXmlItem(xmlItem);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#createXmlItem");
|
||||
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
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
||||
|
||||
## fakeOuterBooleanSerialize
|
||||
|
||||
> Boolean fakeOuterBooleanSerialize(body)
|
||||
|
||||
|
||||
|
||||
Test serialization of outer boolean types
|
||||
|
||||
### Example
|
||||
|
||||
```java
|
||||
// Import classes:
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.Configuration;
|
||||
import org.openapitools.client.models.*;
|
||||
import org.openapitools.client.api.FakeApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
||||
|
||||
FakeApi apiInstance = new FakeApi(defaultClient);
|
||||
Boolean body = true; // Boolean | Input boolean as post body
|
||||
try {
|
||||
Boolean result = apiInstance.fakeOuterBooleanSerialize(body);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | **Boolean**| Input boolean as post body | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
**Boolean**
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: */*
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | Output boolean | - |
|
||||
|
||||
|
||||
## fakeOuterCompositeSerialize
|
||||
|
||||
> OuterComposite fakeOuterCompositeSerialize(body)
|
||||
|
||||
|
||||
|
||||
Test serialization of object with outer number type
|
||||
|
||||
### Example
|
||||
|
||||
```java
|
||||
// Import classes:
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.Configuration;
|
||||
import org.openapitools.client.models.*;
|
||||
import org.openapitools.client.api.FakeApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
||||
|
||||
FakeApi apiInstance = new FakeApi(defaultClient);
|
||||
OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body
|
||||
try {
|
||||
OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**OuterComposite**](OuterComposite.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: */*
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | Output composite | - |
|
||||
|
||||
|
||||
## fakeOuterNumberSerialize
|
||||
|
||||
> BigDecimal fakeOuterNumberSerialize(body)
|
||||
|
||||
|
||||
|
||||
Test serialization of outer number types
|
||||
|
||||
### Example
|
||||
|
||||
```java
|
||||
// Import classes:
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.Configuration;
|
||||
import org.openapitools.client.models.*;
|
||||
import org.openapitools.client.api.FakeApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
||||
|
||||
FakeApi apiInstance = new FakeApi(defaultClient);
|
||||
BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body
|
||||
try {
|
||||
BigDecimal result = apiInstance.fakeOuterNumberSerialize(body);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | **BigDecimal**| Input number as post body | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**BigDecimal**](BigDecimal.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: */*
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | Output number | - |
|
||||
|
||||
|
||||
## fakeOuterStringSerialize
|
||||
|
||||
> String fakeOuterStringSerialize(body)
|
||||
|
||||
|
||||
|
||||
Test serialization of outer string types
|
||||
|
||||
### Example
|
||||
|
||||
```java
|
||||
// Import classes:
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.Configuration;
|
||||
import org.openapitools.client.models.*;
|
||||
import org.openapitools.client.api.FakeApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
||||
|
||||
FakeApi apiInstance = new FakeApi(defaultClient);
|
||||
String body = "body_example"; // String | Input string as post body
|
||||
try {
|
||||
String result = apiInstance.fakeOuterStringSerialize(body);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | **String**| Input string as post body | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
**String**
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: */*
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | Output string | - |
|
||||
|
||||
|
||||
## testBodyWithFileSchema
|
||||
|
||||
> testBodyWithFileSchema(body)
|
||||
|
||||
|
||||
|
||||
For this test, the body for this request much reference a schema named `File`.
|
||||
|
||||
### Example
|
||||
|
||||
```java
|
||||
// Import classes:
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.Configuration;
|
||||
import org.openapitools.client.models.*;
|
||||
import org.openapitools.client.api.FakeApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
||||
|
||||
FakeApi apiInstance = new FakeApi(defaultClient);
|
||||
FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass |
|
||||
try {
|
||||
apiInstance.testBodyWithFileSchema(body);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#testBodyWithFileSchema");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | Success | - |
|
||||
|
||||
|
||||
## testBodyWithQueryParams
|
||||
|
||||
> testBodyWithQueryParams(query, body)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```java
|
||||
// Import classes:
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.Configuration;
|
||||
import org.openapitools.client.models.*;
|
||||
import org.openapitools.client.api.FakeApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
||||
|
||||
FakeApi apiInstance = new FakeApi(defaultClient);
|
||||
String query = "query_example"; // String |
|
||||
User body = new User(); // User |
|
||||
try {
|
||||
apiInstance.testBodyWithQueryParams(query, body);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#testBodyWithQueryParams");
|
||||
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
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**query** | **String**| |
|
||||
**body** | [**User**](User.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | Success | - |
|
||||
|
||||
|
||||
## testClientModel
|
||||
|
||||
> Client testClientModel(body)
|
||||
|
||||
To test \"client\" model
|
||||
|
||||
To test \"client\" model
|
||||
|
||||
### Example
|
||||
|
||||
```java
|
||||
// Import classes:
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.Configuration;
|
||||
import org.openapitools.client.models.*;
|
||||
import org.openapitools.client.api.FakeApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
||||
|
||||
FakeApi apiInstance = new FakeApi(defaultClient);
|
||||
Client body = new Client(); // Client | client model
|
||||
try {
|
||||
Client result = apiInstance.testClientModel(body);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#testClientModel");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**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 | - |
|
||||
|
||||
|
||||
## testEndpointParameters
|
||||
|
||||
> testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback)
|
||||
|
||||
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
|
||||
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
|
||||
### Example
|
||||
|
||||
```java
|
||||
// Import classes:
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.Configuration;
|
||||
import org.openapitools.client.auth.*;
|
||||
import org.openapitools.client.models.*;
|
||||
import org.openapitools.client.api.FakeApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
||||
|
||||
// Configure HTTP basic authorization: http_basic_test
|
||||
HttpBasicAuth http_basic_test = (HttpBasicAuth) defaultClient.getAuthentication("http_basic_test");
|
||||
http_basic_test.setUsername("YOUR USERNAME");
|
||||
http_basic_test.setPassword("YOUR PASSWORD");
|
||||
|
||||
FakeApi apiInstance = new FakeApi(defaultClient);
|
||||
BigDecimal number = new BigDecimal(); // BigDecimal | None
|
||||
Double _double = 3.4D; // Double | None
|
||||
String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None
|
||||
byte[] _byte = null; // byte[] | None
|
||||
Integer integer = 56; // Integer | None
|
||||
Integer int32 = 56; // Integer | None
|
||||
Long int64 = 56L; // Long | None
|
||||
Float _float = 3.4F; // Float | None
|
||||
String string = "string_example"; // String | None
|
||||
AsyncFile binary = new AsyncFile(); // AsyncFile | None
|
||||
LocalDate date = new LocalDate(); // LocalDate | None
|
||||
OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None
|
||||
String password = "password_example"; // String | None
|
||||
String paramCallback = "paramCallback_example"; // String | None
|
||||
try {
|
||||
apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#testEndpointParameters");
|
||||
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
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**number** | **BigDecimal**| None |
|
||||
**_double** | **Double**| None |
|
||||
**patternWithoutDelimiter** | **String**| None |
|
||||
**_byte** | **byte[]**| None |
|
||||
**integer** | **Integer**| None | [optional]
|
||||
**int32** | **Integer**| None | [optional]
|
||||
**int64** | **Long**| None | [optional]
|
||||
**_float** | **Float**| None | [optional]
|
||||
**string** | **String**| None | [optional]
|
||||
**binary** | **AsyncFile**| None | [optional]
|
||||
**date** | **LocalDate**| None | [optional]
|
||||
**dateTime** | **OffsetDateTime**| None | [optional]
|
||||
**password** | **String**| None | [optional]
|
||||
**paramCallback** | **String**| None | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[http_basic_test](../README.md#http_basic_test)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **400** | Invalid username supplied | - |
|
||||
| **404** | User not found | - |
|
||||
|
||||
|
||||
## testEnumParameters
|
||||
|
||||
> testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString)
|
||||
|
||||
To test enum parameters
|
||||
|
||||
To test enum parameters
|
||||
|
||||
### Example
|
||||
|
||||
```java
|
||||
// Import classes:
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.Configuration;
|
||||
import org.openapitools.client.models.*;
|
||||
import org.openapitools.client.api.FakeApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
||||
|
||||
FakeApi apiInstance = new FakeApi(defaultClient);
|
||||
List<String> enumHeaderStringArray = Arrays.asList("$"); // List<String> | Header parameter enum test (string array)
|
||||
String enumHeaderString = "-efg"; // String | Header parameter enum test (string)
|
||||
List<String> enumQueryStringArray = Arrays.asList("$"); // List<String> | Query parameter enum test (string array)
|
||||
String enumQueryString = "-efg"; // String | Query parameter enum test (string)
|
||||
Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double)
|
||||
Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double)
|
||||
List<String> enumFormStringArray = "$"; // List<String> | Form parameter enum test (string array)
|
||||
String enumFormString = "-efg"; // String | Form parameter enum test (string)
|
||||
try {
|
||||
apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#testEnumParameters");
|
||||
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
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $]
|
||||
**enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)]
|
||||
**enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $]
|
||||
**enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)]
|
||||
**enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2]
|
||||
**enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2]
|
||||
**enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $]
|
||||
**enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)]
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **400** | Invalid request | - |
|
||||
| **404** | Not found | - |
|
||||
|
||||
|
||||
## testGroupParameters
|
||||
|
||||
> testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group)
|
||||
|
||||
Fake endpoint to test group parameters (optional)
|
||||
|
||||
Fake endpoint to test group parameters (optional)
|
||||
|
||||
### Example
|
||||
|
||||
```java
|
||||
// Import classes:
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.Configuration;
|
||||
import org.openapitools.client.models.*;
|
||||
import org.openapitools.client.api.FakeApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
||||
|
||||
FakeApi apiInstance = new FakeApi(defaultClient);
|
||||
Integer requiredStringGroup = 56; // Integer | Required String in group parameters
|
||||
Boolean requiredBooleanGroup = true; // Boolean | Required Boolean in group parameters
|
||||
Long requiredInt64Group = 56L; // Long | Required Integer in group parameters
|
||||
Integer stringGroup = 56; // Integer | String in group parameters
|
||||
Boolean booleanGroup = true; // Boolean | Boolean in group parameters
|
||||
Long int64Group = 56L; // Long | Integer in group parameters
|
||||
try {
|
||||
apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#testGroupParameters");
|
||||
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
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**requiredStringGroup** | **Integer**| Required String in group parameters |
|
||||
**requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters |
|
||||
**requiredInt64Group** | **Long**| Required Integer in group parameters |
|
||||
**stringGroup** | **Integer**| String in group parameters | [optional]
|
||||
**booleanGroup** | **Boolean**| Boolean in group parameters | [optional]
|
||||
**int64Group** | **Long**| Integer in group parameters | [optional]
|
||||
|
||||
### 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** | Someting wrong | - |
|
||||
|
||||
|
||||
## testInlineAdditionalProperties
|
||||
|
||||
> testInlineAdditionalProperties(param)
|
||||
|
||||
test inline additionalProperties
|
||||
|
||||
### Example
|
||||
|
||||
```java
|
||||
// Import classes:
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.Configuration;
|
||||
import org.openapitools.client.models.*;
|
||||
import org.openapitools.client.api.FakeApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
||||
|
||||
FakeApi apiInstance = new FakeApi(defaultClient);
|
||||
Map<String, String> param = new HashMap(); // Map<String, String> | request body
|
||||
try {
|
||||
apiInstance.testInlineAdditionalProperties(param);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties");
|
||||
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
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**param** | [**Map<String, String>**](String.md)| request body |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
||||
|
||||
## testJsonFormData
|
||||
|
||||
> testJsonFormData(param, param2)
|
||||
|
||||
test json serialization of form data
|
||||
|
||||
### Example
|
||||
|
||||
```java
|
||||
// Import classes:
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.Configuration;
|
||||
import org.openapitools.client.models.*;
|
||||
import org.openapitools.client.api.FakeApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
||||
|
||||
FakeApi apiInstance = new FakeApi(defaultClient);
|
||||
String param = "param_example"; // String | field1
|
||||
String param2 = "param2_example"; // String | field2
|
||||
try {
|
||||
apiInstance.testJsonFormData(param, param2);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#testJsonFormData");
|
||||
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
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**param** | **String**| field1 |
|
||||
**param2** | **String**| field2 |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
||||
|
||||
## testQueryParameterCollectionFormat
|
||||
|
||||
> testQueryParameterCollectionFormat(pipe, ioutil, http, url, context)
|
||||
|
||||
|
||||
|
||||
To test the collection format in query parameters
|
||||
|
||||
### Example
|
||||
|
||||
```java
|
||||
// Import classes:
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.Configuration;
|
||||
import org.openapitools.client.models.*;
|
||||
import org.openapitools.client.api.FakeApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
||||
|
||||
FakeApi apiInstance = new FakeApi(defaultClient);
|
||||
List<String> pipe = Arrays.asList(); // List<String> |
|
||||
List<String> ioutil = Arrays.asList(); // List<String> |
|
||||
List<String> http = Arrays.asList(); // List<String> |
|
||||
List<String> url = Arrays.asList(); // List<String> |
|
||||
List<String> context = Arrays.asList(); // List<String> |
|
||||
try {
|
||||
apiInstance.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#testQueryParameterCollectionFormat");
|
||||
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
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pipe** | [**List<String>**](String.md)| |
|
||||
**ioutil** | [**List<String>**](String.md)| |
|
||||
**http** | [**List<String>**](String.md)| |
|
||||
**url** | [**List<String>**](String.md)| |
|
||||
**context** | [**List<String>**](String.md)| |
|
||||
|
||||
### 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 |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | Success | - |
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
# 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(body)
|
||||
|
||||
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 body = new Client(); // Client | client model
|
||||
try {
|
||||
Client result = apiInstance.testClassname(body);
|
||||
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
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**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 | - |
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
|
||||
|
||||
# FileSchemaTestClass
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**file** | [**java.io.File**](java.io.File.md) | | [optional]
|
||||
**files** | [**List<java.io.File>**](java.io.File.md) | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
|
||||
|
||||
# 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** | [**AsyncFile**](AsyncFile.md) | | [optional]
|
||||
**date** | [**LocalDate**](LocalDate.md) | |
|
||||
**dateTime** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional]
|
||||
**uuid** | [**UUID**](UUID.md) | | [optional]
|
||||
**password** | **String** | |
|
||||
**bigDecimal** | [**BigDecimal**](BigDecimal.md) | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
|
||||
|
||||
# HasOnlyReadOnly
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**bar** | **String** | | [optional] [readonly]
|
||||
**foo** | **String** | | [optional] [readonly]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
|
||||
|
||||
# MapTest
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [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"
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
|
||||
|
||||
# MixedPropertiesAndAdditionalPropertiesClass
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**uuid** | [**UUID**](UUID.md) | | [optional]
|
||||
**dateTime** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional]
|
||||
**map** | [**Map<String, Animal>**](Animal.md) | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
|
||||
|
||||
# Model200Response
|
||||
|
||||
Model for testing model name starting with number
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **Integer** | | [optional]
|
||||
**propertyClass** | **String** | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
|
||||
|
||||
# ModelApiResponse
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**code** | **Integer** | | [optional]
|
||||
**type** | **String** | | [optional]
|
||||
**message** | **String** | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
|
||||
|
||||
# ModelReturn
|
||||
|
||||
Model for testing reserved words
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**_return** | **Integer** | | [optional]
|
||||
|
||||
|
||||
|
||||
16
samples/client/petstore/java/vertx-no-nullable/docs/Name.md
Normal file
16
samples/client/petstore/java/vertx-no-nullable/docs/Name.md
Normal 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]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
|
||||
|
||||
# NumberOnly
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**justNumber** | [**BigDecimal**](BigDecimal.md) | | [optional]
|
||||
|
||||
|
||||
|
||||
27
samples/client/petstore/java/vertx-no-nullable/docs/Order.md
Normal file
27
samples/client/petstore/java/vertx-no-nullable/docs/Order.md
Normal 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 | "placed"
|
||||
APPROVED | "approved"
|
||||
DELIVERED | "delivered"
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
|
||||
|
||||
# OuterComposite
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**myNumber** | [**BigDecimal**](BigDecimal.md) | | [optional]
|
||||
**myString** | **String** | | [optional]
|
||||
**myBoolean** | **Boolean** | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
|
||||
|
||||
# OuterEnum
|
||||
|
||||
## Enum
|
||||
|
||||
|
||||
* `PLACED` (value: `"placed"`)
|
||||
|
||||
* `APPROVED` (value: `"approved"`)
|
||||
|
||||
* `DELIVERED` (value: `"delivered"`)
|
||||
|
||||
|
||||
|
||||
27
samples/client/petstore/java/vertx-no-nullable/docs/Pet.md
Normal file
27
samples/client/petstore/java/vertx-no-nullable/docs/Pet.md
Normal file
@@ -0,0 +1,27 @@
|
||||
|
||||
|
||||
# Pet
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **Long** | | [optional]
|
||||
**category** | [**Category**](Category.md) | | [optional]
|
||||
**name** | **String** | |
|
||||
**photoUrls** | **Set<String>** | |
|
||||
**tags** | [**List<Tag>**](Tag.md) | | [optional]
|
||||
**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional]
|
||||
|
||||
|
||||
|
||||
## Enum: StatusEnum
|
||||
|
||||
Name | Value
|
||||
---- | -----
|
||||
AVAILABLE | "available"
|
||||
PENDING | "pending"
|
||||
SOLD | "sold"
|
||||
|
||||
|
||||
|
||||
656
samples/client/petstore/java/vertx-no-nullable/docs/PetApi.md
Normal file
656
samples/client/petstore/java/vertx-no-nullable/docs/PetApi.md
Normal file
@@ -0,0 +1,656 @@
|
||||
# PetApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**addPet**](PetApi.md#addPet) | **POST** /pet | Add a new pet to the store
|
||||
[**deletePet**](PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet
|
||||
[**findPetsByStatus**](PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
|
||||
[**findPetsByTags**](PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags
|
||||
[**getPetById**](PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID
|
||||
[**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
|
||||
|
||||
> addPet(body)
|
||||
|
||||
Add a new pet to the store
|
||||
|
||||
### 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);
|
||||
Pet body = new Pet(); // Pet | Pet object that needs to be added to the store
|
||||
try {
|
||||
apiInstance.addPet(body);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#addPet");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
| **405** | Invalid input | - |
|
||||
|
||||
|
||||
## deletePet
|
||||
|
||||
> deletePet(petId, apiKey)
|
||||
|
||||
Deletes 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.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 | Pet id to delete
|
||||
String apiKey = "apiKey_example"; // String |
|
||||
try {
|
||||
apiInstance.deletePet(petId, apiKey);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#deletePet");
|
||||
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**| Pet id to delete |
|
||||
**apiKey** | **String**| | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
| **400** | Invalid pet value | - |
|
||||
|
||||
|
||||
## findPetsByStatus
|
||||
|
||||
> List<Pet> findPetsByStatus(status)
|
||||
|
||||
Finds Pets by status
|
||||
|
||||
Multiple status values can be provided with comma separated strings
|
||||
|
||||
### 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);
|
||||
List<String> status = Arrays.asList("available"); // List<String> | Status values that need to be considered for filter
|
||||
try {
|
||||
List<Pet> result = apiInstance.findPetsByStatus(status);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#findPetsByStatus");
|
||||
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
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold]
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<Pet>**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### 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 status value | - |
|
||||
|
||||
|
||||
## findPetsByTags
|
||||
|
||||
> Set<Pet> findPetsByTags(tags)
|
||||
|
||||
Finds Pets by tags
|
||||
|
||||
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
|
||||
### 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);
|
||||
Set<String> tags = Arrays.asList(); // Set<String> | Tags to filter by
|
||||
try {
|
||||
Set<Pet> result = apiInstance.findPetsByTags(tags);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#findPetsByTags");
|
||||
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
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**tags** | [**Set<String>**](String.md)| Tags to filter by |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Set<Pet>**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### 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 tag value | - |
|
||||
|
||||
|
||||
## getPetById
|
||||
|
||||
> Pet getPetById(petId)
|
||||
|
||||
Find pet by ID
|
||||
|
||||
Returns a single pet
|
||||
|
||||
### 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 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");
|
||||
|
||||
PetApi apiInstance = new PetApi(defaultClient);
|
||||
Long petId = 56L; // Long | ID of pet to return
|
||||
try {
|
||||
Pet result = apiInstance.getPetById(petId);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#getPetById");
|
||||
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 return |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Pet**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key)
|
||||
|
||||
### 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** | Pet not found | - |
|
||||
|
||||
|
||||
## updatePet
|
||||
|
||||
> updatePet(body)
|
||||
|
||||
Update an existing pet
|
||||
|
||||
### 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);
|
||||
Pet body = new Pet(); // Pet | Pet object that needs to be added to the store
|
||||
try {
|
||||
apiInstance.updatePet(body);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#updatePet");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
| **400** | Invalid ID supplied | - |
|
||||
| **404** | Pet not found | - |
|
||||
| **405** | Validation exception | - |
|
||||
|
||||
|
||||
## updatePetWithForm
|
||||
|
||||
> updatePetWithForm(petId, name, status)
|
||||
|
||||
Updates a pet in the store with form data
|
||||
|
||||
### 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 that needs to be updated
|
||||
String name = "name_example"; // String | Updated name of the pet
|
||||
String status = "status_example"; // String | Updated status of the pet
|
||||
try {
|
||||
apiInstance.updatePetWithForm(petId, name, status);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#updatePetWithForm");
|
||||
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 that needs to be updated |
|
||||
**name** | **String**| Updated name of the pet | [optional]
|
||||
**status** | **String**| Updated status of the pet | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **405** | Invalid input | - |
|
||||
|
||||
|
||||
## uploadFile
|
||||
|
||||
> ModelApiResponse uploadFile(petId, additionalMetadata, file)
|
||||
|
||||
uploads an image
|
||||
|
||||
### 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
|
||||
String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server
|
||||
AsyncFile file = new AsyncFile(); // AsyncFile | file to upload
|
||||
try {
|
||||
ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#uploadFile");
|
||||
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 |
|
||||
**additionalMetadata** | **String**| Additional data to pass to server | [optional]
|
||||
**file** | **AsyncFile**| file to upload | [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 | - |
|
||||
|
||||
|
||||
## 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
|
||||
AsyncFile requiredFile = new AsyncFile(); // AsyncFile | 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** | **AsyncFile**| 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 | - |
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
|
||||
|
||||
# ReadOnlyFirst
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**bar** | **String** | | [optional] [readonly]
|
||||
**baz** | **String** | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
|
||||
|
||||
# SpecialModelName
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**$specialPropertyName** | **Long** | | [optional]
|
||||
|
||||
|
||||
|
||||
276
samples/client/petstore/java/vertx-no-nullable/docs/StoreApi.md
Normal file
276
samples/client/petstore/java/vertx-no-nullable/docs/StoreApi.md
Normal file
@@ -0,0 +1,276 @@
|
||||
# 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
|
||||
[**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status
|
||||
[**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
|
||||
|
||||
|
||||
|
||||
## deleteOrder
|
||||
|
||||
> deleteOrder(orderId)
|
||||
|
||||
Delete purchase order by ID
|
||||
|
||||
For valid response try integer IDs with value < 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 | - |
|
||||
|
||||
|
||||
## 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<String, Integer>**
|
||||
|
||||
### 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 <= 5 or > 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 | - |
|
||||
|
||||
|
||||
## placeOrder
|
||||
|
||||
> Order placeOrder(body)
|
||||
|
||||
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 body = new Order(); // Order | order placed for purchasing the pet
|
||||
try {
|
||||
Order result = apiInstance.placeOrder(body);
|
||||
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
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Order**](Order.md)| order placed for purchasing the pet |
|
||||
|
||||
### 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 Order | - |
|
||||
|
||||
13
samples/client/petstore/java/vertx-no-nullable/docs/Tag.md
Normal file
13
samples/client/petstore/java/vertx-no-nullable/docs/Tag.md
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
|
||||
# Tag
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **Long** | | [optional]
|
||||
**name** | **String** | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
|
||||
|
||||
# TypeHolderDefault
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**stringItem** | **String** | |
|
||||
**numberItem** | [**BigDecimal**](BigDecimal.md) | |
|
||||
**integerItem** | **Integer** | |
|
||||
**boolItem** | **Boolean** | |
|
||||
**arrayItem** | **List<Integer>** | |
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
|
||||
|
||||
# TypeHolderExample
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**stringItem** | **String** | |
|
||||
**numberItem** | [**BigDecimal**](BigDecimal.md) | |
|
||||
**floatItem** | **Float** | |
|
||||
**integerItem** | **Integer** | |
|
||||
**boolItem** | **Boolean** | |
|
||||
**arrayItem** | **List<Integer>** | |
|
||||
|
||||
|
||||
|
||||
19
samples/client/petstore/java/vertx-no-nullable/docs/User.md
Normal file
19
samples/client/petstore/java/vertx-no-nullable/docs/User.md
Normal file
@@ -0,0 +1,19 @@
|
||||
|
||||
|
||||
# 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]
|
||||
|
||||
|
||||
|
||||
525
samples/client/petstore/java/vertx-no-nullable/docs/UserApi.md
Normal file
525
samples/client/petstore/java/vertx-no-nullable/docs/UserApi.md
Normal file
@@ -0,0 +1,525 @@
|
||||
# UserApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**createUser**](UserApi.md#createUser) | **POST** /user | Create user
|
||||
[**createUsersWithArrayInput**](UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array
|
||||
[**createUsersWithListInput**](UserApi.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array
|
||||
[**deleteUser**](UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user
|
||||
[**getUserByName**](UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name
|
||||
[**loginUser**](UserApi.md#loginUser) | **GET** /user/login | Logs user into the system
|
||||
[**logoutUser**](UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session
|
||||
[**updateUser**](UserApi.md#updateUser) | **PUT** /user/{username} | Updated user
|
||||
|
||||
|
||||
|
||||
## createUser
|
||||
|
||||
> createUser(body)
|
||||
|
||||
Create user
|
||||
|
||||
This can only be done by the logged in user.
|
||||
|
||||
### 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.UserApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
||||
|
||||
UserApi apiInstance = new UserApi(defaultClient);
|
||||
User body = new User(); // User | Created user object
|
||||
try {
|
||||
apiInstance.createUser(body);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#createUser");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**User**](User.md)| Created user object |
|
||||
|
||||
### 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 |
|
||||
|-------------|-------------|------------------|
|
||||
| **0** | successful operation | - |
|
||||
|
||||
|
||||
## createUsersWithArrayInput
|
||||
|
||||
> createUsersWithArrayInput(body)
|
||||
|
||||
Creates list of users with given input array
|
||||
|
||||
### 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.UserApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
||||
|
||||
UserApi apiInstance = new UserApi(defaultClient);
|
||||
List<User> body = Arrays.asList(); // List<User> | List of user object
|
||||
try {
|
||||
apiInstance.createUsersWithArrayInput(body);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#createUsersWithArrayInput");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**List<User>**](User.md)| List of user object |
|
||||
|
||||
### 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 |
|
||||
|-------------|-------------|------------------|
|
||||
| **0** | successful operation | - |
|
||||
|
||||
|
||||
## createUsersWithListInput
|
||||
|
||||
> createUsersWithListInput(body)
|
||||
|
||||
Creates list of users with given input array
|
||||
|
||||
### 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.UserApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
||||
|
||||
UserApi apiInstance = new UserApi(defaultClient);
|
||||
List<User> body = Arrays.asList(); // List<User> | List of user object
|
||||
try {
|
||||
apiInstance.createUsersWithListInput(body);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#createUsersWithListInput");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**List<User>**](User.md)| List of user object |
|
||||
|
||||
### 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 |
|
||||
|-------------|-------------|------------------|
|
||||
| **0** | successful operation | - |
|
||||
|
||||
|
||||
## deleteUser
|
||||
|
||||
> deleteUser(username)
|
||||
|
||||
Delete user
|
||||
|
||||
This can only be done by the logged in user.
|
||||
|
||||
### 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.UserApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
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
|
||||
try {
|
||||
apiInstance.deleteUser(username);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#deleteUser");
|
||||
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
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **String**| The name 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 username supplied | - |
|
||||
| **404** | User not found | - |
|
||||
|
||||
|
||||
## getUserByName
|
||||
|
||||
> User getUserByName(username)
|
||||
|
||||
Get user by user name
|
||||
|
||||
### 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.UserApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
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.
|
||||
try {
|
||||
User result = apiInstance.getUserByName(username);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#getUserByName");
|
||||
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
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **String**| The name that needs to be fetched. Use user1 for testing. |
|
||||
|
||||
### Return type
|
||||
|
||||
[**User**](User.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 username supplied | - |
|
||||
| **404** | User not found | - |
|
||||
|
||||
|
||||
## loginUser
|
||||
|
||||
> String loginUser(username, password)
|
||||
|
||||
Logs user into the system
|
||||
|
||||
### 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.UserApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
||||
|
||||
UserApi apiInstance = new UserApi(defaultClient);
|
||||
String username = "username_example"; // String | The user name for login
|
||||
String password = "password_example"; // String | The password for login in clear text
|
||||
try {
|
||||
String result = apiInstance.loginUser(username, password);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#loginUser");
|
||||
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
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **String**| The user name for login |
|
||||
**password** | **String**| The password for login in clear text |
|
||||
|
||||
### Return type
|
||||
|
||||
**String**
|
||||
|
||||
### 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 | * 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 | - |
|
||||
|
||||
|
||||
## logoutUser
|
||||
|
||||
> logoutUser()
|
||||
|
||||
Logs out current logged in user session
|
||||
|
||||
### 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.UserApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
||||
|
||||
UserApi apiInstance = new UserApi(defaultClient);
|
||||
try {
|
||||
apiInstance.logoutUser();
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#logoutUser");
|
||||
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
|
||||
|
||||
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 |
|
||||
|-------------|-------------|------------------|
|
||||
| **0** | successful operation | - |
|
||||
|
||||
|
||||
## updateUser
|
||||
|
||||
> updateUser(username, body)
|
||||
|
||||
Updated user
|
||||
|
||||
This can only be done by the logged in user.
|
||||
|
||||
### 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.UserApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
||||
|
||||
UserApi apiInstance = new UserApi(defaultClient);
|
||||
String username = "username_example"; // String | name that need to be deleted
|
||||
User body = new User(); // User | Updated user object
|
||||
try {
|
||||
apiInstance.updateUser(username, body);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#updateUser");
|
||||
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
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **String**| name that need to be deleted |
|
||||
**body** | [**User**](User.md)| Updated user object |
|
||||
|
||||
### 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 user supplied | - |
|
||||
| **404** | User not found | - |
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
|
||||
|
||||
# XmlItem
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**attributeString** | **String** | | [optional]
|
||||
**attributeNumber** | [**BigDecimal**](BigDecimal.md) | | [optional]
|
||||
**attributeInteger** | **Integer** | | [optional]
|
||||
**attributeBoolean** | **Boolean** | | [optional]
|
||||
**wrappedArray** | **List<Integer>** | | [optional]
|
||||
**nameString** | **String** | | [optional]
|
||||
**nameNumber** | [**BigDecimal**](BigDecimal.md) | | [optional]
|
||||
**nameInteger** | **Integer** | | [optional]
|
||||
**nameBoolean** | **Boolean** | | [optional]
|
||||
**nameArray** | **List<Integer>** | | [optional]
|
||||
**nameWrappedArray** | **List<Integer>** | | [optional]
|
||||
**prefixString** | **String** | | [optional]
|
||||
**prefixNumber** | [**BigDecimal**](BigDecimal.md) | | [optional]
|
||||
**prefixInteger** | **Integer** | | [optional]
|
||||
**prefixBoolean** | **Boolean** | | [optional]
|
||||
**prefixArray** | **List<Integer>** | | [optional]
|
||||
**prefixWrappedArray** | **List<Integer>** | | [optional]
|
||||
**namespaceString** | **String** | | [optional]
|
||||
**namespaceNumber** | [**BigDecimal**](BigDecimal.md) | | [optional]
|
||||
**namespaceInteger** | **Integer** | | [optional]
|
||||
**namespaceBoolean** | **Boolean** | | [optional]
|
||||
**namespaceArray** | **List<Integer>** | | [optional]
|
||||
**namespaceWrappedArray** | **List<Integer>** | | [optional]
|
||||
**prefixNsString** | **String** | | [optional]
|
||||
**prefixNsNumber** | [**BigDecimal**](BigDecimal.md) | | [optional]
|
||||
**prefixNsInteger** | **Integer** | | [optional]
|
||||
**prefixNsBoolean** | **Boolean** | | [optional]
|
||||
**prefixNsArray** | **List<Integer>** | | [optional]
|
||||
**prefixNsWrappedArray** | **List<Integer>** | | [optional]
|
||||
|
||||
|
||||
|
||||
58
samples/client/petstore/java/vertx-no-nullable/git_push.sh
Normal file
58
samples/client/petstore/java/vertx-no-nullable/git_push.sh
Normal file
@@ -0,0 +1,58 @@
|
||||
#!/bin/sh
|
||||
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
||||
#
|
||||
# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com"
|
||||
|
||||
git_user_id=$1
|
||||
git_repo_id=$2
|
||||
release_note=$3
|
||||
git_host=$4
|
||||
|
||||
if [ "$git_host" = "" ]; then
|
||||
git_host="github.com"
|
||||
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
|
||||
fi
|
||||
|
||||
if [ "$git_user_id" = "" ]; then
|
||||
git_user_id="GIT_USER_ID"
|
||||
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
||||
fi
|
||||
|
||||
if [ "$git_repo_id" = "" ]; then
|
||||
git_repo_id="GIT_REPO_ID"
|
||||
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
||||
fi
|
||||
|
||||
if [ "$release_note" = "" ]; then
|
||||
release_note="Minor update"
|
||||
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
||||
fi
|
||||
|
||||
# Initialize the local directory as a Git repository
|
||||
git init
|
||||
|
||||
# Adds the files in the local repository and stages them for commit.
|
||||
git add .
|
||||
|
||||
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
||||
git commit -m "$release_note"
|
||||
|
||||
# Sets the new remote
|
||||
git_remote=`git remote`
|
||||
if [ "$git_remote" = "" ]; then # git remote not defined
|
||||
|
||||
if [ "$GIT_TOKEN" = "" ]; then
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
||||
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
|
||||
else
|
||||
git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
git pull origin master
|
||||
|
||||
# Pushes (Forces) the changes in the local repository up to the remote repository
|
||||
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
|
||||
git push origin master 2>&1 | grep -v 'To https'
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
# Uncomment to build for Android
|
||||
#target = android
|
||||
BIN
samples/client/petstore/java/vertx-no-nullable/gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
BIN
samples/client/petstore/java/vertx-no-nullable/gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
Binary file not shown.
5
samples/client/petstore/java/vertx-no-nullable/gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
5
samples/client/petstore/java/vertx-no-nullable/gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
183
samples/client/petstore/java/vertx-no-nullable/gradlew
vendored
Normal file
183
samples/client/petstore/java/vertx-no-nullable/gradlew
vendored
Normal file
@@ -0,0 +1,183 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
#
|
||||
# Copyright 2015 the original author or authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
##
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
# Need this for relative symlinks.
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`"/$link"
|
||||
fi
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
NONSTOP* )
|
||||
nonstop=true
|
||||
;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD="java"
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
MAX_FD="$MAX_FD_LIMIT"
|
||||
fi
|
||||
ulimit -n $MAX_FD
|
||||
if [ $? -ne 0 ] ; then
|
||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||
fi
|
||||
else
|
||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Darwin, add options to specify how the application appears in the dock
|
||||
if $darwin; then
|
||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
SEP=""
|
||||
for dir in $ROOTDIRSRAW ; do
|
||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||
SEP="|"
|
||||
done
|
||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||
# Add a user-defined pattern to the cygpath arguments
|
||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||
fi
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
i=0
|
||||
for arg in "$@" ; do
|
||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||
|
||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=`expr $i + 1`
|
||||
done
|
||||
case $i in
|
||||
0) set -- ;;
|
||||
1) set -- "$args0" ;;
|
||||
2) set -- "$args0" "$args1" ;;
|
||||
3) set -- "$args0" "$args1" "$args2" ;;
|
||||
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Escape application args
|
||||
save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
APP_ARGS=`save "$@"`
|
||||
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
100
samples/client/petstore/java/vertx-no-nullable/gradlew.bat
vendored
Normal file
100
samples/client/petstore/java/vertx-no-nullable/gradlew.bat
vendored
Normal file
@@ -0,0 +1,100 @@
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windows variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
set CMD_LINE_ARGS=
|
||||
set _SKIP=2
|
||||
|
||||
:win9xME_args_slurp
|
||||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
285
samples/client/petstore/java/vertx-no-nullable/pom.xml
Normal file
285
samples/client/petstore/java/vertx-no-nullable/pom.xml
Normal file
@@ -0,0 +1,285 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>petstore-vertx-no-nullable</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>petstore-vertx-no-nullable</name>
|
||||
<version>1.0.0</version>
|
||||
<url>https://github.com/openapitools/openapi-generator</url>
|
||||
<description>OpenAPI Java</description>
|
||||
<scm>
|
||||
<connection>scm:git:git@github.com:openapitools/openapi-generator.git</connection>
|
||||
<developerConnection>scm:git:git@github.com:openapitools/openapi-generator.git</developerConnection>
|
||||
<url>https://github.com/openapitools/openapi-generator</url>
|
||||
</scm>
|
||||
|
||||
<licenses>
|
||||
<license>
|
||||
<name>Unlicense</name>
|
||||
<url>https://www.apache.org/licenses/LICENSE-2.0.html</url>
|
||||
<distribution>repo</distribution>
|
||||
</license>
|
||||
</licenses>
|
||||
|
||||
<developers>
|
||||
<developer>
|
||||
<name>OpenAPI-Generator Contributors</name>
|
||||
<email>team@openapitools.org</email>
|
||||
<organization>OpenAPITools.org</organization>
|
||||
<organizationUrl>http://openapitools.org</organizationUrl>
|
||||
</developer>
|
||||
</developers>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-enforcer-plugin</artifactId>
|
||||
<version>3.0.0-M1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>enforce-maven</id>
|
||||
<goals>
|
||||
<goal>enforce</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<rules>
|
||||
<requireMavenVersion>
|
||||
<version>2.2.0</version>
|
||||
</requireMavenVersion>
|
||||
</rules>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>2.12</version>
|
||||
<configuration>
|
||||
<systemProperties>
|
||||
<property>
|
||||
<name>loggerPath</name>
|
||||
<value>conf/log4j.properties</value>
|
||||
</property>
|
||||
</systemProperties>
|
||||
<argLine>-Xms512m -Xmx1500m</argLine>
|
||||
<parallel>methods</parallel>
|
||||
<forkMode>pertest</forkMode>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>copy-dependencies</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${project.build.directory}/lib</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<!-- attach test jar -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>2.6</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
<goal>test-jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>build-helper-maven-plugin</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>add_sources</id>
|
||||
<phase>generate-sources</phase>
|
||||
<goals>
|
||||
<goal>add-source</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<sources>
|
||||
<source>src/main/java</source>
|
||||
</sources>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>add_test_sources</id>
|
||||
<phase>generate-test-sources</phase>
|
||||
<goals>
|
||||
<goal>add-test-source</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<sources>
|
||||
<source>src/test/java</source>
|
||||
</sources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.6.1</version>
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>3.1.1</version>
|
||||
<configuration>
|
||||
<doclint>none</doclint>
|
||||
<source>1.8</source>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-javadocs</id>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
<version>2.2.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-sources</id>
|
||||
<goals>
|
||||
<goal>jar-no-fork</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>sign-artifacts</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-gpg-plugin</artifactId>
|
||||
<version>1.5</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>sign-artifacts</id>
|
||||
<phase>verify</phase>
|
||||
<goals>
|
||||
<goal>sign</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
<version>${swagger-annotations-version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- @Nullable annotation -->
|
||||
<dependency>
|
||||
<groupId>com.google.code.findbugs</groupId>
|
||||
<artifactId>jsr305</artifactId>
|
||||
<version>3.0.2</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Vertx -->
|
||||
<dependency>
|
||||
<groupId>io.vertx</groupId>
|
||||
<artifactId>vertx-rx-java</artifactId>
|
||||
<version>${vertx-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.vertx</groupId>
|
||||
<artifactId>vertx-web-client</artifactId>
|
||||
<version>${vertx-version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- JSON processing: jackson -->
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-core</artifactId>
|
||||
<version>${jackson-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-annotations</artifactId>
|
||||
<version>${jackson-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
<version>${jackson-databind}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.datatype</groupId>
|
||||
<artifactId>jackson-datatype-jsr310</artifactId>
|
||||
<version>${jackson-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.joschi.jackson</groupId>
|
||||
<artifactId>jackson-datatype-threetenbp</artifactId>
|
||||
<version>${jackson-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.annotation</groupId>
|
||||
<artifactId>javax.annotation-api</artifactId>
|
||||
<version>${javax-annotation-version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- test dependencies -->
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>${junit-version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.vertx</groupId>
|
||||
<artifactId>vertx-unit</artifactId>
|
||||
<version>${vertx-version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<vertx-version>3.4.2</vertx-version>
|
||||
<swagger-annotations-version>1.5.22</swagger-annotations-version>
|
||||
<jackson-version>2.10.4</jackson-version>
|
||||
<jackson-databind>2.10.4</jackson-databind>
|
||||
<jackson-databind-nullable-version>0.2.1</jackson-databind-nullable-version>
|
||||
<javax-annotation-version>1.3.2</javax-annotation-version>
|
||||
<junit-version>4.13</junit-version>
|
||||
</properties>
|
||||
</project>
|
||||
@@ -0,0 +1 @@
|
||||
rootProject.name = "petstore-vertx-no-nullable"
|
||||
@@ -0,0 +1,3 @@
|
||||
<manifest package="org.openapitools.client" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<application />
|
||||
</manifest>
|
||||
@@ -0,0 +1,718 @@
|
||||
package org.openapitools.client;
|
||||
|
||||
import org.openapitools.client.auth.Authentication;
|
||||
import org.openapitools.client.auth.HttpBasicAuth;
|
||||
import org.openapitools.client.auth.HttpBearerAuth;
|
||||
import org.openapitools.client.auth.ApiKeyAuth;
|
||||
import org.openapitools.client.auth.OAuth;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.SerializationFeature;
|
||||
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
|
||||
import io.vertx.core.*;
|
||||
import io.vertx.core.buffer.Buffer;
|
||||
import io.vertx.core.file.AsyncFile;
|
||||
import io.vertx.core.file.FileSystem;
|
||||
import io.vertx.core.file.OpenOptions;
|
||||
import io.vertx.core.http.HttpHeaders;
|
||||
import io.vertx.core.http.HttpMethod;
|
||||
import io.vertx.core.json.DecodeException;
|
||||
import io.vertx.core.json.Json;
|
||||
import io.vertx.core.json.JsonObject;
|
||||
import io.vertx.ext.web.client.HttpRequest;
|
||||
import io.vertx.ext.web.client.HttpResponse;
|
||||
import io.vertx.ext.web.client.WebClient;
|
||||
import io.vertx.ext.web.client.WebClientOptions;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.util.*;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import static java.util.stream.Collectors.toMap;
|
||||
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
public class ApiClient {
|
||||
|
||||
private static final Pattern CONTENT_DISPOSITION_PATTERN = Pattern.compile("filename=['\"]?([^'\"\\s]+)['\"]?");
|
||||
private static final OpenOptions FILE_DOWNLOAD_OPTIONS = new OpenOptions().setCreate(true).setTruncateExisting(true);
|
||||
|
||||
private final Vertx vertx;
|
||||
private final JsonObject config;
|
||||
private final String identifier;
|
||||
|
||||
private MultiMap defaultHeaders = MultiMap.caseInsensitiveMultiMap();
|
||||
private MultiMap defaultCookies = MultiMap.caseInsensitiveMultiMap();
|
||||
private Map<String, Authentication> authentications;
|
||||
private String basePath = "http://petstore.swagger.io:80/v2";
|
||||
private DateFormat dateFormat;
|
||||
private ObjectMapper objectMapper;
|
||||
private String downloadsDir = "";
|
||||
private int timeout = -1;
|
||||
|
||||
public ApiClient(Vertx vertx, JsonObject config) {
|
||||
Objects.requireNonNull(vertx, "Vertx must not be null");
|
||||
Objects.requireNonNull(config, "Config must not be null");
|
||||
|
||||
this.vertx = vertx;
|
||||
|
||||
// Use RFC3339 format for date and datetime.
|
||||
// See http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14
|
||||
this.dateFormat = new RFC3339DateFormat();
|
||||
|
||||
// Use UTC as the default time zone.
|
||||
this.dateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
|
||||
|
||||
// Build object mapper
|
||||
this.objectMapper = new ObjectMapper();
|
||||
this.objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
|
||||
this.objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||
this.objectMapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, false);
|
||||
this.objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
|
||||
this.objectMapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING);
|
||||
this.objectMapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING);
|
||||
this.objectMapper.registerModule(new JavaTimeModule());
|
||||
this.objectMapper.setDateFormat(dateFormat);
|
||||
|
||||
// Setup authentications (key: authentication name, value: authentication).
|
||||
this.authentications = new HashMap<>();
|
||||
authentications.put("api_key", new ApiKeyAuth("header", "api_key"));
|
||||
authentications.put("api_key_query", new ApiKeyAuth("query", "api_key_query"));
|
||||
authentications.put("http_basic_test", new HttpBasicAuth());
|
||||
authentications.put("petstore_auth", new OAuth());
|
||||
// Prevent the authentications from being modified.
|
||||
this.authentications = Collections.unmodifiableMap(authentications);
|
||||
|
||||
// Configurations
|
||||
this.basePath = config.getString("basePath", this.basePath);
|
||||
this.downloadsDir = config.getString("downloadsDir", this.downloadsDir);
|
||||
this.config = config;
|
||||
this.identifier = UUID.randomUUID().toString();
|
||||
this.timeout = config.getInteger("timeout", -1);
|
||||
}
|
||||
|
||||
public Vertx getVertx() {
|
||||
return vertx;
|
||||
}
|
||||
|
||||
public ObjectMapper getObjectMapper() {
|
||||
return objectMapper;
|
||||
}
|
||||
|
||||
public ApiClient setObjectMapper(ObjectMapper objectMapper) {
|
||||
this.objectMapper = objectMapper;
|
||||
return this;
|
||||
}
|
||||
|
||||
public synchronized WebClient getWebClient() {
|
||||
String webClientIdentifier = "web-client-" + identifier;
|
||||
WebClient webClient = Vertx.currentContext().get(webClientIdentifier);
|
||||
if (webClient == null) {
|
||||
webClient = buildWebClient(vertx, config);
|
||||
Vertx.currentContext().put(webClientIdentifier, webClient);
|
||||
}
|
||||
return webClient;
|
||||
}
|
||||
|
||||
public String getBasePath() {
|
||||
return basePath;
|
||||
}
|
||||
|
||||
public ApiClient setBasePath(String basePath) {
|
||||
this.basePath = basePath;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDownloadsDir() {
|
||||
return downloadsDir;
|
||||
}
|
||||
|
||||
public ApiClient setDownloadsDir(String downloadsDir) {
|
||||
this.downloadsDir = downloadsDir;
|
||||
return this;
|
||||
}
|
||||
|
||||
public MultiMap getDefaultHeaders() {
|
||||
return defaultHeaders;
|
||||
}
|
||||
|
||||
public ApiClient addDefaultHeader(String key, String value) {
|
||||
defaultHeaders.add(key, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public MultiMap getDefaultCookies() {
|
||||
return defaultHeaders;
|
||||
}
|
||||
|
||||
public ApiClient addDefaultCookie(String key, String value) {
|
||||
defaultCookies.add(key, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get authentications (key: authentication name, value: authentication).
|
||||
*
|
||||
* @return Map of authentication object
|
||||
*/
|
||||
public Map<String, Authentication> getAuthentications() {
|
||||
return authentications;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get authentication for the given name.
|
||||
*
|
||||
* @param authName The authentication name
|
||||
* @return The authentication, null if not found
|
||||
*/
|
||||
public Authentication getAuthentication(String authName) {
|
||||
return authentications.get(authName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method to set access token for the first Bearer authentication.
|
||||
* @param bearerToken Bearer token
|
||||
*/
|
||||
public ApiClient setBearerToken(String bearerToken) {
|
||||
for (Authentication auth : authentications.values()) {
|
||||
if (auth instanceof HttpBearerAuth) {
|
||||
((HttpBearerAuth) auth).setBearerToken(bearerToken);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
throw new RuntimeException("No Bearer authentication configured!");
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method to set username for the first HTTP basic authentication.
|
||||
*
|
||||
* @param username Username
|
||||
*/
|
||||
public ApiClient setUsername(String username) {
|
||||
for (Authentication auth : authentications.values()) {
|
||||
if (auth instanceof HttpBasicAuth) {
|
||||
((HttpBasicAuth) auth).setUsername(username);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
throw new RuntimeException("No HTTP basic authentication configured!");
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method to set password for the first HTTP basic authentication.
|
||||
*
|
||||
* @param password Password
|
||||
*/
|
||||
public ApiClient setPassword(String password) {
|
||||
for (Authentication auth : authentications.values()) {
|
||||
if (auth instanceof HttpBasicAuth) {
|
||||
((HttpBasicAuth) auth).setPassword(password);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
throw new RuntimeException("No HTTP basic authentication configured!");
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method to set API key value for the first API key authentication.
|
||||
*
|
||||
* @param apiKey API key
|
||||
*/
|
||||
public ApiClient setApiKey(String apiKey) {
|
||||
for (Authentication auth : authentications.values()) {
|
||||
if (auth instanceof ApiKeyAuth) {
|
||||
((ApiKeyAuth) auth).setApiKey(apiKey);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
throw new RuntimeException("No API key authentication configured!");
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method to set API key prefix for the first API key authentication.
|
||||
*
|
||||
* @param apiKeyPrefix API key prefix
|
||||
*/
|
||||
public ApiClient setApiKeyPrefix(String apiKeyPrefix) {
|
||||
for (Authentication auth : authentications.values()) {
|
||||
if (auth instanceof ApiKeyAuth) {
|
||||
((ApiKeyAuth) auth).setApiKeyPrefix(apiKeyPrefix);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
throw new RuntimeException("No API key authentication configured!");
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method to set access token for the first OAuth2 authentication.
|
||||
*
|
||||
* @param accessToken Access token
|
||||
*/
|
||||
public ApiClient setAccessToken(String accessToken) {
|
||||
for (Authentication auth : authentications.values()) {
|
||||
if (auth instanceof OAuth) {
|
||||
((OAuth) auth).setAccessToken(accessToken);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
throw new RuntimeException("No OAuth2 authentication configured!");
|
||||
}
|
||||
|
||||
/**
|
||||
* Format the given Date object into string.
|
||||
*
|
||||
* @param date Date
|
||||
* @return Date in string format
|
||||
*/
|
||||
public String formatDate(Date date) {
|
||||
return dateFormat.format(date);
|
||||
}
|
||||
|
||||
/**
|
||||
* Format the given parameter object into string.
|
||||
*
|
||||
* @param param Object
|
||||
* @return Object in string format
|
||||
*/
|
||||
public String parameterToString(Object param) {
|
||||
if (param == null) {
|
||||
return "";
|
||||
} else if (param instanceof Date) {
|
||||
return formatDate((Date) param);
|
||||
} else if (param instanceof Collection) {
|
||||
StringBuilder b = new StringBuilder();
|
||||
for (Object o : (Collection) param) {
|
||||
if (b.length() > 0) {
|
||||
b.append(',');
|
||||
}
|
||||
b.append(String.valueOf(o));
|
||||
}
|
||||
return b.toString();
|
||||
} else {
|
||||
return String.valueOf(param);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Format to {@code Pair} objects.
|
||||
* @param collectionFormat Collection format
|
||||
* @param name Name
|
||||
* @param value Value
|
||||
* @return List of pairs
|
||||
*/
|
||||
public List<Pair> parameterToPairs(String collectionFormat, String name, Object value) {
|
||||
List<Pair> params = new ArrayList<Pair>();
|
||||
|
||||
// preconditions
|
||||
if (name == null || name.isEmpty() || value == null) return params;
|
||||
|
||||
Collection valueCollection;
|
||||
if (value instanceof Collection) {
|
||||
valueCollection = (Collection) value;
|
||||
} else {
|
||||
params.add(new Pair(name, parameterToString(value)));
|
||||
return params;
|
||||
}
|
||||
|
||||
if (valueCollection.isEmpty()) {
|
||||
return params;
|
||||
}
|
||||
|
||||
// get the collection format (default: csv)
|
||||
String format = (collectionFormat == null || collectionFormat.isEmpty() ? "csv" : collectionFormat);
|
||||
|
||||
// create the params based on the collection format
|
||||
if ("multi".equals(format)) {
|
||||
for (Object item : valueCollection) {
|
||||
params.add(new Pair(name, parameterToString(item)));
|
||||
}
|
||||
return params;
|
||||
}
|
||||
|
||||
String delimiter = ",";
|
||||
if ("csv".equals(format)) {
|
||||
delimiter = ",";
|
||||
} else if ("ssv".equals(format)) {
|
||||
delimiter = " ";
|
||||
} else if ("tsv".equals(format)) {
|
||||
delimiter = "\t";
|
||||
} else if ("pipes".equals(format)) {
|
||||
delimiter = "|";
|
||||
}
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (Object item : valueCollection) {
|
||||
sb.append(delimiter);
|
||||
sb.append(parameterToString(item));
|
||||
}
|
||||
|
||||
params.add(new Pair(name, sb.substring(1)));
|
||||
|
||||
return params;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the given MIME is a JSON MIME.
|
||||
* JSON MIME examples:
|
||||
* application/json
|
||||
* application/json; charset=UTF8
|
||||
* APPLICATION/JSON
|
||||
* application/vnd.company+json
|
||||
*
|
||||
* @param mime MIME
|
||||
* @return True if the MIME type is JSON
|
||||
*/
|
||||
private boolean isJsonMime(String mime) {
|
||||
String jsonMime = "(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$";
|
||||
return mime != null && (mime.matches(jsonMime) || mime.equalsIgnoreCase("application/json-patch+json"));
|
||||
}
|
||||
|
||||
/**
|
||||
* Select the Accept header's value from the given accepts array:
|
||||
* if JSON exists in the given array, use it;
|
||||
* otherwise use all of them (joining into a string)
|
||||
*
|
||||
* @param accepts The accepts array to select from
|
||||
* @return The Accept header to use. If the given array is empty,
|
||||
* null will be returned (not to set the Accept header explicitly).
|
||||
*/
|
||||
protected String selectHeaderAccept(String[] accepts) {
|
||||
if (accepts.length == 0) {
|
||||
return null;
|
||||
}
|
||||
for (String accept : accepts) {
|
||||
if (isJsonMime(accept)) {
|
||||
return accept;
|
||||
}
|
||||
}
|
||||
return StringUtil.join(accepts, ",");
|
||||
}
|
||||
|
||||
/**
|
||||
* Select the Content-Type header's value from the given array:
|
||||
* if JSON exists in the given array, use it;
|
||||
* otherwise use the first one of the array.
|
||||
*
|
||||
* @param contentTypes The Content-Type array to select from
|
||||
* @return The Content-Type header to use. If the given array is empty,
|
||||
* JSON will be used.
|
||||
*/
|
||||
protected String selectHeaderContentType(String[] contentTypes) {
|
||||
if (contentTypes.length == 0) {
|
||||
return "application/json";
|
||||
}
|
||||
for (String contentType : contentTypes) {
|
||||
if (isJsonMime(contentType)) {
|
||||
return contentType;
|
||||
}
|
||||
}
|
||||
return contentTypes[0];
|
||||
}
|
||||
|
||||
public void sendBody(HttpRequest<Buffer> request,
|
||||
Handler<AsyncResult<HttpResponse<Buffer>>> responseHandler,
|
||||
Object body) {
|
||||
if (body instanceof byte[]) {
|
||||
Buffer buffer = Buffer.buffer((byte[]) body);
|
||||
request.sendBuffer(buffer, responseHandler);
|
||||
} else if (body instanceof AsyncFile) {
|
||||
AsyncFile file = (AsyncFile) body;
|
||||
request.sendStream(file, responseHandler);
|
||||
} else {
|
||||
try {
|
||||
request.sendBuffer(Buffer.buffer(this.objectMapper.writeValueAsBytes(body)), responseHandler);
|
||||
} catch (JsonProcessingException jsonProcessingException) {
|
||||
responseHandler.handle(Future.failedFuture(jsonProcessingException));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Invoke API by sending HTTP request with the given options.
|
||||
*
|
||||
* @param <T> Type
|
||||
* @param path The sub-path of the HTTP URL
|
||||
* @param method The request method, one of "GET", "POST", "PUT", "HEAD" and "DELETE"
|
||||
* @param queryParams The query parameters
|
||||
* @param body The request body object
|
||||
* @param headerParams The header parameters
|
||||
* @param cookieParams The cookie parameters
|
||||
* @param formParams The form parameters
|
||||
* @param accepts The request's Accept headers
|
||||
* @param contentTypes The request's Content-Type headers
|
||||
* @param authNames The authentications to apply
|
||||
* @param authInfo The call specific auth override
|
||||
* @param returnType The return type into which to deserialize the response
|
||||
* @param resultHandler The asynchronous response handler
|
||||
*/
|
||||
public <T> void invokeAPI(String path, String method, List<Pair> queryParams, Object body, MultiMap headerParams,
|
||||
MultiMap cookieParams, Map<String, Object> formParams, String[] accepts, String[] contentTypes, String[] authNames, AuthInfo authInfo,
|
||||
TypeReference<T> returnType, Handler<AsyncResult<T>> resultHandler) {
|
||||
|
||||
updateParamsForAuth(authNames, authInfo, queryParams, headerParams, cookieParams);
|
||||
|
||||
if (accepts != null && accepts.length > 0) {
|
||||
headerParams.add(HttpHeaders.ACCEPT, selectHeaderAccept(accepts));
|
||||
}
|
||||
|
||||
if (contentTypes != null) {
|
||||
headerParams.add(HttpHeaders.CONTENT_TYPE, selectHeaderContentType(contentTypes));
|
||||
}
|
||||
|
||||
HttpMethod httpMethod = HttpMethod.valueOf(method);
|
||||
HttpRequest<Buffer> request = getWebClient().requestAbs(httpMethod, basePath + path);
|
||||
request.timeout(this.timeout);
|
||||
|
||||
if (httpMethod == HttpMethod.PATCH) {
|
||||
request.putHeader("X-HTTP-Method-Override", "PATCH");
|
||||
}
|
||||
|
||||
queryParams.forEach(entry -> {
|
||||
if (entry.getValue() != null) {
|
||||
request.addQueryParam(entry.getName(), entry.getValue());
|
||||
}
|
||||
});
|
||||
|
||||
headerParams.forEach(entry -> {
|
||||
if (entry.getValue() != null) {
|
||||
request.putHeader(entry.getKey(), entry.getValue());
|
||||
}
|
||||
});
|
||||
|
||||
defaultHeaders.forEach(entry -> {
|
||||
if (entry.getValue() != null) {
|
||||
request.putHeader(entry.getKey(), entry.getValue());
|
||||
}
|
||||
});
|
||||
|
||||
final MultiMap cookies = MultiMap.caseInsensitiveMultiMap().addAll(cookieParams).addAll(defaultCookies);
|
||||
request.putHeader("Cookie", buildCookieHeader(cookies));
|
||||
|
||||
Handler<AsyncResult<HttpResponse<Buffer>>> responseHandler = buildResponseHandler(returnType, resultHandler);
|
||||
if (body != null) {
|
||||
sendBody(request, responseHandler, body);
|
||||
} else if (formParams != null && !formParams.isEmpty()) {
|
||||
Map<String, String> formMap = formParams.entrySet().stream().collect(toMap(Map.Entry::getKey, entry -> parameterToString(entry.getValue())));
|
||||
MultiMap form = MultiMap.caseInsensitiveMultiMap().addAll(formMap);
|
||||
request.sendForm(form, responseHandler);
|
||||
} else {
|
||||
request.send(responseHandler);
|
||||
}
|
||||
}
|
||||
|
||||
private String buildCookieHeader(MultiMap cookies) {
|
||||
final StringBuilder cookieValue = new StringBuilder();
|
||||
String delimiter = "";
|
||||
for (final Map.Entry<String, String> entry : cookies.entries()) {
|
||||
if (entry.getValue() != null) {
|
||||
cookieValue.append(String.format("%s%s=%s", delimiter, entry.getKey(), entry.getValue()));
|
||||
delimiter = "; ";
|
||||
}
|
||||
}
|
||||
return cookieValue.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sanitize filename by removing path.
|
||||
* e.g. ../../sun.gif becomes sun.gif
|
||||
*
|
||||
* @param filename The filename to be sanitized
|
||||
* @return The sanitized filename
|
||||
*/
|
||||
protected String sanitizeFilename(String filename) {
|
||||
return filename.replaceAll(".*[/\\\\]", "");
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a filename from the given headers.
|
||||
* When the headers have no "Content-Disposition" information, a random UUID name is generated.
|
||||
*
|
||||
* @param headers The HTTP response headers
|
||||
* @return The filename
|
||||
*/
|
||||
protected String generateFilename(MultiMap headers) {
|
||||
String filename = UUID.randomUUID().toString();
|
||||
String contentDisposition = headers.get("Content-Disposition");
|
||||
if (contentDisposition != null && !contentDisposition.isEmpty()) {
|
||||
Matcher matcher = CONTENT_DISPOSITION_PATTERN.matcher(contentDisposition);
|
||||
if (matcher.find()) {
|
||||
filename = sanitizeFilename(matcher.group(1));
|
||||
}
|
||||
}
|
||||
return filename;
|
||||
}
|
||||
|
||||
/**
|
||||
* File Download handling.
|
||||
*
|
||||
* @param response The HTTP response
|
||||
* @param handler The response handler
|
||||
*/
|
||||
protected <T> void handleFileDownload(HttpResponse<Buffer> response, Handler<AsyncResult<T>> handler) {
|
||||
FileSystem fs = getVertx().fileSystem();
|
||||
|
||||
String filename = generateFilename(response.headers());
|
||||
Consumer<String> fileHandler = directory -> {
|
||||
fs.open(directory + filename, FILE_DOWNLOAD_OPTIONS, asyncFileResult -> {
|
||||
if (asyncFileResult.succeeded()) {
|
||||
AsyncFile asyncFile = asyncFileResult.result();
|
||||
asyncFile.write(response.bodyAsBuffer());
|
||||
//noinspection unchecked
|
||||
handler.handle(Future.succeededFuture((T) asyncFile));
|
||||
} else {
|
||||
handler.handle(ApiException.fail(asyncFileResult.cause()));
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
String dir = getDownloadsDir();
|
||||
if (dir != null && !dir.isEmpty()) {
|
||||
fs.mkdirs(dir, mkdirResult -> {
|
||||
String sanitizedFolder = dir.endsWith("/") ? dir : dir + "/";
|
||||
fileHandler.accept(sanitizedFolder);
|
||||
});
|
||||
} else {
|
||||
fileHandler.accept("");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Build a response handler for the HttpResponse.
|
||||
*
|
||||
* @param returnType The return type
|
||||
* @param handler The response handler
|
||||
* @return The HTTP response handler
|
||||
*/
|
||||
protected <T> Handler<AsyncResult<HttpResponse<Buffer>>> buildResponseHandler(TypeReference<T> returnType,
|
||||
Handler<AsyncResult<T>> handler) {
|
||||
return response -> {
|
||||
AsyncResult<T> result;
|
||||
if (response.succeeded()) {
|
||||
HttpResponse<Buffer> httpResponse = response.result();
|
||||
if (httpResponse.statusCode() / 100 == 2) {
|
||||
if (httpResponse.statusCode() == 204 || returnType == null) {
|
||||
result = Future.succeededFuture(null);
|
||||
} else {
|
||||
T resultContent = null;
|
||||
if ("byte[]".equals(returnType.getType().toString())) {
|
||||
resultContent = (T) httpResponse.body().getBytes();
|
||||
result = Future.succeededFuture(resultContent);
|
||||
} else if (AsyncFile.class.equals(returnType.getType())) {
|
||||
handleFileDownload(httpResponse, handler);
|
||||
return;
|
||||
} else {
|
||||
try {
|
||||
resultContent = this.objectMapper.readValue(httpResponse.bodyAsString(), returnType);
|
||||
result = Future.succeededFuture(resultContent);
|
||||
} catch (Exception e) {
|
||||
result = ApiException.fail(new DecodeException("Failed to decode:" + e.getMessage(), e));
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
result = ApiException.fail(httpResponse.statusMessage(), httpResponse.statusCode(), httpResponse.headers(), httpResponse.bodyAsString());
|
||||
}
|
||||
} else if (response.cause() instanceof ApiException) {
|
||||
result = Future.failedFuture(response.cause());
|
||||
} else {
|
||||
result = ApiException.fail(500, response.cause() != null ? response.cause().getMessage() : null);
|
||||
}
|
||||
handler.handle(result);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the WebClient used to make HTTP requests.
|
||||
*
|
||||
* @param vertx Vertx
|
||||
* @return WebClient
|
||||
*/
|
||||
protected WebClient buildWebClient(Vertx vertx, JsonObject config) {
|
||||
|
||||
if (!config.containsKey("userAgent")) {
|
||||
config.put("userAgent", "OpenAPI-Generator/1.0.0/java");
|
||||
}
|
||||
|
||||
return WebClient.create(vertx, new WebClientOptions(config));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Update query and header parameters based on authentication settings.
|
||||
*
|
||||
* @param authNames The authentications to apply
|
||||
*/
|
||||
protected void updateParamsForAuth(String[] authNames, AuthInfo authInfo, List<Pair> queryParams, MultiMap headerParams, MultiMap cookieParams) {
|
||||
for (String authName : authNames) {
|
||||
Authentication auth;
|
||||
if (authInfo != null && authInfo.authentications.containsKey(authName)) {
|
||||
auth = authInfo.authentications.get(authName);
|
||||
} else {
|
||||
auth = authentications.get(authName);
|
||||
}
|
||||
if (auth == null) throw new RuntimeException("Authentication undefined: " + authName);
|
||||
auth.applyToParams(queryParams, headerParams, cookieParams);
|
||||
}
|
||||
}
|
||||
|
||||
public static class AuthInfo {
|
||||
|
||||
private final Map<String, Authentication> authentications = new LinkedHashMap<>();
|
||||
|
||||
public void addApi_keyAuthentication(String apikey, String apiKeyPrefix) {
|
||||
ApiKeyAuth auth = new ApiKeyAuth("header","api_key");
|
||||
auth.setApiKey(apikey);
|
||||
auth.setApiKeyPrefix(apiKeyPrefix);
|
||||
authentications.put("api_key", auth);
|
||||
}
|
||||
|
||||
public void addApi_key_queryAuthentication(String apikey, String apiKeyPrefix) {
|
||||
ApiKeyAuth auth = new ApiKeyAuth("query","api_key_query");
|
||||
auth.setApiKey(apikey);
|
||||
auth.setApiKeyPrefix(apiKeyPrefix);
|
||||
authentications.put("api_key_query", auth);
|
||||
}
|
||||
|
||||
public void addHttp_basic_testAuthentication(String username, String password) {
|
||||
HttpBasicAuth auth = new HttpBasicAuth();
|
||||
auth.setUsername(username);
|
||||
auth.setPassword(password);
|
||||
authentications.put("http_basic_test", auth);
|
||||
}
|
||||
|
||||
public void addPetstore_authAuthentication(String accessToken) {
|
||||
OAuth auth = new OAuth();
|
||||
auth.setAccessToken(accessToken);
|
||||
authentications.put("petstore_auth", auth);
|
||||
}
|
||||
|
||||
public static AuthInfo forApi_keyAuthentication(String apikey, String apiKeyPrefix) {
|
||||
AuthInfo authInfo = new AuthInfo();
|
||||
authInfo.addApi_keyAuthentication(apikey, apiKeyPrefix);
|
||||
return authInfo;
|
||||
}
|
||||
|
||||
public static AuthInfo forApi_key_queryAuthentication(String apikey, String apiKeyPrefix) {
|
||||
AuthInfo authInfo = new AuthInfo();
|
||||
authInfo.addApi_key_queryAuthentication(apikey, apiKeyPrefix);
|
||||
return authInfo;
|
||||
}
|
||||
|
||||
public static AuthInfo forHttp_basic_test(String username, String password) {
|
||||
AuthInfo authInfo = new AuthInfo();
|
||||
authInfo.addHttp_basic_testAuthentication(username, password);
|
||||
return authInfo;
|
||||
}
|
||||
|
||||
public static AuthInfo forPetstore_authAuthentication(String accessToken) {
|
||||
AuthInfo authInfo = new AuthInfo();
|
||||
authInfo.addPetstore_authAuthentication(accessToken);
|
||||
return authInfo;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client;
|
||||
|
||||
import io.vertx.core.AsyncResult;
|
||||
import io.vertx.core.Future;
|
||||
import io.vertx.core.MultiMap;
|
||||
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
public class ApiException extends Exception {
|
||||
private int code = 0;
|
||||
private MultiMap responseHeaders = null;
|
||||
private String responseBody = null;
|
||||
|
||||
|
||||
public static <T> AsyncResult<T> fail(int failureCode, String message) {
|
||||
return Future.failedFuture(new ApiException(failureCode, message));
|
||||
}
|
||||
|
||||
public static <T> AsyncResult<T> fail(Throwable throwable) {
|
||||
return Future.failedFuture(new ApiException(throwable));
|
||||
}
|
||||
|
||||
public static <T> AsyncResult<T> fail(String message) {
|
||||
return Future.failedFuture(new ApiException(message));
|
||||
}
|
||||
|
||||
public static <T> AsyncResult<T> fail(String message, Throwable throwable, int code, MultiMap responseHeaders) {
|
||||
return Future.failedFuture(new ApiException(message, throwable, code, responseHeaders, null));
|
||||
}
|
||||
|
||||
public static <T> AsyncResult<T> fail(String message, Throwable throwable, int code, MultiMap responseHeaders, String responseBody) {
|
||||
return Future.failedFuture(new ApiException(message, throwable, code, responseHeaders, responseBody));
|
||||
}
|
||||
|
||||
public static <T> AsyncResult<T> fail(String message, int code, MultiMap responseHeaders, String responseBody) {
|
||||
return Future.failedFuture(new ApiException(message, (Throwable) null, code, responseHeaders, responseBody));
|
||||
}
|
||||
|
||||
public static <T> AsyncResult<T> fail(int code, MultiMap responseHeaders, String responseBody) {
|
||||
return Future.failedFuture(new ApiException((String) null, (Throwable) null, code, responseHeaders, responseBody));
|
||||
}
|
||||
|
||||
public ApiException() {}
|
||||
|
||||
public ApiException(Throwable throwable) {
|
||||
super(throwable);
|
||||
}
|
||||
|
||||
public ApiException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
public ApiException(String message, Throwable throwable, int code, MultiMap responseHeaders, String responseBody) {
|
||||
super(message, throwable);
|
||||
this.code = code;
|
||||
this.responseHeaders = responseHeaders;
|
||||
this.responseBody = responseBody;
|
||||
}
|
||||
|
||||
public ApiException(String message, int code, MultiMap responseHeaders, String responseBody) {
|
||||
this(message, (Throwable) null, code, responseHeaders, responseBody);
|
||||
}
|
||||
|
||||
public ApiException(String message, Throwable throwable, int code, MultiMap responseHeaders) {
|
||||
this(message, throwable, code, responseHeaders, null);
|
||||
}
|
||||
|
||||
public ApiException(int code, MultiMap responseHeaders, String responseBody) {
|
||||
this((String) null, (Throwable) null, code, responseHeaders, responseBody);
|
||||
}
|
||||
|
||||
public ApiException(int code, String message) {
|
||||
super(message);
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public ApiException(int code, String message, MultiMap responseHeaders, String responseBody) {
|
||||
this(code, message);
|
||||
this.responseHeaders = responseHeaders;
|
||||
this.responseBody = responseBody;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the HTTP status code.
|
||||
*
|
||||
* @return HTTP status code
|
||||
*/
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the HTTP response headers.
|
||||
*
|
||||
* @return A map of list of string
|
||||
*/
|
||||
public MultiMap getResponseHeaders() {
|
||||
return responseHeaders;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the HTTP response body.
|
||||
*
|
||||
* @return Response body in the form of string
|
||||
*/
|
||||
public String getResponseBody() {
|
||||
return responseBody;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package org.openapitools.client;
|
||||
|
||||
import io.vertx.core.Vertx;
|
||||
import io.vertx.core.json.JsonObject;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public class Configuration {
|
||||
|
||||
private static ApiClient defaultApiClient = null;
|
||||
|
||||
/**
|
||||
* Setup the default API client.
|
||||
* Will be used by API instances when a client is not provided.
|
||||
*
|
||||
* @return Default API client
|
||||
*/
|
||||
public synchronized static ApiClient setupDefaultApiClient(Vertx vertx, JsonObject config) {
|
||||
defaultApiClient = new ApiClient(vertx, config);
|
||||
return defaultApiClient;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the default API client, which would be used when creating API
|
||||
* instances without providing an API client.
|
||||
*
|
||||
* @return Default API client
|
||||
*/
|
||||
public synchronized static ApiClient getDefaultApiClient() {
|
||||
return defaultApiClient;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the default API client, which would be used when creating API
|
||||
* instances without providing an API client.
|
||||
*
|
||||
* @param apiClient API client
|
||||
*/
|
||||
public synchronized static void setDefaultApiClient(ApiClient apiClient) {
|
||||
defaultApiClient = apiClient;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,232 @@
|
||||
package org.openapitools.client;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonParser;
|
||||
import com.fasterxml.jackson.core.JsonTokenId;
|
||||
import com.fasterxml.jackson.databind.DeserializationContext;
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||
import com.fasterxml.jackson.databind.JsonDeserializer;
|
||||
import com.fasterxml.jackson.datatype.threetenbp.DecimalUtils;
|
||||
import com.fasterxml.jackson.datatype.threetenbp.deser.ThreeTenDateTimeDeserializerBase;
|
||||
import com.fasterxml.jackson.datatype.threetenbp.function.BiFunction;
|
||||
import com.fasterxml.jackson.datatype.threetenbp.function.Function;
|
||||
import org.threeten.bp.DateTimeException;
|
||||
import org.threeten.bp.DateTimeUtils;
|
||||
import org.threeten.bp.Instant;
|
||||
import org.threeten.bp.OffsetDateTime;
|
||||
import org.threeten.bp.ZoneId;
|
||||
import org.threeten.bp.ZonedDateTime;
|
||||
import org.threeten.bp.format.DateTimeFormatter;
|
||||
import org.threeten.bp.temporal.Temporal;
|
||||
import org.threeten.bp.temporal.TemporalAccessor;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* Deserializer for ThreeTen temporal {@link Instant}s, {@link OffsetDateTime}, and {@link ZonedDateTime}s.
|
||||
* Adapted from the jackson threetenbp InstantDeserializer to add support for deserializing rfc822 format.
|
||||
*
|
||||
* @author Nick Williams
|
||||
*/
|
||||
public class CustomInstantDeserializer<T extends Temporal>
|
||||
extends ThreeTenDateTimeDeserializerBase<T> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public static final CustomInstantDeserializer<Instant> INSTANT = new CustomInstantDeserializer<Instant>(
|
||||
Instant.class, DateTimeFormatter.ISO_INSTANT,
|
||||
new Function<TemporalAccessor, Instant>() {
|
||||
@Override
|
||||
public Instant apply(TemporalAccessor temporalAccessor) {
|
||||
return Instant.from(temporalAccessor);
|
||||
}
|
||||
},
|
||||
new Function<FromIntegerArguments, Instant>() {
|
||||
@Override
|
||||
public Instant apply(FromIntegerArguments a) {
|
||||
return Instant.ofEpochMilli(a.value);
|
||||
}
|
||||
},
|
||||
new Function<FromDecimalArguments, Instant>() {
|
||||
@Override
|
||||
public Instant apply(FromDecimalArguments a) {
|
||||
return Instant.ofEpochSecond(a.integer, a.fraction);
|
||||
}
|
||||
},
|
||||
null
|
||||
);
|
||||
|
||||
public static final CustomInstantDeserializer<OffsetDateTime> OFFSET_DATE_TIME = new CustomInstantDeserializer<OffsetDateTime>(
|
||||
OffsetDateTime.class, DateTimeFormatter.ISO_OFFSET_DATE_TIME,
|
||||
new Function<TemporalAccessor, OffsetDateTime>() {
|
||||
@Override
|
||||
public OffsetDateTime apply(TemporalAccessor temporalAccessor) {
|
||||
return OffsetDateTime.from(temporalAccessor);
|
||||
}
|
||||
},
|
||||
new Function<FromIntegerArguments, OffsetDateTime>() {
|
||||
@Override
|
||||
public OffsetDateTime apply(FromIntegerArguments a) {
|
||||
return OffsetDateTime.ofInstant(Instant.ofEpochMilli(a.value), a.zoneId);
|
||||
}
|
||||
},
|
||||
new Function<FromDecimalArguments, OffsetDateTime>() {
|
||||
@Override
|
||||
public OffsetDateTime apply(FromDecimalArguments a) {
|
||||
return OffsetDateTime.ofInstant(Instant.ofEpochSecond(a.integer, a.fraction), a.zoneId);
|
||||
}
|
||||
},
|
||||
new BiFunction<OffsetDateTime, ZoneId, OffsetDateTime>() {
|
||||
@Override
|
||||
public OffsetDateTime apply(OffsetDateTime d, ZoneId z) {
|
||||
return d.withOffsetSameInstant(z.getRules().getOffset(d.toLocalDateTime()));
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
public static final CustomInstantDeserializer<ZonedDateTime> ZONED_DATE_TIME = new CustomInstantDeserializer<ZonedDateTime>(
|
||||
ZonedDateTime.class, DateTimeFormatter.ISO_ZONED_DATE_TIME,
|
||||
new Function<TemporalAccessor, ZonedDateTime>() {
|
||||
@Override
|
||||
public ZonedDateTime apply(TemporalAccessor temporalAccessor) {
|
||||
return ZonedDateTime.from(temporalAccessor);
|
||||
}
|
||||
},
|
||||
new Function<FromIntegerArguments, ZonedDateTime>() {
|
||||
@Override
|
||||
public ZonedDateTime apply(FromIntegerArguments a) {
|
||||
return ZonedDateTime.ofInstant(Instant.ofEpochMilli(a.value), a.zoneId);
|
||||
}
|
||||
},
|
||||
new Function<FromDecimalArguments, ZonedDateTime>() {
|
||||
@Override
|
||||
public ZonedDateTime apply(FromDecimalArguments a) {
|
||||
return ZonedDateTime.ofInstant(Instant.ofEpochSecond(a.integer, a.fraction), a.zoneId);
|
||||
}
|
||||
},
|
||||
new BiFunction<ZonedDateTime, ZoneId, ZonedDateTime>() {
|
||||
@Override
|
||||
public ZonedDateTime apply(ZonedDateTime zonedDateTime, ZoneId zoneId) {
|
||||
return zonedDateTime.withZoneSameInstant(zoneId);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
protected final Function<FromIntegerArguments, T> fromMilliseconds;
|
||||
|
||||
protected final Function<FromDecimalArguments, T> fromNanoseconds;
|
||||
|
||||
protected final Function<TemporalAccessor, T> parsedToValue;
|
||||
|
||||
protected final BiFunction<T, ZoneId, T> adjust;
|
||||
|
||||
protected CustomInstantDeserializer(Class<T> supportedType,
|
||||
DateTimeFormatter parser,
|
||||
Function<TemporalAccessor, T> parsedToValue,
|
||||
Function<FromIntegerArguments, T> fromMilliseconds,
|
||||
Function<FromDecimalArguments, T> fromNanoseconds,
|
||||
BiFunction<T, ZoneId, T> adjust) {
|
||||
super(supportedType, parser);
|
||||
this.parsedToValue = parsedToValue;
|
||||
this.fromMilliseconds = fromMilliseconds;
|
||||
this.fromNanoseconds = fromNanoseconds;
|
||||
this.adjust = adjust == null ? new BiFunction<T, ZoneId, T>() {
|
||||
@Override
|
||||
public T apply(T t, ZoneId zoneId) {
|
||||
return t;
|
||||
}
|
||||
} : adjust;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
protected CustomInstantDeserializer(CustomInstantDeserializer<T> base, DateTimeFormatter f) {
|
||||
super((Class<T>) base.handledType(), f);
|
||||
parsedToValue = base.parsedToValue;
|
||||
fromMilliseconds = base.fromMilliseconds;
|
||||
fromNanoseconds = base.fromNanoseconds;
|
||||
adjust = base.adjust;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected JsonDeserializer<T> withDateFormat(DateTimeFormatter dtf) {
|
||||
if (dtf == _formatter) {
|
||||
return this;
|
||||
}
|
||||
return new CustomInstantDeserializer<T>(this, dtf);
|
||||
}
|
||||
|
||||
@Override
|
||||
public T deserialize(JsonParser parser, DeserializationContext context) throws IOException {
|
||||
//NOTE: Timestamps contain no timezone info, and are always in configured TZ. Only
|
||||
//string values have to be adjusted to the configured TZ.
|
||||
switch (parser.getCurrentTokenId()) {
|
||||
case JsonTokenId.ID_NUMBER_FLOAT: {
|
||||
BigDecimal value = parser.getDecimalValue();
|
||||
long seconds = value.longValue();
|
||||
int nanoseconds = DecimalUtils.extractNanosecondDecimal(value, seconds);
|
||||
return fromNanoseconds.apply(new FromDecimalArguments(
|
||||
seconds, nanoseconds, getZone(context)));
|
||||
}
|
||||
|
||||
case JsonTokenId.ID_NUMBER_INT: {
|
||||
long timestamp = parser.getLongValue();
|
||||
if (context.isEnabled(DeserializationFeature.READ_DATE_TIMESTAMPS_AS_NANOSECONDS)) {
|
||||
return this.fromNanoseconds.apply(new FromDecimalArguments(
|
||||
timestamp, 0, this.getZone(context)
|
||||
));
|
||||
}
|
||||
return this.fromMilliseconds.apply(new FromIntegerArguments(
|
||||
timestamp, this.getZone(context)
|
||||
));
|
||||
}
|
||||
|
||||
case JsonTokenId.ID_STRING: {
|
||||
String string = parser.getText().trim();
|
||||
if (string.length() == 0) {
|
||||
return null;
|
||||
}
|
||||
if (string.endsWith("+0000")) {
|
||||
string = string.substring(0, string.length() - 5) + "Z";
|
||||
}
|
||||
T value;
|
||||
try {
|
||||
TemporalAccessor acc = _formatter.parse(string);
|
||||
value = parsedToValue.apply(acc);
|
||||
if (context.isEnabled(DeserializationFeature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE)) {
|
||||
return adjust.apply(value, this.getZone(context));
|
||||
}
|
||||
} catch (DateTimeException e) {
|
||||
throw _peelDTE(e);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
}
|
||||
throw context.mappingException("Expected type float, integer, or string.");
|
||||
}
|
||||
|
||||
private ZoneId getZone(DeserializationContext context) {
|
||||
// Instants are always in UTC, so don't waste compute cycles
|
||||
return (_valueClass == Instant.class) ? null : DateTimeUtils.toZoneId(context.getTimeZone());
|
||||
}
|
||||
|
||||
private static class FromIntegerArguments {
|
||||
public final long value;
|
||||
public final ZoneId zoneId;
|
||||
|
||||
private FromIntegerArguments(long value, ZoneId zoneId) {
|
||||
this.value = value;
|
||||
this.zoneId = zoneId;
|
||||
}
|
||||
}
|
||||
|
||||
private static class FromDecimalArguments {
|
||||
public final long integer;
|
||||
public final int fraction;
|
||||
public final ZoneId zoneId;
|
||||
|
||||
private FromDecimalArguments(long integer, int fraction, ZoneId zoneId) {
|
||||
this.integer = integer;
|
||||
this.fraction = fraction;
|
||||
this.zoneId = zoneId;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client;
|
||||
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
public class Pair {
|
||||
private String name = "";
|
||||
private String value = "";
|
||||
|
||||
public Pair (String name, String value) {
|
||||
setName(name);
|
||||
setValue(value);
|
||||
}
|
||||
|
||||
private void setName(String name) {
|
||||
if (!isValidString(name)) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
private void setValue(String value) {
|
||||
if (!isValidString(value)) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
private boolean isValidString(String arg) {
|
||||
if (arg == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (arg.trim().isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
package org.openapitools.client;
|
||||
|
||||
import com.fasterxml.jackson.databind.util.StdDateFormat;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.text.FieldPosition;
|
||||
import java.text.ParsePosition;
|
||||
import java.util.Date;
|
||||
import java.util.GregorianCalendar;
|
||||
import java.util.TimeZone;
|
||||
|
||||
public class RFC3339DateFormat extends DateFormat {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final TimeZone TIMEZONE_Z = TimeZone.getTimeZone("UTC");
|
||||
|
||||
private final StdDateFormat fmt = new StdDateFormat()
|
||||
.withTimeZone(TIMEZONE_Z)
|
||||
.withColonInTimeZone(true);
|
||||
|
||||
public RFC3339DateFormat() {
|
||||
this.calendar = new GregorianCalendar();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date parse(String source) {
|
||||
return parse(source, new ParsePosition(0));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date parse(String source, ParsePosition pos) {
|
||||
return fmt.parse(source, pos);
|
||||
}
|
||||
|
||||
@Override
|
||||
public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) {
|
||||
return fmt.format(date, toAppendTo, fieldPosition);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object clone() {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package org.openapitools.client;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Representing a Server configuration.
|
||||
*/
|
||||
public class ServerConfiguration {
|
||||
public String URL;
|
||||
public String description;
|
||||
public Map<String, ServerVariable> variables;
|
||||
|
||||
/**
|
||||
* @param URL A URL to the target host.
|
||||
* @param description A describtion of the host designated by the URL.
|
||||
* @param variables A map between a variable name and its value. The value is used for substitution in the server's URL template.
|
||||
*/
|
||||
public ServerConfiguration(String URL, String description, Map<String, ServerVariable> variables) {
|
||||
this.URL = URL;
|
||||
this.description = description;
|
||||
this.variables = variables;
|
||||
}
|
||||
|
||||
/**
|
||||
* Format URL template using given variables.
|
||||
*
|
||||
* @param variables A map between a variable name and its value.
|
||||
* @return Formatted URL.
|
||||
*/
|
||||
public String URL(Map<String, String> variables) {
|
||||
String url = this.URL;
|
||||
|
||||
// go through variables and replace placeholders
|
||||
for (Map.Entry<String, ServerVariable> variable: this.variables.entrySet()) {
|
||||
String name = variable.getKey();
|
||||
ServerVariable serverVariable = variable.getValue();
|
||||
String value = serverVariable.defaultValue;
|
||||
|
||||
if (variables != null && variables.containsKey(name)) {
|
||||
value = variables.get(name);
|
||||
if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) {
|
||||
throw new RuntimeException("The variable " + name + " in the server URL has invalid value " + value + ".");
|
||||
}
|
||||
}
|
||||
url = url.replaceAll("\\{" + name + "\\}", value);
|
||||
}
|
||||
return url;
|
||||
}
|
||||
|
||||
/**
|
||||
* Format URL template using default server variables.
|
||||
*
|
||||
* @return Formatted URL.
|
||||
*/
|
||||
public String URL() {
|
||||
return URL(null);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package org.openapitools.client;
|
||||
|
||||
import java.util.HashSet;
|
||||
|
||||
/**
|
||||
* Representing a Server Variable for server URL template substitution.
|
||||
*/
|
||||
public class ServerVariable {
|
||||
public String description;
|
||||
public String defaultValue;
|
||||
public HashSet<String> enumValues = null;
|
||||
|
||||
/**
|
||||
* @param description A description for the server variable.
|
||||
* @param defaultValue The default value to use for substitution.
|
||||
* @param enumValues An enumeration of string values to be used if the substitution options are from a limited set.
|
||||
*/
|
||||
public ServerVariable(String description, String defaultValue, HashSet<String> enumValues) {
|
||||
this.description = description;
|
||||
this.defaultValue = defaultValue;
|
||||
this.enumValues = enumValues;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
public class StringUtil {
|
||||
/**
|
||||
* Check if the given array contains the given value (with case-insensitive comparison).
|
||||
*
|
||||
* @param array The array
|
||||
* @param value The value to search
|
||||
* @return true if the array contains the value
|
||||
*/
|
||||
public static boolean containsIgnoreCase(String[] array, String value) {
|
||||
for (String str : array) {
|
||||
if (value == null && str == null) {
|
||||
return true;
|
||||
}
|
||||
if (value != null && value.equalsIgnoreCase(str)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Join an array of strings with the given separator.
|
||||
* <p>
|
||||
* Note: This might be replaced by utility method from commons-lang or guava someday
|
||||
* if one of those libraries is added as dependency.
|
||||
* </p>
|
||||
*
|
||||
* @param array The array of strings
|
||||
* @param separator The separator
|
||||
* @return the resulting string
|
||||
*/
|
||||
public static String join(String[] array, String separator) {
|
||||
int len = array.length;
|
||||
if (len == 0) {
|
||||
return "";
|
||||
}
|
||||
|
||||
StringBuilder out = new StringBuilder();
|
||||
out.append(array[0]);
|
||||
for (int i = 1; i < len; i++) {
|
||||
out.append(separator).append(array[i]);
|
||||
}
|
||||
return out.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Join a list of strings with the given separator.
|
||||
*
|
||||
* @param list The list of strings
|
||||
* @param separator The separator
|
||||
* @return the resulting string
|
||||
*/
|
||||
public static String join(Collection<String> list, String separator) {
|
||||
Iterator<String> iterator = list.iterator();
|
||||
StringBuilder out = new StringBuilder();
|
||||
if (iterator.hasNext()) {
|
||||
out.append(iterator.next());
|
||||
}
|
||||
while (iterator.hasNext()) {
|
||||
out.append(separator).append(iterator.next());
|
||||
}
|
||||
return out.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package org.openapitools.client.api;
|
||||
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.model.Client;
|
||||
import io.vertx.core.AsyncResult;
|
||||
import io.vertx.core.Handler;
|
||||
import io.vertx.core.json.JsonObject;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public interface AnotherFakeApi {
|
||||
|
||||
void call123testSpecialTags(Client body, Handler<AsyncResult<Client>> handler);
|
||||
|
||||
void call123testSpecialTags(Client body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Client>> handler);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package org.openapitools.client.api;
|
||||
|
||||
import org.openapitools.client.model.Client;
|
||||
|
||||
import io.vertx.core.AsyncResult;
|
||||
import io.vertx.core.Handler;
|
||||
import io.vertx.core.MultiMap;
|
||||
import io.vertx.core.json.JsonObject;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.Configuration;
|
||||
import org.openapitools.client.Pair;
|
||||
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
public class AnotherFakeApiImpl implements AnotherFakeApi {
|
||||
|
||||
private ApiClient apiClient;
|
||||
|
||||
public AnotherFakeApiImpl() {
|
||||
this(null);
|
||||
}
|
||||
|
||||
public AnotherFakeApiImpl(ApiClient apiClient) {
|
||||
this.apiClient = apiClient != null ? apiClient : Configuration.getDefaultApiClient();
|
||||
}
|
||||
|
||||
public ApiClient getApiClient() {
|
||||
return apiClient;
|
||||
}
|
||||
|
||||
public void setApiClient(ApiClient apiClient) {
|
||||
this.apiClient = apiClient;
|
||||
}
|
||||
|
||||
/**
|
||||
* To test special tags
|
||||
* To test special tags and operation ID starting with number
|
||||
* @param body client model (required)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void call123testSpecialTags(Client body, Handler<AsyncResult<Client>> resultHandler) {
|
||||
call123testSpecialTags(body, null, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* To test special tags
|
||||
* To test special tags and operation ID starting with number
|
||||
* @param body client model (required)
|
||||
* @param authInfo per call authentication override.
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void call123testSpecialTags(Client body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Client>> resultHandler) {
|
||||
Object localVarBody = body;
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'body' when calling call123testSpecialTags"));
|
||||
return;
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/another-fake/dummy";
|
||||
|
||||
// query params
|
||||
List<Pair> localVarQueryParams = new ArrayList<>();
|
||||
|
||||
// header params
|
||||
MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// cookie params
|
||||
MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// form params
|
||||
// TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client)
|
||||
Map<String, Object> localVarFormParams = new HashMap<>();
|
||||
|
||||
String[] localVarAccepts = { "application/json" };
|
||||
String[] localVarContentTypes = { "application/json" };
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
TypeReference<Client> localVarReturnType = new TypeReference<Client>() {};
|
||||
apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, localVarReturnType, resultHandler);
|
||||
}
|
||||
|
||||
private String encodeParameter(String parameter) {
|
||||
try {
|
||||
return URLEncoder.encode(parameter, StandardCharsets.UTF_8.name());
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
return parameter;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
package org.openapitools.client.api;
|
||||
|
||||
import org.openapitools.client.ApiClient;
|
||||
import io.vertx.core.file.AsyncFile;
|
||||
import java.math.BigDecimal;
|
||||
import org.openapitools.client.model.Client;
|
||||
import org.openapitools.client.model.FileSchemaTestClass;
|
||||
import org.threeten.bp.LocalDate;
|
||||
import org.threeten.bp.OffsetDateTime;
|
||||
import org.openapitools.client.model.OuterComposite;
|
||||
import org.openapitools.client.model.User;
|
||||
import org.openapitools.client.model.XmlItem;
|
||||
import io.vertx.core.AsyncResult;
|
||||
import io.vertx.core.Handler;
|
||||
import io.vertx.core.json.JsonObject;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public interface FakeApi {
|
||||
|
||||
void createXmlItem(XmlItem xmlItem, Handler<AsyncResult<Void>> handler);
|
||||
|
||||
void createXmlItem(XmlItem xmlItem, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> handler);
|
||||
|
||||
void fakeOuterBooleanSerialize(Boolean body, Handler<AsyncResult<Boolean>> handler);
|
||||
|
||||
void fakeOuterBooleanSerialize(Boolean body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Boolean>> handler);
|
||||
|
||||
void fakeOuterCompositeSerialize(OuterComposite body, Handler<AsyncResult<OuterComposite>> handler);
|
||||
|
||||
void fakeOuterCompositeSerialize(OuterComposite body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<OuterComposite>> handler);
|
||||
|
||||
void fakeOuterNumberSerialize(BigDecimal body, Handler<AsyncResult<BigDecimal>> handler);
|
||||
|
||||
void fakeOuterNumberSerialize(BigDecimal body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<BigDecimal>> handler);
|
||||
|
||||
void fakeOuterStringSerialize(String body, Handler<AsyncResult<String>> handler);
|
||||
|
||||
void fakeOuterStringSerialize(String body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<String>> handler);
|
||||
|
||||
void testBodyWithFileSchema(FileSchemaTestClass body, Handler<AsyncResult<Void>> handler);
|
||||
|
||||
void testBodyWithFileSchema(FileSchemaTestClass body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> handler);
|
||||
|
||||
void testBodyWithQueryParams(String query, User body, Handler<AsyncResult<Void>> handler);
|
||||
|
||||
void testBodyWithQueryParams(String query, User body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> handler);
|
||||
|
||||
void testClientModel(Client body, Handler<AsyncResult<Client>> handler);
|
||||
|
||||
void testClientModel(Client body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Client>> handler);
|
||||
|
||||
void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, AsyncFile binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback, Handler<AsyncResult<Void>> handler);
|
||||
|
||||
void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, AsyncFile binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> handler);
|
||||
|
||||
void testEnumParameters(List<String> enumHeaderStringArray, String enumHeaderString, List<String> enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List<String> enumFormStringArray, String enumFormString, Handler<AsyncResult<Void>> handler);
|
||||
|
||||
void testEnumParameters(List<String> enumHeaderStringArray, String enumHeaderString, List<String> enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List<String> enumFormStringArray, String enumFormString, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> handler);
|
||||
|
||||
void testGroupParameters(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group, Handler<AsyncResult<Void>> handler);
|
||||
|
||||
void testGroupParameters(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> handler);
|
||||
|
||||
void testInlineAdditionalProperties(Map<String, String> param, Handler<AsyncResult<Void>> handler);
|
||||
|
||||
void testInlineAdditionalProperties(Map<String, String> param, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> handler);
|
||||
|
||||
void testJsonFormData(String param, String param2, Handler<AsyncResult<Void>> handler);
|
||||
|
||||
void testJsonFormData(String param, String param2, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> handler);
|
||||
|
||||
void testQueryParameterCollectionFormat(List<String> pipe, List<String> ioutil, List<String> http, List<String> url, List<String> context, Handler<AsyncResult<Void>> handler);
|
||||
|
||||
void testQueryParameterCollectionFormat(List<String> pipe, List<String> ioutil, List<String> http, List<String> url, List<String> context, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> handler);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,869 @@
|
||||
package org.openapitools.client.api;
|
||||
|
||||
import io.vertx.core.file.AsyncFile;
|
||||
import java.math.BigDecimal;
|
||||
import org.openapitools.client.model.Client;
|
||||
import org.openapitools.client.model.FileSchemaTestClass;
|
||||
import org.threeten.bp.LocalDate;
|
||||
import org.threeten.bp.OffsetDateTime;
|
||||
import org.openapitools.client.model.OuterComposite;
|
||||
import org.openapitools.client.model.User;
|
||||
import org.openapitools.client.model.XmlItem;
|
||||
|
||||
import io.vertx.core.AsyncResult;
|
||||
import io.vertx.core.Handler;
|
||||
import io.vertx.core.MultiMap;
|
||||
import io.vertx.core.json.JsonObject;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.Configuration;
|
||||
import org.openapitools.client.Pair;
|
||||
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
public class FakeApiImpl implements FakeApi {
|
||||
|
||||
private ApiClient apiClient;
|
||||
|
||||
public FakeApiImpl() {
|
||||
this(null);
|
||||
}
|
||||
|
||||
public FakeApiImpl(ApiClient apiClient) {
|
||||
this.apiClient = apiClient != null ? apiClient : Configuration.getDefaultApiClient();
|
||||
}
|
||||
|
||||
public ApiClient getApiClient() {
|
||||
return apiClient;
|
||||
}
|
||||
|
||||
public void setApiClient(ApiClient apiClient) {
|
||||
this.apiClient = apiClient;
|
||||
}
|
||||
|
||||
/**
|
||||
* creates an XmlItem
|
||||
* this route creates an XmlItem
|
||||
* @param xmlItem XmlItem Body (required)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void createXmlItem(XmlItem xmlItem, Handler<AsyncResult<Void>> resultHandler) {
|
||||
createXmlItem(xmlItem, null, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* creates an XmlItem
|
||||
* this route creates an XmlItem
|
||||
* @param xmlItem XmlItem Body (required)
|
||||
* @param authInfo per call authentication override.
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void createXmlItem(XmlItem xmlItem, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> resultHandler) {
|
||||
Object localVarBody = xmlItem;
|
||||
|
||||
// verify the required parameter 'xmlItem' is set
|
||||
if (xmlItem == null) {
|
||||
resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'xmlItem' when calling createXmlItem"));
|
||||
return;
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/fake/create_xml_item";
|
||||
|
||||
// query params
|
||||
List<Pair> localVarQueryParams = new ArrayList<>();
|
||||
|
||||
// header params
|
||||
MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// cookie params
|
||||
MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// form params
|
||||
// TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client)
|
||||
Map<String, Object> localVarFormParams = new HashMap<>();
|
||||
|
||||
String[] localVarAccepts = { };
|
||||
String[] localVarContentTypes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" };
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, null, resultHandler);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* Test serialization of outer boolean types
|
||||
* @param body Input boolean as post body (optional)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void fakeOuterBooleanSerialize(Boolean body, Handler<AsyncResult<Boolean>> resultHandler) {
|
||||
fakeOuterBooleanSerialize(body, null, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Test serialization of outer boolean types
|
||||
* @param body Input boolean as post body (optional)
|
||||
* @param authInfo per call authentication override.
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void fakeOuterBooleanSerialize(Boolean body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Boolean>> resultHandler) {
|
||||
Object localVarBody = body;
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/fake/outer/boolean";
|
||||
|
||||
// query params
|
||||
List<Pair> localVarQueryParams = new ArrayList<>();
|
||||
|
||||
// header params
|
||||
MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// cookie params
|
||||
MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// form params
|
||||
// TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client)
|
||||
Map<String, Object> localVarFormParams = new HashMap<>();
|
||||
|
||||
String[] localVarAccepts = { "*/*" };
|
||||
String[] localVarContentTypes = { };
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
TypeReference<Boolean> localVarReturnType = new TypeReference<Boolean>() {};
|
||||
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, localVarReturnType, resultHandler);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* Test serialization of object with outer number type
|
||||
* @param body Input composite as post body (optional)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void fakeOuterCompositeSerialize(OuterComposite body, Handler<AsyncResult<OuterComposite>> resultHandler) {
|
||||
fakeOuterCompositeSerialize(body, null, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Test serialization of object with outer number type
|
||||
* @param body Input composite as post body (optional)
|
||||
* @param authInfo per call authentication override.
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void fakeOuterCompositeSerialize(OuterComposite body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<OuterComposite>> resultHandler) {
|
||||
Object localVarBody = body;
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/fake/outer/composite";
|
||||
|
||||
// query params
|
||||
List<Pair> localVarQueryParams = new ArrayList<>();
|
||||
|
||||
// header params
|
||||
MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// cookie params
|
||||
MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// form params
|
||||
// TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client)
|
||||
Map<String, Object> localVarFormParams = new HashMap<>();
|
||||
|
||||
String[] localVarAccepts = { "*/*" };
|
||||
String[] localVarContentTypes = { };
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
TypeReference<OuterComposite> localVarReturnType = new TypeReference<OuterComposite>() {};
|
||||
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, localVarReturnType, resultHandler);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* Test serialization of outer number types
|
||||
* @param body Input number as post body (optional)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void fakeOuterNumberSerialize(BigDecimal body, Handler<AsyncResult<BigDecimal>> resultHandler) {
|
||||
fakeOuterNumberSerialize(body, null, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Test serialization of outer number types
|
||||
* @param body Input number as post body (optional)
|
||||
* @param authInfo per call authentication override.
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void fakeOuterNumberSerialize(BigDecimal body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<BigDecimal>> resultHandler) {
|
||||
Object localVarBody = body;
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/fake/outer/number";
|
||||
|
||||
// query params
|
||||
List<Pair> localVarQueryParams = new ArrayList<>();
|
||||
|
||||
// header params
|
||||
MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// cookie params
|
||||
MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// form params
|
||||
// TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client)
|
||||
Map<String, Object> localVarFormParams = new HashMap<>();
|
||||
|
||||
String[] localVarAccepts = { "*/*" };
|
||||
String[] localVarContentTypes = { };
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
TypeReference<BigDecimal> localVarReturnType = new TypeReference<BigDecimal>() {};
|
||||
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, localVarReturnType, resultHandler);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* Test serialization of outer string types
|
||||
* @param body Input string as post body (optional)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void fakeOuterStringSerialize(String body, Handler<AsyncResult<String>> resultHandler) {
|
||||
fakeOuterStringSerialize(body, null, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Test serialization of outer string types
|
||||
* @param body Input string as post body (optional)
|
||||
* @param authInfo per call authentication override.
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void fakeOuterStringSerialize(String body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<String>> resultHandler) {
|
||||
Object localVarBody = body;
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/fake/outer/string";
|
||||
|
||||
// query params
|
||||
List<Pair> localVarQueryParams = new ArrayList<>();
|
||||
|
||||
// header params
|
||||
MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// cookie params
|
||||
MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// form params
|
||||
// TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client)
|
||||
Map<String, Object> localVarFormParams = new HashMap<>();
|
||||
|
||||
String[] localVarAccepts = { "*/*" };
|
||||
String[] localVarContentTypes = { };
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
TypeReference<String> localVarReturnType = new TypeReference<String>() {};
|
||||
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, localVarReturnType, resultHandler);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* For this test, the body for this request much reference a schema named `File`.
|
||||
* @param body (required)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void testBodyWithFileSchema(FileSchemaTestClass body, Handler<AsyncResult<Void>> resultHandler) {
|
||||
testBodyWithFileSchema(body, null, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* For this test, the body for this request much reference a schema named `File`.
|
||||
* @param body (required)
|
||||
* @param authInfo per call authentication override.
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void testBodyWithFileSchema(FileSchemaTestClass body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> resultHandler) {
|
||||
Object localVarBody = body;
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'body' when calling testBodyWithFileSchema"));
|
||||
return;
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/fake/body-with-file-schema";
|
||||
|
||||
// query params
|
||||
List<Pair> localVarQueryParams = new ArrayList<>();
|
||||
|
||||
// header params
|
||||
MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// cookie params
|
||||
MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// form params
|
||||
// TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client)
|
||||
Map<String, Object> localVarFormParams = new HashMap<>();
|
||||
|
||||
String[] localVarAccepts = { };
|
||||
String[] localVarContentTypes = { "application/json" };
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, null, resultHandler);
|
||||
}
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param query (required)
|
||||
* @param body (required)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void testBodyWithQueryParams(String query, User body, Handler<AsyncResult<Void>> resultHandler) {
|
||||
testBodyWithQueryParams(query, body, null, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param query (required)
|
||||
* @param body (required)
|
||||
* @param authInfo per call authentication override.
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void testBodyWithQueryParams(String query, User body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> resultHandler) {
|
||||
Object localVarBody = body;
|
||||
|
||||
// verify the required parameter 'query' is set
|
||||
if (query == null) {
|
||||
resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'query' when calling testBodyWithQueryParams"));
|
||||
return;
|
||||
}
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'body' when calling testBodyWithQueryParams"));
|
||||
return;
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/fake/body-with-query-params";
|
||||
|
||||
// query params
|
||||
List<Pair> localVarQueryParams = new ArrayList<>();
|
||||
localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query));
|
||||
|
||||
// header params
|
||||
MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// cookie params
|
||||
MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// form params
|
||||
// TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client)
|
||||
Map<String, Object> localVarFormParams = new HashMap<>();
|
||||
|
||||
String[] localVarAccepts = { };
|
||||
String[] localVarContentTypes = { "application/json" };
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, null, resultHandler);
|
||||
}
|
||||
/**
|
||||
* To test \"client\" model
|
||||
* To test \"client\" model
|
||||
* @param body client model (required)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void testClientModel(Client body, Handler<AsyncResult<Client>> resultHandler) {
|
||||
testClientModel(body, null, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* To test \"client\" model
|
||||
* To test \"client\" model
|
||||
* @param body client model (required)
|
||||
* @param authInfo per call authentication override.
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void testClientModel(Client body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Client>> resultHandler) {
|
||||
Object localVarBody = body;
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'body' when calling testClientModel"));
|
||||
return;
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/fake";
|
||||
|
||||
// query params
|
||||
List<Pair> localVarQueryParams = new ArrayList<>();
|
||||
|
||||
// header params
|
||||
MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// cookie params
|
||||
MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// form params
|
||||
// TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client)
|
||||
Map<String, Object> localVarFormParams = new HashMap<>();
|
||||
|
||||
String[] localVarAccepts = { "application/json" };
|
||||
String[] localVarContentTypes = { "application/json" };
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
TypeReference<Client> localVarReturnType = new TypeReference<Client>() {};
|
||||
apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, localVarReturnType, resultHandler);
|
||||
}
|
||||
/**
|
||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
* @param number None (required)
|
||||
* @param _double None (required)
|
||||
* @param patternWithoutDelimiter None (required)
|
||||
* @param _byte None (required)
|
||||
* @param integer None (optional)
|
||||
* @param int32 None (optional)
|
||||
* @param int64 None (optional)
|
||||
* @param _float None (optional)
|
||||
* @param string None (optional)
|
||||
* @param binary None (optional)
|
||||
* @param date None (optional)
|
||||
* @param dateTime None (optional)
|
||||
* @param password None (optional)
|
||||
* @param paramCallback None (optional)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, AsyncFile binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback, Handler<AsyncResult<Void>> resultHandler) {
|
||||
testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback, null, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
* @param number None (required)
|
||||
* @param _double None (required)
|
||||
* @param patternWithoutDelimiter None (required)
|
||||
* @param _byte None (required)
|
||||
* @param integer None (optional)
|
||||
* @param int32 None (optional)
|
||||
* @param int64 None (optional)
|
||||
* @param _float None (optional)
|
||||
* @param string None (optional)
|
||||
* @param binary None (optional)
|
||||
* @param date None (optional)
|
||||
* @param dateTime None (optional)
|
||||
* @param password None (optional)
|
||||
* @param paramCallback None (optional)
|
||||
* @param authInfo per call authentication override.
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, AsyncFile binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> resultHandler) {
|
||||
Object localVarBody = null;
|
||||
|
||||
// verify the required parameter 'number' is set
|
||||
if (number == null) {
|
||||
resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'number' when calling testEndpointParameters"));
|
||||
return;
|
||||
}
|
||||
|
||||
// verify the required parameter '_double' is set
|
||||
if (_double == null) {
|
||||
resultHandler.handle(ApiException.fail(400, "Missing the required parameter '_double' when calling testEndpointParameters"));
|
||||
return;
|
||||
}
|
||||
|
||||
// verify the required parameter 'patternWithoutDelimiter' is set
|
||||
if (patternWithoutDelimiter == null) {
|
||||
resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'patternWithoutDelimiter' when calling testEndpointParameters"));
|
||||
return;
|
||||
}
|
||||
|
||||
// verify the required parameter '_byte' is set
|
||||
if (_byte == null) {
|
||||
resultHandler.handle(ApiException.fail(400, "Missing the required parameter '_byte' when calling testEndpointParameters"));
|
||||
return;
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/fake";
|
||||
|
||||
// query params
|
||||
List<Pair> localVarQueryParams = new ArrayList<>();
|
||||
|
||||
// header params
|
||||
MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// cookie params
|
||||
MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// form params
|
||||
// TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client)
|
||||
Map<String, Object> localVarFormParams = new HashMap<>();
|
||||
if (integer != null) localVarFormParams.put("integer", integer);
|
||||
if (int32 != null) localVarFormParams.put("int32", int32);
|
||||
if (int64 != null) localVarFormParams.put("int64", int64);
|
||||
if (number != null) localVarFormParams.put("number", number);
|
||||
if (_float != null) localVarFormParams.put("float", _float);
|
||||
if (_double != null) localVarFormParams.put("double", _double);
|
||||
if (string != null) localVarFormParams.put("string", string);
|
||||
if (patternWithoutDelimiter != null) localVarFormParams.put("pattern_without_delimiter", patternWithoutDelimiter);
|
||||
if (_byte != null) localVarFormParams.put("byte", _byte);
|
||||
if (binary != null) localVarFormParams.put("binary", binary);
|
||||
if (date != null) localVarFormParams.put("date", date);
|
||||
if (dateTime != null) localVarFormParams.put("dateTime", dateTime);
|
||||
if (password != null) localVarFormParams.put("password", password);
|
||||
if (paramCallback != null) localVarFormParams.put("callback", paramCallback);
|
||||
|
||||
String[] localVarAccepts = { };
|
||||
String[] localVarContentTypes = { "application/x-www-form-urlencoded" };
|
||||
String[] localVarAuthNames = new String[] { "http_basic_test" };
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, null, resultHandler);
|
||||
}
|
||||
/**
|
||||
* To test enum parameters
|
||||
* To test enum parameters
|
||||
* @param enumHeaderStringArray Header parameter enum test (string array) (optional, default to new ArrayList<>())
|
||||
* @param enumHeaderString Header parameter enum test (string) (optional, default to -efg)
|
||||
* @param enumQueryStringArray Query parameter enum test (string array) (optional, default to new ArrayList<>())
|
||||
* @param enumQueryString Query parameter enum test (string) (optional, default to -efg)
|
||||
* @param enumQueryInteger Query parameter enum test (double) (optional)
|
||||
* @param enumQueryDouble Query parameter enum test (double) (optional)
|
||||
* @param enumFormStringArray Form parameter enum test (string array) (optional, default to $)
|
||||
* @param enumFormString Form parameter enum test (string) (optional, default to -efg)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void testEnumParameters(List<String> enumHeaderStringArray, String enumHeaderString, List<String> enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List<String> enumFormStringArray, String enumFormString, Handler<AsyncResult<Void>> resultHandler) {
|
||||
testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, null, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* To test enum parameters
|
||||
* To test enum parameters
|
||||
* @param enumHeaderStringArray Header parameter enum test (string array) (optional, default to new ArrayList<>())
|
||||
* @param enumHeaderString Header parameter enum test (string) (optional, default to -efg)
|
||||
* @param enumQueryStringArray Query parameter enum test (string array) (optional, default to new ArrayList<>())
|
||||
* @param enumQueryString Query parameter enum test (string) (optional, default to -efg)
|
||||
* @param enumQueryInteger Query parameter enum test (double) (optional)
|
||||
* @param enumQueryDouble Query parameter enum test (double) (optional)
|
||||
* @param enumFormStringArray Form parameter enum test (string array) (optional, default to $)
|
||||
* @param enumFormString Form parameter enum test (string) (optional, default to -efg)
|
||||
* @param authInfo per call authentication override.
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void testEnumParameters(List<String> enumHeaderStringArray, String enumHeaderString, List<String> enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List<String> enumFormStringArray, String enumFormString, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> resultHandler) {
|
||||
Object localVarBody = null;
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/fake";
|
||||
|
||||
// query params
|
||||
List<Pair> localVarQueryParams = new ArrayList<>();
|
||||
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "enum_query_string_array", enumQueryStringArray));
|
||||
localVarQueryParams.addAll(apiClient.parameterToPairs("", "enum_query_string", enumQueryString));
|
||||
localVarQueryParams.addAll(apiClient.parameterToPairs("", "enum_query_integer", enumQueryInteger));
|
||||
localVarQueryParams.addAll(apiClient.parameterToPairs("", "enum_query_double", enumQueryDouble));
|
||||
|
||||
// header params
|
||||
MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap();
|
||||
if (enumHeaderStringArray != null)
|
||||
localVarHeaderParams.add("enum_header_string_array", apiClient.parameterToString(enumHeaderStringArray));
|
||||
if (enumHeaderString != null)
|
||||
localVarHeaderParams.add("enum_header_string", apiClient.parameterToString(enumHeaderString));
|
||||
|
||||
// cookie params
|
||||
MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// form params
|
||||
// TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client)
|
||||
Map<String, Object> localVarFormParams = new HashMap<>();
|
||||
if (enumFormStringArray != null) localVarFormParams.put("enum_form_string_array", enumFormStringArray);
|
||||
if (enumFormString != null) localVarFormParams.put("enum_form_string", enumFormString);
|
||||
|
||||
String[] localVarAccepts = { };
|
||||
String[] localVarContentTypes = { "application/x-www-form-urlencoded" };
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, null, resultHandler);
|
||||
}
|
||||
/**
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
* @param requiredStringGroup Required String in group parameters (required)
|
||||
* @param requiredBooleanGroup Required Boolean in group parameters (required)
|
||||
* @param requiredInt64Group Required Integer in group parameters (required)
|
||||
* @param stringGroup String in group parameters (optional)
|
||||
* @param booleanGroup Boolean in group parameters (optional)
|
||||
* @param int64Group Integer in group parameters (optional)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void testGroupParameters(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group, Handler<AsyncResult<Void>> resultHandler) {
|
||||
testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, null, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
* @param requiredStringGroup Required String in group parameters (required)
|
||||
* @param requiredBooleanGroup Required Boolean in group parameters (required)
|
||||
* @param requiredInt64Group Required Integer in group parameters (required)
|
||||
* @param stringGroup String in group parameters (optional)
|
||||
* @param booleanGroup Boolean in group parameters (optional)
|
||||
* @param int64Group Integer in group parameters (optional)
|
||||
* @param authInfo per call authentication override.
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void testGroupParameters(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> resultHandler) {
|
||||
Object localVarBody = null;
|
||||
|
||||
// verify the required parameter 'requiredStringGroup' is set
|
||||
if (requiredStringGroup == null) {
|
||||
resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'requiredStringGroup' when calling testGroupParameters"));
|
||||
return;
|
||||
}
|
||||
|
||||
// verify the required parameter 'requiredBooleanGroup' is set
|
||||
if (requiredBooleanGroup == null) {
|
||||
resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'requiredBooleanGroup' when calling testGroupParameters"));
|
||||
return;
|
||||
}
|
||||
|
||||
// verify the required parameter 'requiredInt64Group' is set
|
||||
if (requiredInt64Group == null) {
|
||||
resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'requiredInt64Group' when calling testGroupParameters"));
|
||||
return;
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/fake";
|
||||
|
||||
// query params
|
||||
List<Pair> localVarQueryParams = new ArrayList<>();
|
||||
localVarQueryParams.addAll(apiClient.parameterToPairs("", "required_string_group", requiredStringGroup));
|
||||
localVarQueryParams.addAll(apiClient.parameterToPairs("", "required_int64_group", requiredInt64Group));
|
||||
localVarQueryParams.addAll(apiClient.parameterToPairs("", "string_group", stringGroup));
|
||||
localVarQueryParams.addAll(apiClient.parameterToPairs("", "int64_group", int64Group));
|
||||
|
||||
// header params
|
||||
MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap();
|
||||
if (requiredBooleanGroup != null)
|
||||
localVarHeaderParams.add("required_boolean_group", apiClient.parameterToString(requiredBooleanGroup));
|
||||
if (booleanGroup != null)
|
||||
localVarHeaderParams.add("boolean_group", apiClient.parameterToString(booleanGroup));
|
||||
|
||||
// cookie params
|
||||
MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// form params
|
||||
// TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client)
|
||||
Map<String, Object> localVarFormParams = new HashMap<>();
|
||||
|
||||
String[] localVarAccepts = { };
|
||||
String[] localVarContentTypes = { };
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, null, resultHandler);
|
||||
}
|
||||
/**
|
||||
* test inline additionalProperties
|
||||
*
|
||||
* @param param request body (required)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void testInlineAdditionalProperties(Map<String, String> param, Handler<AsyncResult<Void>> resultHandler) {
|
||||
testInlineAdditionalProperties(param, null, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* test inline additionalProperties
|
||||
*
|
||||
* @param param request body (required)
|
||||
* @param authInfo per call authentication override.
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void testInlineAdditionalProperties(Map<String, String> param, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> resultHandler) {
|
||||
Object localVarBody = param;
|
||||
|
||||
// verify the required parameter 'param' is set
|
||||
if (param == null) {
|
||||
resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'param' when calling testInlineAdditionalProperties"));
|
||||
return;
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/fake/inline-additionalProperties";
|
||||
|
||||
// query params
|
||||
List<Pair> localVarQueryParams = new ArrayList<>();
|
||||
|
||||
// header params
|
||||
MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// cookie params
|
||||
MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// form params
|
||||
// TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client)
|
||||
Map<String, Object> localVarFormParams = new HashMap<>();
|
||||
|
||||
String[] localVarAccepts = { };
|
||||
String[] localVarContentTypes = { "application/json" };
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, null, resultHandler);
|
||||
}
|
||||
/**
|
||||
* test json serialization of form data
|
||||
*
|
||||
* @param param field1 (required)
|
||||
* @param param2 field2 (required)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void testJsonFormData(String param, String param2, Handler<AsyncResult<Void>> resultHandler) {
|
||||
testJsonFormData(param, param2, null, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* test json serialization of form data
|
||||
*
|
||||
* @param param field1 (required)
|
||||
* @param param2 field2 (required)
|
||||
* @param authInfo per call authentication override.
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void testJsonFormData(String param, String param2, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> resultHandler) {
|
||||
Object localVarBody = null;
|
||||
|
||||
// verify the required parameter 'param' is set
|
||||
if (param == null) {
|
||||
resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'param' when calling testJsonFormData"));
|
||||
return;
|
||||
}
|
||||
|
||||
// verify the required parameter 'param2' is set
|
||||
if (param2 == null) {
|
||||
resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'param2' when calling testJsonFormData"));
|
||||
return;
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/fake/jsonFormData";
|
||||
|
||||
// query params
|
||||
List<Pair> localVarQueryParams = new ArrayList<>();
|
||||
|
||||
// header params
|
||||
MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// cookie params
|
||||
MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// form params
|
||||
// TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client)
|
||||
Map<String, Object> localVarFormParams = new HashMap<>();
|
||||
if (param != null) localVarFormParams.put("param", param);
|
||||
if (param2 != null) localVarFormParams.put("param2", param2);
|
||||
|
||||
String[] localVarAccepts = { };
|
||||
String[] localVarContentTypes = { "application/x-www-form-urlencoded" };
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, null, resultHandler);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* To test the collection format in query parameters
|
||||
* @param pipe (required)
|
||||
* @param ioutil (required)
|
||||
* @param http (required)
|
||||
* @param url (required)
|
||||
* @param context (required)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void testQueryParameterCollectionFormat(List<String> pipe, List<String> ioutil, List<String> http, List<String> url, List<String> context, Handler<AsyncResult<Void>> resultHandler) {
|
||||
testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, null, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* To test the collection format in query parameters
|
||||
* @param pipe (required)
|
||||
* @param ioutil (required)
|
||||
* @param http (required)
|
||||
* @param url (required)
|
||||
* @param context (required)
|
||||
* @param authInfo per call authentication override.
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void testQueryParameterCollectionFormat(List<String> pipe, List<String> ioutil, List<String> http, List<String> url, List<String> context, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> resultHandler) {
|
||||
Object localVarBody = null;
|
||||
|
||||
// verify the required parameter 'pipe' is set
|
||||
if (pipe == null) {
|
||||
resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'pipe' when calling testQueryParameterCollectionFormat"));
|
||||
return;
|
||||
}
|
||||
|
||||
// verify the required parameter 'ioutil' is set
|
||||
if (ioutil == null) {
|
||||
resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'ioutil' when calling testQueryParameterCollectionFormat"));
|
||||
return;
|
||||
}
|
||||
|
||||
// verify the required parameter 'http' is set
|
||||
if (http == null) {
|
||||
resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'http' when calling testQueryParameterCollectionFormat"));
|
||||
return;
|
||||
}
|
||||
|
||||
// verify the required parameter 'url' is set
|
||||
if (url == null) {
|
||||
resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'url' when calling testQueryParameterCollectionFormat"));
|
||||
return;
|
||||
}
|
||||
|
||||
// verify the required parameter 'context' is set
|
||||
if (context == null) {
|
||||
resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'context' when calling testQueryParameterCollectionFormat"));
|
||||
return;
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/fake/test-query-paramters";
|
||||
|
||||
// query params
|
||||
List<Pair> localVarQueryParams = new ArrayList<>();
|
||||
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "pipe", pipe));
|
||||
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "ioutil", ioutil));
|
||||
localVarQueryParams.addAll(apiClient.parameterToPairs("ssv", "http", http));
|
||||
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "url", url));
|
||||
localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "context", context));
|
||||
|
||||
// header params
|
||||
MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// cookie params
|
||||
MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// form params
|
||||
// TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client)
|
||||
Map<String, Object> localVarFormParams = new HashMap<>();
|
||||
|
||||
String[] localVarAccepts = { };
|
||||
String[] localVarContentTypes = { };
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, null, resultHandler);
|
||||
}
|
||||
|
||||
private String encodeParameter(String parameter) {
|
||||
try {
|
||||
return URLEncoder.encode(parameter, StandardCharsets.UTF_8.name());
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
return parameter;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package org.openapitools.client.api;
|
||||
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.model.Client;
|
||||
import io.vertx.core.AsyncResult;
|
||||
import io.vertx.core.Handler;
|
||||
import io.vertx.core.json.JsonObject;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public interface FakeClassnameTags123Api {
|
||||
|
||||
void testClassname(Client body, Handler<AsyncResult<Client>> handler);
|
||||
|
||||
void testClassname(Client body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Client>> handler);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package org.openapitools.client.api;
|
||||
|
||||
import org.openapitools.client.model.Client;
|
||||
|
||||
import io.vertx.core.AsyncResult;
|
||||
import io.vertx.core.Handler;
|
||||
import io.vertx.core.MultiMap;
|
||||
import io.vertx.core.json.JsonObject;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.Configuration;
|
||||
import org.openapitools.client.Pair;
|
||||
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
public class FakeClassnameTags123ApiImpl implements FakeClassnameTags123Api {
|
||||
|
||||
private ApiClient apiClient;
|
||||
|
||||
public FakeClassnameTags123ApiImpl() {
|
||||
this(null);
|
||||
}
|
||||
|
||||
public FakeClassnameTags123ApiImpl(ApiClient apiClient) {
|
||||
this.apiClient = apiClient != null ? apiClient : Configuration.getDefaultApiClient();
|
||||
}
|
||||
|
||||
public ApiClient getApiClient() {
|
||||
return apiClient;
|
||||
}
|
||||
|
||||
public void setApiClient(ApiClient apiClient) {
|
||||
this.apiClient = apiClient;
|
||||
}
|
||||
|
||||
/**
|
||||
* To test class name in snake case
|
||||
* To test class name in snake case
|
||||
* @param body client model (required)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void testClassname(Client body, Handler<AsyncResult<Client>> resultHandler) {
|
||||
testClassname(body, null, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* To test class name in snake case
|
||||
* To test class name in snake case
|
||||
* @param body client model (required)
|
||||
* @param authInfo per call authentication override.
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void testClassname(Client body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Client>> resultHandler) {
|
||||
Object localVarBody = body;
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'body' when calling testClassname"));
|
||||
return;
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/fake_classname_test";
|
||||
|
||||
// query params
|
||||
List<Pair> localVarQueryParams = new ArrayList<>();
|
||||
|
||||
// header params
|
||||
MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// cookie params
|
||||
MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// form params
|
||||
// TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client)
|
||||
Map<String, Object> localVarFormParams = new HashMap<>();
|
||||
|
||||
String[] localVarAccepts = { "application/json" };
|
||||
String[] localVarContentTypes = { "application/json" };
|
||||
String[] localVarAuthNames = new String[] { "api_key_query" };
|
||||
TypeReference<Client> localVarReturnType = new TypeReference<Client>() {};
|
||||
apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, localVarReturnType, resultHandler);
|
||||
}
|
||||
|
||||
private String encodeParameter(String parameter) {
|
||||
try {
|
||||
return URLEncoder.encode(parameter, StandardCharsets.UTF_8.name());
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
return parameter;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package org.openapitools.client.api;
|
||||
|
||||
import org.openapitools.client.ApiClient;
|
||||
import io.vertx.core.file.AsyncFile;
|
||||
import org.openapitools.client.model.ModelApiResponse;
|
||||
import org.openapitools.client.model.Pet;
|
||||
import java.util.Set;
|
||||
import io.vertx.core.AsyncResult;
|
||||
import io.vertx.core.Handler;
|
||||
import io.vertx.core.json.JsonObject;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public interface PetApi {
|
||||
|
||||
void addPet(Pet body, Handler<AsyncResult<Void>> handler);
|
||||
|
||||
void addPet(Pet body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> handler);
|
||||
|
||||
void deletePet(Long petId, String apiKey, Handler<AsyncResult<Void>> handler);
|
||||
|
||||
void deletePet(Long petId, String apiKey, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> handler);
|
||||
|
||||
void findPetsByStatus(List<String> status, Handler<AsyncResult<List<Pet>>> handler);
|
||||
|
||||
void findPetsByStatus(List<String> status, ApiClient.AuthInfo authInfo, Handler<AsyncResult<List<Pet>>> handler);
|
||||
|
||||
void findPetsByTags(Set<String> tags, Handler<AsyncResult<Set<Pet>>> handler);
|
||||
|
||||
void findPetsByTags(Set<String> tags, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Set<Pet>>> handler);
|
||||
|
||||
void getPetById(Long petId, Handler<AsyncResult<Pet>> handler);
|
||||
|
||||
void getPetById(Long petId, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Pet>> handler);
|
||||
|
||||
void updatePet(Pet body, Handler<AsyncResult<Void>> handler);
|
||||
|
||||
void updatePet(Pet body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> handler);
|
||||
|
||||
void updatePetWithForm(Long petId, String name, String status, Handler<AsyncResult<Void>> handler);
|
||||
|
||||
void updatePetWithForm(Long petId, String name, String status, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> handler);
|
||||
|
||||
void uploadFile(Long petId, String additionalMetadata, AsyncFile file, Handler<AsyncResult<ModelApiResponse>> handler);
|
||||
|
||||
void uploadFile(Long petId, String additionalMetadata, AsyncFile file, ApiClient.AuthInfo authInfo, Handler<AsyncResult<ModelApiResponse>> handler);
|
||||
|
||||
void uploadFileWithRequiredFile(Long petId, AsyncFile requiredFile, String additionalMetadata, Handler<AsyncResult<ModelApiResponse>> handler);
|
||||
|
||||
void uploadFileWithRequiredFile(Long petId, AsyncFile requiredFile, String additionalMetadata, ApiClient.AuthInfo authInfo, Handler<AsyncResult<ModelApiResponse>> handler);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,516 @@
|
||||
package org.openapitools.client.api;
|
||||
|
||||
import io.vertx.core.file.AsyncFile;
|
||||
import org.openapitools.client.model.ModelApiResponse;
|
||||
import org.openapitools.client.model.Pet;
|
||||
import java.util.Set;
|
||||
|
||||
import io.vertx.core.AsyncResult;
|
||||
import io.vertx.core.Handler;
|
||||
import io.vertx.core.MultiMap;
|
||||
import io.vertx.core.json.JsonObject;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.Configuration;
|
||||
import org.openapitools.client.Pair;
|
||||
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
public class PetApiImpl implements PetApi {
|
||||
|
||||
private ApiClient apiClient;
|
||||
|
||||
public PetApiImpl() {
|
||||
this(null);
|
||||
}
|
||||
|
||||
public PetApiImpl(ApiClient apiClient) {
|
||||
this.apiClient = apiClient != null ? apiClient : Configuration.getDefaultApiClient();
|
||||
}
|
||||
|
||||
public ApiClient getApiClient() {
|
||||
return apiClient;
|
||||
}
|
||||
|
||||
public void setApiClient(ApiClient apiClient) {
|
||||
this.apiClient = apiClient;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new pet to the store
|
||||
*
|
||||
* @param body Pet object that needs to be added to the store (required)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void addPet(Pet body, Handler<AsyncResult<Void>> resultHandler) {
|
||||
addPet(body, null, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new pet to the store
|
||||
*
|
||||
* @param body Pet object that needs to be added to the store (required)
|
||||
* @param authInfo per call authentication override.
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void addPet(Pet body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> resultHandler) {
|
||||
Object localVarBody = body;
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'body' when calling addPet"));
|
||||
return;
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/pet";
|
||||
|
||||
// query params
|
||||
List<Pair> localVarQueryParams = new ArrayList<>();
|
||||
|
||||
// header params
|
||||
MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// cookie params
|
||||
MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// form params
|
||||
// TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client)
|
||||
Map<String, Object> localVarFormParams = new HashMap<>();
|
||||
|
||||
String[] localVarAccepts = { };
|
||||
String[] localVarContentTypes = { "application/json", "application/xml" };
|
||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, null, resultHandler);
|
||||
}
|
||||
/**
|
||||
* Deletes a pet
|
||||
*
|
||||
* @param petId Pet id to delete (required)
|
||||
* @param apiKey (optional)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void deletePet(Long petId, String apiKey, Handler<AsyncResult<Void>> resultHandler) {
|
||||
deletePet(petId, apiKey, null, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a pet
|
||||
*
|
||||
* @param petId Pet id to delete (required)
|
||||
* @param apiKey (optional)
|
||||
* @param authInfo per call authentication override.
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void deletePet(Long petId, String apiKey, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> resultHandler) {
|
||||
Object localVarBody = null;
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId == null) {
|
||||
resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'petId' when calling deletePet"));
|
||||
return;
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/pet/{petId}".replaceAll("\\{" + "petId" + "\\}", encodeParameter(petId.toString()));
|
||||
|
||||
// query params
|
||||
List<Pair> localVarQueryParams = new ArrayList<>();
|
||||
|
||||
// header params
|
||||
MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap();
|
||||
if (apiKey != null)
|
||||
localVarHeaderParams.add("api_key", apiClient.parameterToString(apiKey));
|
||||
|
||||
// cookie params
|
||||
MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// form params
|
||||
// TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client)
|
||||
Map<String, Object> localVarFormParams = new HashMap<>();
|
||||
|
||||
String[] localVarAccepts = { };
|
||||
String[] localVarContentTypes = { };
|
||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, null, resultHandler);
|
||||
}
|
||||
/**
|
||||
* Finds Pets by status
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
* @param status Status values that need to be considered for filter (required)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void findPetsByStatus(List<String> status, Handler<AsyncResult<List<Pet>>> resultHandler) {
|
||||
findPetsByStatus(status, null, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds Pets by status
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
* @param status Status values that need to be considered for filter (required)
|
||||
* @param authInfo per call authentication override.
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void findPetsByStatus(List<String> status, ApiClient.AuthInfo authInfo, Handler<AsyncResult<List<Pet>>> resultHandler) {
|
||||
Object localVarBody = null;
|
||||
|
||||
// verify the required parameter 'status' is set
|
||||
if (status == null) {
|
||||
resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'status' when calling findPetsByStatus"));
|
||||
return;
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/pet/findByStatus";
|
||||
|
||||
// query params
|
||||
List<Pair> localVarQueryParams = new ArrayList<>();
|
||||
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "status", status));
|
||||
|
||||
// header params
|
||||
MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// cookie params
|
||||
MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// form params
|
||||
// TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client)
|
||||
Map<String, Object> localVarFormParams = new HashMap<>();
|
||||
|
||||
String[] localVarAccepts = { "application/xml", "application/json" };
|
||||
String[] localVarContentTypes = { };
|
||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||
TypeReference<List<Pet>> localVarReturnType = new TypeReference<List<Pet>>() {};
|
||||
apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, localVarReturnType, resultHandler);
|
||||
}
|
||||
/**
|
||||
* Finds Pets by tags
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* @param tags Tags to filter by (required)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void findPetsByTags(Set<String> tags, Handler<AsyncResult<Set<Pet>>> resultHandler) {
|
||||
findPetsByTags(tags, null, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds Pets by tags
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* @param tags Tags to filter by (required)
|
||||
* @param authInfo per call authentication override.
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void findPetsByTags(Set<String> tags, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Set<Pet>>> resultHandler) {
|
||||
Object localVarBody = null;
|
||||
|
||||
// verify the required parameter 'tags' is set
|
||||
if (tags == null) {
|
||||
resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'tags' when calling findPetsByTags"));
|
||||
return;
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/pet/findByTags";
|
||||
|
||||
// query params
|
||||
List<Pair> localVarQueryParams = new ArrayList<>();
|
||||
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "tags", tags));
|
||||
|
||||
// header params
|
||||
MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// cookie params
|
||||
MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// form params
|
||||
// TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client)
|
||||
Map<String, Object> localVarFormParams = new HashMap<>();
|
||||
|
||||
String[] localVarAccepts = { "application/xml", "application/json" };
|
||||
String[] localVarContentTypes = { };
|
||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||
TypeReference<Set<Pet>> localVarReturnType = new TypeReference<Set<Pet>>() {};
|
||||
apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, localVarReturnType, resultHandler);
|
||||
}
|
||||
/**
|
||||
* Find pet by ID
|
||||
* Returns a single pet
|
||||
* @param petId ID of pet to return (required)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void getPetById(Long petId, Handler<AsyncResult<Pet>> resultHandler) {
|
||||
getPetById(petId, null, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Find pet by ID
|
||||
* Returns a single pet
|
||||
* @param petId ID of pet to return (required)
|
||||
* @param authInfo per call authentication override.
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void getPetById(Long petId, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Pet>> resultHandler) {
|
||||
Object localVarBody = null;
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId == null) {
|
||||
resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'petId' when calling getPetById"));
|
||||
return;
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/pet/{petId}".replaceAll("\\{" + "petId" + "\\}", encodeParameter(petId.toString()));
|
||||
|
||||
// query params
|
||||
List<Pair> localVarQueryParams = new ArrayList<>();
|
||||
|
||||
// header params
|
||||
MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// cookie params
|
||||
MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// form params
|
||||
// TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client)
|
||||
Map<String, Object> localVarFormParams = new HashMap<>();
|
||||
|
||||
String[] localVarAccepts = { "application/xml", "application/json" };
|
||||
String[] localVarContentTypes = { };
|
||||
String[] localVarAuthNames = new String[] { "api_key" };
|
||||
TypeReference<Pet> localVarReturnType = new TypeReference<Pet>() {};
|
||||
apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, localVarReturnType, resultHandler);
|
||||
}
|
||||
/**
|
||||
* Update an existing pet
|
||||
*
|
||||
* @param body Pet object that needs to be added to the store (required)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void updatePet(Pet body, Handler<AsyncResult<Void>> resultHandler) {
|
||||
updatePet(body, null, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update an existing pet
|
||||
*
|
||||
* @param body Pet object that needs to be added to the store (required)
|
||||
* @param authInfo per call authentication override.
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void updatePet(Pet body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> resultHandler) {
|
||||
Object localVarBody = body;
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'body' when calling updatePet"));
|
||||
return;
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/pet";
|
||||
|
||||
// query params
|
||||
List<Pair> localVarQueryParams = new ArrayList<>();
|
||||
|
||||
// header params
|
||||
MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// cookie params
|
||||
MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// form params
|
||||
// TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client)
|
||||
Map<String, Object> localVarFormParams = new HashMap<>();
|
||||
|
||||
String[] localVarAccepts = { };
|
||||
String[] localVarContentTypes = { "application/json", "application/xml" };
|
||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, null, resultHandler);
|
||||
}
|
||||
/**
|
||||
* Updates a pet in the store with form data
|
||||
*
|
||||
* @param petId ID of pet that needs to be updated (required)
|
||||
* @param name Updated name of the pet (optional)
|
||||
* @param status Updated status of the pet (optional)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void updatePetWithForm(Long petId, String name, String status, Handler<AsyncResult<Void>> resultHandler) {
|
||||
updatePetWithForm(petId, name, status, null, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a pet in the store with form data
|
||||
*
|
||||
* @param petId ID of pet that needs to be updated (required)
|
||||
* @param name Updated name of the pet (optional)
|
||||
* @param status Updated status of the pet (optional)
|
||||
* @param authInfo per call authentication override.
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void updatePetWithForm(Long petId, String name, String status, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> resultHandler) {
|
||||
Object localVarBody = null;
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId == null) {
|
||||
resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'petId' when calling updatePetWithForm"));
|
||||
return;
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/pet/{petId}".replaceAll("\\{" + "petId" + "\\}", encodeParameter(petId.toString()));
|
||||
|
||||
// query params
|
||||
List<Pair> localVarQueryParams = new ArrayList<>();
|
||||
|
||||
// header params
|
||||
MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// cookie params
|
||||
MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// form params
|
||||
// TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client)
|
||||
Map<String, Object> localVarFormParams = new HashMap<>();
|
||||
if (name != null) localVarFormParams.put("name", name);
|
||||
if (status != null) localVarFormParams.put("status", status);
|
||||
|
||||
String[] localVarAccepts = { };
|
||||
String[] localVarContentTypes = { "application/x-www-form-urlencoded" };
|
||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, null, resultHandler);
|
||||
}
|
||||
/**
|
||||
* uploads an image
|
||||
*
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional)
|
||||
* @param file file to upload (optional)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void uploadFile(Long petId, String additionalMetadata, AsyncFile file, Handler<AsyncResult<ModelApiResponse>> resultHandler) {
|
||||
uploadFile(petId, additionalMetadata, file, null, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* uploads an image
|
||||
*
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional)
|
||||
* @param file file to upload (optional)
|
||||
* @param authInfo per call authentication override.
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void uploadFile(Long petId, String additionalMetadata, AsyncFile file, ApiClient.AuthInfo authInfo, Handler<AsyncResult<ModelApiResponse>> resultHandler) {
|
||||
Object localVarBody = null;
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId == null) {
|
||||
resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'petId' when calling uploadFile"));
|
||||
return;
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/pet/{petId}/uploadImage".replaceAll("\\{" + "petId" + "\\}", encodeParameter(petId.toString()));
|
||||
|
||||
// query params
|
||||
List<Pair> localVarQueryParams = new ArrayList<>();
|
||||
|
||||
// header params
|
||||
MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// cookie params
|
||||
MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// form params
|
||||
// TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client)
|
||||
Map<String, Object> localVarFormParams = new HashMap<>();
|
||||
if (additionalMetadata != null) localVarFormParams.put("additionalMetadata", additionalMetadata);
|
||||
if (file != null) localVarFormParams.put("file", file);
|
||||
|
||||
String[] localVarAccepts = { "application/json" };
|
||||
String[] localVarContentTypes = { "multipart/form-data" };
|
||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||
TypeReference<ModelApiResponse> localVarReturnType = new TypeReference<ModelApiResponse>() {};
|
||||
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, localVarReturnType, resultHandler);
|
||||
}
|
||||
/**
|
||||
* uploads an image (required)
|
||||
*
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param requiredFile file to upload (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void uploadFileWithRequiredFile(Long petId, AsyncFile requiredFile, String additionalMetadata, Handler<AsyncResult<ModelApiResponse>> resultHandler) {
|
||||
uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata, null, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* uploads an image (required)
|
||||
*
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param requiredFile file to upload (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional)
|
||||
* @param authInfo per call authentication override.
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void uploadFileWithRequiredFile(Long petId, AsyncFile requiredFile, String additionalMetadata, ApiClient.AuthInfo authInfo, Handler<AsyncResult<ModelApiResponse>> resultHandler) {
|
||||
Object localVarBody = null;
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId == null) {
|
||||
resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'petId' when calling uploadFileWithRequiredFile"));
|
||||
return;
|
||||
}
|
||||
|
||||
// verify the required parameter 'requiredFile' is set
|
||||
if (requiredFile == null) {
|
||||
resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'requiredFile' when calling uploadFileWithRequiredFile"));
|
||||
return;
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/fake/{petId}/uploadImageWithRequiredFile".replaceAll("\\{" + "petId" + "\\}", encodeParameter(petId.toString()));
|
||||
|
||||
// query params
|
||||
List<Pair> localVarQueryParams = new ArrayList<>();
|
||||
|
||||
// header params
|
||||
MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// cookie params
|
||||
MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// form params
|
||||
// TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client)
|
||||
Map<String, Object> localVarFormParams = new HashMap<>();
|
||||
if (additionalMetadata != null) localVarFormParams.put("additionalMetadata", additionalMetadata);
|
||||
if (requiredFile != null) localVarFormParams.put("requiredFile", requiredFile);
|
||||
|
||||
String[] localVarAccepts = { "application/json" };
|
||||
String[] localVarContentTypes = { "multipart/form-data" };
|
||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||
TypeReference<ModelApiResponse> localVarReturnType = new TypeReference<ModelApiResponse>() {};
|
||||
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, localVarReturnType, resultHandler);
|
||||
}
|
||||
|
||||
private String encodeParameter(String parameter) {
|
||||
try {
|
||||
return URLEncoder.encode(parameter, StandardCharsets.UTF_8.name());
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
return parameter;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package org.openapitools.client.api;
|
||||
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.model.Order;
|
||||
import io.vertx.core.AsyncResult;
|
||||
import io.vertx.core.Handler;
|
||||
import io.vertx.core.json.JsonObject;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public interface StoreApi {
|
||||
|
||||
void deleteOrder(String orderId, Handler<AsyncResult<Void>> handler);
|
||||
|
||||
void deleteOrder(String orderId, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> handler);
|
||||
|
||||
void getInventory(Handler<AsyncResult<Map<String, Integer>>> handler);
|
||||
|
||||
void getInventory(ApiClient.AuthInfo authInfo, Handler<AsyncResult<Map<String, Integer>>> handler);
|
||||
|
||||
void getOrderById(Long orderId, Handler<AsyncResult<Order>> handler);
|
||||
|
||||
void getOrderById(Long orderId, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Order>> handler);
|
||||
|
||||
void placeOrder(Order body, Handler<AsyncResult<Order>> handler);
|
||||
|
||||
void placeOrder(Order body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Order>> handler);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,235 @@
|
||||
package org.openapitools.client.api;
|
||||
|
||||
import org.openapitools.client.model.Order;
|
||||
|
||||
import io.vertx.core.AsyncResult;
|
||||
import io.vertx.core.Handler;
|
||||
import io.vertx.core.MultiMap;
|
||||
import io.vertx.core.json.JsonObject;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.Configuration;
|
||||
import org.openapitools.client.Pair;
|
||||
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
public class StoreApiImpl implements StoreApi {
|
||||
|
||||
private ApiClient apiClient;
|
||||
|
||||
public StoreApiImpl() {
|
||||
this(null);
|
||||
}
|
||||
|
||||
public StoreApiImpl(ApiClient apiClient) {
|
||||
this.apiClient = apiClient != null ? apiClient : Configuration.getDefaultApiClient();
|
||||
}
|
||||
|
||||
public ApiClient getApiClient() {
|
||||
return apiClient;
|
||||
}
|
||||
|
||||
public void setApiClient(ApiClient apiClient) {
|
||||
this.apiClient = apiClient;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete purchase order by ID
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* @param orderId ID of the order that needs to be deleted (required)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void deleteOrder(String orderId, Handler<AsyncResult<Void>> resultHandler) {
|
||||
deleteOrder(orderId, null, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete purchase order by ID
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* @param orderId ID of the order that needs to be deleted (required)
|
||||
* @param authInfo per call authentication override.
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void deleteOrder(String orderId, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> resultHandler) {
|
||||
Object localVarBody = null;
|
||||
|
||||
// verify the required parameter 'orderId' is set
|
||||
if (orderId == null) {
|
||||
resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'orderId' when calling deleteOrder"));
|
||||
return;
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/store/order/{order_id}".replaceAll("\\{" + "order_id" + "\\}", encodeParameter(orderId.toString()));
|
||||
|
||||
// query params
|
||||
List<Pair> localVarQueryParams = new ArrayList<>();
|
||||
|
||||
// header params
|
||||
MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// cookie params
|
||||
MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// form params
|
||||
// TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client)
|
||||
Map<String, Object> localVarFormParams = new HashMap<>();
|
||||
|
||||
String[] localVarAccepts = { };
|
||||
String[] localVarContentTypes = { };
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, null, resultHandler);
|
||||
}
|
||||
/**
|
||||
* Returns pet inventories by status
|
||||
* Returns a map of status codes to quantities
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void getInventory(Handler<AsyncResult<Map<String, Integer>>> resultHandler) {
|
||||
getInventory(null, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns pet inventories by status
|
||||
* Returns a map of status codes to quantities
|
||||
* @param authInfo per call authentication override.
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void getInventory(ApiClient.AuthInfo authInfo, Handler<AsyncResult<Map<String, Integer>>> resultHandler) {
|
||||
Object localVarBody = null;
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/store/inventory";
|
||||
|
||||
// query params
|
||||
List<Pair> localVarQueryParams = new ArrayList<>();
|
||||
|
||||
// header params
|
||||
MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// cookie params
|
||||
MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// form params
|
||||
// TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client)
|
||||
Map<String, Object> localVarFormParams = new HashMap<>();
|
||||
|
||||
String[] localVarAccepts = { "application/json" };
|
||||
String[] localVarContentTypes = { };
|
||||
String[] localVarAuthNames = new String[] { "api_key" };
|
||||
TypeReference<Map<String, Integer>> localVarReturnType = new TypeReference<Map<String, Integer>>() {};
|
||||
apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, localVarReturnType, resultHandler);
|
||||
}
|
||||
/**
|
||||
* Find purchase order by ID
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
* @param orderId ID of pet that needs to be fetched (required)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void getOrderById(Long orderId, Handler<AsyncResult<Order>> resultHandler) {
|
||||
getOrderById(orderId, null, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Find purchase order by ID
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
* @param orderId ID of pet that needs to be fetched (required)
|
||||
* @param authInfo per call authentication override.
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void getOrderById(Long orderId, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Order>> resultHandler) {
|
||||
Object localVarBody = null;
|
||||
|
||||
// verify the required parameter 'orderId' is set
|
||||
if (orderId == null) {
|
||||
resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'orderId' when calling getOrderById"));
|
||||
return;
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/store/order/{order_id}".replaceAll("\\{" + "order_id" + "\\}", encodeParameter(orderId.toString()));
|
||||
|
||||
// query params
|
||||
List<Pair> localVarQueryParams = new ArrayList<>();
|
||||
|
||||
// header params
|
||||
MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// cookie params
|
||||
MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// form params
|
||||
// TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client)
|
||||
Map<String, Object> localVarFormParams = new HashMap<>();
|
||||
|
||||
String[] localVarAccepts = { "application/xml", "application/json" };
|
||||
String[] localVarContentTypes = { };
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
TypeReference<Order> localVarReturnType = new TypeReference<Order>() {};
|
||||
apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, localVarReturnType, resultHandler);
|
||||
}
|
||||
/**
|
||||
* Place an order for a pet
|
||||
*
|
||||
* @param body order placed for purchasing the pet (required)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void placeOrder(Order body, Handler<AsyncResult<Order>> resultHandler) {
|
||||
placeOrder(body, null, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Place an order for a pet
|
||||
*
|
||||
* @param body order placed for purchasing the pet (required)
|
||||
* @param authInfo per call authentication override.
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void placeOrder(Order body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Order>> resultHandler) {
|
||||
Object localVarBody = body;
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'body' when calling placeOrder"));
|
||||
return;
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/store/order";
|
||||
|
||||
// query params
|
||||
List<Pair> localVarQueryParams = new ArrayList<>();
|
||||
|
||||
// header params
|
||||
MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// cookie params
|
||||
MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// form params
|
||||
// TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client)
|
||||
Map<String, Object> localVarFormParams = new HashMap<>();
|
||||
|
||||
String[] localVarAccepts = { "application/xml", "application/json" };
|
||||
String[] localVarContentTypes = { };
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
TypeReference<Order> localVarReturnType = new TypeReference<Order>() {};
|
||||
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, localVarReturnType, resultHandler);
|
||||
}
|
||||
|
||||
private String encodeParameter(String parameter) {
|
||||
try {
|
||||
return URLEncoder.encode(parameter, StandardCharsets.UTF_8.name());
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
return parameter;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package org.openapitools.client.api;
|
||||
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.model.User;
|
||||
import io.vertx.core.AsyncResult;
|
||||
import io.vertx.core.Handler;
|
||||
import io.vertx.core.json.JsonObject;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public interface UserApi {
|
||||
|
||||
void createUser(User body, Handler<AsyncResult<Void>> handler);
|
||||
|
||||
void createUser(User body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> handler);
|
||||
|
||||
void createUsersWithArrayInput(List<User> body, Handler<AsyncResult<Void>> handler);
|
||||
|
||||
void createUsersWithArrayInput(List<User> body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> handler);
|
||||
|
||||
void createUsersWithListInput(List<User> body, Handler<AsyncResult<Void>> handler);
|
||||
|
||||
void createUsersWithListInput(List<User> body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> handler);
|
||||
|
||||
void deleteUser(String username, Handler<AsyncResult<Void>> handler);
|
||||
|
||||
void deleteUser(String username, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> handler);
|
||||
|
||||
void getUserByName(String username, Handler<AsyncResult<User>> handler);
|
||||
|
||||
void getUserByName(String username, ApiClient.AuthInfo authInfo, Handler<AsyncResult<User>> handler);
|
||||
|
||||
void loginUser(String username, String password, Handler<AsyncResult<String>> handler);
|
||||
|
||||
void loginUser(String username, String password, ApiClient.AuthInfo authInfo, Handler<AsyncResult<String>> handler);
|
||||
|
||||
void logoutUser(Handler<AsyncResult<Void>> handler);
|
||||
|
||||
void logoutUser(ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> handler);
|
||||
|
||||
void updateUser(String username, User body, Handler<AsyncResult<Void>> handler);
|
||||
|
||||
void updateUser(String username, User body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> handler);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,445 @@
|
||||
package org.openapitools.client.api;
|
||||
|
||||
import org.openapitools.client.model.User;
|
||||
|
||||
import io.vertx.core.AsyncResult;
|
||||
import io.vertx.core.Handler;
|
||||
import io.vertx.core.MultiMap;
|
||||
import io.vertx.core.json.JsonObject;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.Configuration;
|
||||
import org.openapitools.client.Pair;
|
||||
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
public class UserApiImpl implements UserApi {
|
||||
|
||||
private ApiClient apiClient;
|
||||
|
||||
public UserApiImpl() {
|
||||
this(null);
|
||||
}
|
||||
|
||||
public UserApiImpl(ApiClient apiClient) {
|
||||
this.apiClient = apiClient != null ? apiClient : Configuration.getDefaultApiClient();
|
||||
}
|
||||
|
||||
public ApiClient getApiClient() {
|
||||
return apiClient;
|
||||
}
|
||||
|
||||
public void setApiClient(ApiClient apiClient) {
|
||||
this.apiClient = apiClient;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create user
|
||||
* This can only be done by the logged in user.
|
||||
* @param body Created user object (required)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void createUser(User body, Handler<AsyncResult<Void>> resultHandler) {
|
||||
createUser(body, null, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create user
|
||||
* This can only be done by the logged in user.
|
||||
* @param body Created user object (required)
|
||||
* @param authInfo per call authentication override.
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void createUser(User body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> resultHandler) {
|
||||
Object localVarBody = body;
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'body' when calling createUser"));
|
||||
return;
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/user";
|
||||
|
||||
// query params
|
||||
List<Pair> localVarQueryParams = new ArrayList<>();
|
||||
|
||||
// header params
|
||||
MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// cookie params
|
||||
MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// form params
|
||||
// TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client)
|
||||
Map<String, Object> localVarFormParams = new HashMap<>();
|
||||
|
||||
String[] localVarAccepts = { };
|
||||
String[] localVarContentTypes = { };
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, null, resultHandler);
|
||||
}
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
* @param body List of user object (required)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void createUsersWithArrayInput(List<User> body, Handler<AsyncResult<Void>> resultHandler) {
|
||||
createUsersWithArrayInput(body, null, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
* @param body List of user object (required)
|
||||
* @param authInfo per call authentication override.
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void createUsersWithArrayInput(List<User> body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> resultHandler) {
|
||||
Object localVarBody = body;
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'body' when calling createUsersWithArrayInput"));
|
||||
return;
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/user/createWithArray";
|
||||
|
||||
// query params
|
||||
List<Pair> localVarQueryParams = new ArrayList<>();
|
||||
|
||||
// header params
|
||||
MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// cookie params
|
||||
MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// form params
|
||||
// TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client)
|
||||
Map<String, Object> localVarFormParams = new HashMap<>();
|
||||
|
||||
String[] localVarAccepts = { };
|
||||
String[] localVarContentTypes = { };
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, null, resultHandler);
|
||||
}
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
* @param body List of user object (required)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void createUsersWithListInput(List<User> body, Handler<AsyncResult<Void>> resultHandler) {
|
||||
createUsersWithListInput(body, null, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
* @param body List of user object (required)
|
||||
* @param authInfo per call authentication override.
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void createUsersWithListInput(List<User> body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> resultHandler) {
|
||||
Object localVarBody = body;
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'body' when calling createUsersWithListInput"));
|
||||
return;
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/user/createWithList";
|
||||
|
||||
// query params
|
||||
List<Pair> localVarQueryParams = new ArrayList<>();
|
||||
|
||||
// header params
|
||||
MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// cookie params
|
||||
MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// form params
|
||||
// TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client)
|
||||
Map<String, Object> localVarFormParams = new HashMap<>();
|
||||
|
||||
String[] localVarAccepts = { };
|
||||
String[] localVarContentTypes = { };
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, null, resultHandler);
|
||||
}
|
||||
/**
|
||||
* Delete user
|
||||
* This can only be done by the logged in user.
|
||||
* @param username The name that needs to be deleted (required)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void deleteUser(String username, Handler<AsyncResult<Void>> resultHandler) {
|
||||
deleteUser(username, null, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete user
|
||||
* This can only be done by the logged in user.
|
||||
* @param username The name that needs to be deleted (required)
|
||||
* @param authInfo per call authentication override.
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void deleteUser(String username, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> resultHandler) {
|
||||
Object localVarBody = null;
|
||||
|
||||
// verify the required parameter 'username' is set
|
||||
if (username == null) {
|
||||
resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'username' when calling deleteUser"));
|
||||
return;
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/user/{username}".replaceAll("\\{" + "username" + "\\}", encodeParameter(username.toString()));
|
||||
|
||||
// query params
|
||||
List<Pair> localVarQueryParams = new ArrayList<>();
|
||||
|
||||
// header params
|
||||
MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// cookie params
|
||||
MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// form params
|
||||
// TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client)
|
||||
Map<String, Object> localVarFormParams = new HashMap<>();
|
||||
|
||||
String[] localVarAccepts = { };
|
||||
String[] localVarContentTypes = { };
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, null, resultHandler);
|
||||
}
|
||||
/**
|
||||
* Get user by user name
|
||||
*
|
||||
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void getUserByName(String username, Handler<AsyncResult<User>> resultHandler) {
|
||||
getUserByName(username, null, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user by user name
|
||||
*
|
||||
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @param authInfo per call authentication override.
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void getUserByName(String username, ApiClient.AuthInfo authInfo, Handler<AsyncResult<User>> resultHandler) {
|
||||
Object localVarBody = null;
|
||||
|
||||
// verify the required parameter 'username' is set
|
||||
if (username == null) {
|
||||
resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'username' when calling getUserByName"));
|
||||
return;
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/user/{username}".replaceAll("\\{" + "username" + "\\}", encodeParameter(username.toString()));
|
||||
|
||||
// query params
|
||||
List<Pair> localVarQueryParams = new ArrayList<>();
|
||||
|
||||
// header params
|
||||
MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// cookie params
|
||||
MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// form params
|
||||
// TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client)
|
||||
Map<String, Object> localVarFormParams = new HashMap<>();
|
||||
|
||||
String[] localVarAccepts = { "application/xml", "application/json" };
|
||||
String[] localVarContentTypes = { };
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
TypeReference<User> localVarReturnType = new TypeReference<User>() {};
|
||||
apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, localVarReturnType, resultHandler);
|
||||
}
|
||||
/**
|
||||
* Logs user into the system
|
||||
*
|
||||
* @param username The user name for login (required)
|
||||
* @param password The password for login in clear text (required)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void loginUser(String username, String password, Handler<AsyncResult<String>> resultHandler) {
|
||||
loginUser(username, password, null, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs user into the system
|
||||
*
|
||||
* @param username The user name for login (required)
|
||||
* @param password The password for login in clear text (required)
|
||||
* @param authInfo per call authentication override.
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void loginUser(String username, String password, ApiClient.AuthInfo authInfo, Handler<AsyncResult<String>> resultHandler) {
|
||||
Object localVarBody = null;
|
||||
|
||||
// verify the required parameter 'username' is set
|
||||
if (username == null) {
|
||||
resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'username' when calling loginUser"));
|
||||
return;
|
||||
}
|
||||
|
||||
// verify the required parameter 'password' is set
|
||||
if (password == null) {
|
||||
resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'password' when calling loginUser"));
|
||||
return;
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/user/login";
|
||||
|
||||
// query params
|
||||
List<Pair> localVarQueryParams = new ArrayList<>();
|
||||
localVarQueryParams.addAll(apiClient.parameterToPairs("", "username", username));
|
||||
localVarQueryParams.addAll(apiClient.parameterToPairs("", "password", password));
|
||||
|
||||
// header params
|
||||
MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// cookie params
|
||||
MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// form params
|
||||
// TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client)
|
||||
Map<String, Object> localVarFormParams = new HashMap<>();
|
||||
|
||||
String[] localVarAccepts = { "application/xml", "application/json" };
|
||||
String[] localVarContentTypes = { };
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
TypeReference<String> localVarReturnType = new TypeReference<String>() {};
|
||||
apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, localVarReturnType, resultHandler);
|
||||
}
|
||||
/**
|
||||
* Logs out current logged in user session
|
||||
*
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void logoutUser(Handler<AsyncResult<Void>> resultHandler) {
|
||||
logoutUser(null, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs out current logged in user session
|
||||
*
|
||||
* @param authInfo per call authentication override.
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void logoutUser(ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> resultHandler) {
|
||||
Object localVarBody = null;
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/user/logout";
|
||||
|
||||
// query params
|
||||
List<Pair> localVarQueryParams = new ArrayList<>();
|
||||
|
||||
// header params
|
||||
MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// cookie params
|
||||
MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// form params
|
||||
// TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client)
|
||||
Map<String, Object> localVarFormParams = new HashMap<>();
|
||||
|
||||
String[] localVarAccepts = { };
|
||||
String[] localVarContentTypes = { };
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, null, resultHandler);
|
||||
}
|
||||
/**
|
||||
* Updated user
|
||||
* This can only be done by the logged in user.
|
||||
* @param username name that need to be deleted (required)
|
||||
* @param body Updated user object (required)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void updateUser(String username, User body, Handler<AsyncResult<Void>> resultHandler) {
|
||||
updateUser(username, body, null, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updated user
|
||||
* This can only be done by the logged in user.
|
||||
* @param username name that need to be deleted (required)
|
||||
* @param body Updated user object (required)
|
||||
* @param authInfo per call authentication override.
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void updateUser(String username, User body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> resultHandler) {
|
||||
Object localVarBody = body;
|
||||
|
||||
// verify the required parameter 'username' is set
|
||||
if (username == null) {
|
||||
resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'username' when calling updateUser"));
|
||||
return;
|
||||
}
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'body' when calling updateUser"));
|
||||
return;
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/user/{username}".replaceAll("\\{" + "username" + "\\}", encodeParameter(username.toString()));
|
||||
|
||||
// query params
|
||||
List<Pair> localVarQueryParams = new ArrayList<>();
|
||||
|
||||
// header params
|
||||
MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// cookie params
|
||||
MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap();
|
||||
|
||||
// form params
|
||||
// TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client)
|
||||
Map<String, Object> localVarFormParams = new HashMap<>();
|
||||
|
||||
String[] localVarAccepts = { };
|
||||
String[] localVarContentTypes = { };
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, null, resultHandler);
|
||||
}
|
||||
|
||||
private String encodeParameter(String parameter) {
|
||||
try {
|
||||
return URLEncoder.encode(parameter, StandardCharsets.UTF_8.name());
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
return parameter;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package org.openapitools.client.api.rxjava;
|
||||
|
||||
import org.openapitools.client.model.Client;
|
||||
import org.openapitools.client.ApiClient;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import rx.Single;
|
||||
import io.vertx.core.AsyncResult;
|
||||
import io.vertx.core.Handler;
|
||||
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
public class AnotherFakeApi {
|
||||
|
||||
private final org.openapitools.client.api.AnotherFakeApi delegate;
|
||||
|
||||
public AnotherFakeApi(org.openapitools.client.api.AnotherFakeApi delegate) {
|
||||
this.delegate = delegate;
|
||||
}
|
||||
|
||||
public org.openapitools.client.api.AnotherFakeApi getDelegate() {
|
||||
return delegate;
|
||||
}
|
||||
|
||||
/**
|
||||
* To test special tags
|
||||
* To test special tags and operation ID starting with number
|
||||
* @param body client model (required)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void call123testSpecialTags(Client body, Handler<AsyncResult<Client>> resultHandler) {
|
||||
delegate.call123testSpecialTags(body, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* To test special tags
|
||||
* To test special tags and operation ID starting with number
|
||||
* @param body client model (required)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void call123testSpecialTags(Client body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Client>> resultHandler) {
|
||||
delegate.call123testSpecialTags(body, authInfo, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* To test special tags
|
||||
* To test special tags and operation ID starting with number
|
||||
* @param body client model (required)
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Client> rxCall123testSpecialTags(Client body) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.call123testSpecialTags(body, fut)
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* To test special tags
|
||||
* To test special tags and operation ID starting with number
|
||||
* @param body client model (required)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Client> rxCall123testSpecialTags(Client body, ApiClient.AuthInfo authInfo) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.call123testSpecialTags(body, authInfo, fut)
|
||||
));
|
||||
}
|
||||
|
||||
public static AnotherFakeApi newInstance(org.openapitools.client.api.AnotherFakeApi arg) {
|
||||
return arg != null ? new AnotherFakeApi(arg) : null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,791 @@
|
||||
package org.openapitools.client.api.rxjava;
|
||||
|
||||
import io.vertx.core.file.AsyncFile;
|
||||
import java.math.BigDecimal;
|
||||
import org.openapitools.client.model.Client;
|
||||
import org.openapitools.client.model.FileSchemaTestClass;
|
||||
import org.threeten.bp.LocalDate;
|
||||
import org.threeten.bp.OffsetDateTime;
|
||||
import org.openapitools.client.model.OuterComposite;
|
||||
import org.openapitools.client.model.User;
|
||||
import org.openapitools.client.model.XmlItem;
|
||||
import org.openapitools.client.ApiClient;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import rx.Single;
|
||||
import io.vertx.core.AsyncResult;
|
||||
import io.vertx.core.Handler;
|
||||
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
public class FakeApi {
|
||||
|
||||
private final org.openapitools.client.api.FakeApi delegate;
|
||||
|
||||
public FakeApi(org.openapitools.client.api.FakeApi delegate) {
|
||||
this.delegate = delegate;
|
||||
}
|
||||
|
||||
public org.openapitools.client.api.FakeApi getDelegate() {
|
||||
return delegate;
|
||||
}
|
||||
|
||||
/**
|
||||
* creates an XmlItem
|
||||
* this route creates an XmlItem
|
||||
* @param xmlItem XmlItem Body (required)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void createXmlItem(XmlItem xmlItem, Handler<AsyncResult<Void>> resultHandler) {
|
||||
delegate.createXmlItem(xmlItem, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* creates an XmlItem
|
||||
* this route creates an XmlItem
|
||||
* @param xmlItem XmlItem Body (required)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void createXmlItem(XmlItem xmlItem, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> resultHandler) {
|
||||
delegate.createXmlItem(xmlItem, authInfo, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* creates an XmlItem
|
||||
* this route creates an XmlItem
|
||||
* @param xmlItem XmlItem Body (required)
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Void> rxCreateXmlItem(XmlItem xmlItem) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.createXmlItem(xmlItem, fut)
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* creates an XmlItem
|
||||
* this route creates an XmlItem
|
||||
* @param xmlItem XmlItem Body (required)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Void> rxCreateXmlItem(XmlItem xmlItem, ApiClient.AuthInfo authInfo) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.createXmlItem(xmlItem, authInfo, fut)
|
||||
));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* Test serialization of outer boolean types
|
||||
* @param body Input boolean as post body (optional)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void fakeOuterBooleanSerialize(Boolean body, Handler<AsyncResult<Boolean>> resultHandler) {
|
||||
delegate.fakeOuterBooleanSerialize(body, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Test serialization of outer boolean types
|
||||
* @param body Input boolean as post body (optional)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void fakeOuterBooleanSerialize(Boolean body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Boolean>> resultHandler) {
|
||||
delegate.fakeOuterBooleanSerialize(body, authInfo, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Test serialization of outer boolean types
|
||||
* @param body Input boolean as post body (optional)
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Boolean> rxFakeOuterBooleanSerialize(Boolean body) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.fakeOuterBooleanSerialize(body, fut)
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Test serialization of outer boolean types
|
||||
* @param body Input boolean as post body (optional)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Boolean> rxFakeOuterBooleanSerialize(Boolean body, ApiClient.AuthInfo authInfo) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.fakeOuterBooleanSerialize(body, authInfo, fut)
|
||||
));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* Test serialization of object with outer number type
|
||||
* @param body Input composite as post body (optional)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void fakeOuterCompositeSerialize(OuterComposite body, Handler<AsyncResult<OuterComposite>> resultHandler) {
|
||||
delegate.fakeOuterCompositeSerialize(body, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Test serialization of object with outer number type
|
||||
* @param body Input composite as post body (optional)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void fakeOuterCompositeSerialize(OuterComposite body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<OuterComposite>> resultHandler) {
|
||||
delegate.fakeOuterCompositeSerialize(body, authInfo, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Test serialization of object with outer number type
|
||||
* @param body Input composite as post body (optional)
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<OuterComposite> rxFakeOuterCompositeSerialize(OuterComposite body) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.fakeOuterCompositeSerialize(body, fut)
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Test serialization of object with outer number type
|
||||
* @param body Input composite as post body (optional)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<OuterComposite> rxFakeOuterCompositeSerialize(OuterComposite body, ApiClient.AuthInfo authInfo) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.fakeOuterCompositeSerialize(body, authInfo, fut)
|
||||
));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* Test serialization of outer number types
|
||||
* @param body Input number as post body (optional)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void fakeOuterNumberSerialize(BigDecimal body, Handler<AsyncResult<BigDecimal>> resultHandler) {
|
||||
delegate.fakeOuterNumberSerialize(body, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Test serialization of outer number types
|
||||
* @param body Input number as post body (optional)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void fakeOuterNumberSerialize(BigDecimal body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<BigDecimal>> resultHandler) {
|
||||
delegate.fakeOuterNumberSerialize(body, authInfo, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Test serialization of outer number types
|
||||
* @param body Input number as post body (optional)
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<BigDecimal> rxFakeOuterNumberSerialize(BigDecimal body) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.fakeOuterNumberSerialize(body, fut)
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Test serialization of outer number types
|
||||
* @param body Input number as post body (optional)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<BigDecimal> rxFakeOuterNumberSerialize(BigDecimal body, ApiClient.AuthInfo authInfo) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.fakeOuterNumberSerialize(body, authInfo, fut)
|
||||
));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* Test serialization of outer string types
|
||||
* @param body Input string as post body (optional)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void fakeOuterStringSerialize(String body, Handler<AsyncResult<String>> resultHandler) {
|
||||
delegate.fakeOuterStringSerialize(body, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Test serialization of outer string types
|
||||
* @param body Input string as post body (optional)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void fakeOuterStringSerialize(String body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<String>> resultHandler) {
|
||||
delegate.fakeOuterStringSerialize(body, authInfo, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Test serialization of outer string types
|
||||
* @param body Input string as post body (optional)
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<String> rxFakeOuterStringSerialize(String body) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.fakeOuterStringSerialize(body, fut)
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Test serialization of outer string types
|
||||
* @param body Input string as post body (optional)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<String> rxFakeOuterStringSerialize(String body, ApiClient.AuthInfo authInfo) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.fakeOuterStringSerialize(body, authInfo, fut)
|
||||
));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* For this test, the body for this request much reference a schema named `File`.
|
||||
* @param body (required)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void testBodyWithFileSchema(FileSchemaTestClass body, Handler<AsyncResult<Void>> resultHandler) {
|
||||
delegate.testBodyWithFileSchema(body, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* For this test, the body for this request much reference a schema named `File`.
|
||||
* @param body (required)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void testBodyWithFileSchema(FileSchemaTestClass body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> resultHandler) {
|
||||
delegate.testBodyWithFileSchema(body, authInfo, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* For this test, the body for this request much reference a schema named `File`.
|
||||
* @param body (required)
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Void> rxTestBodyWithFileSchema(FileSchemaTestClass body) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.testBodyWithFileSchema(body, fut)
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* For this test, the body for this request much reference a schema named `File`.
|
||||
* @param body (required)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Void> rxTestBodyWithFileSchema(FileSchemaTestClass body, ApiClient.AuthInfo authInfo) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.testBodyWithFileSchema(body, authInfo, fut)
|
||||
));
|
||||
}
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param query (required)
|
||||
* @param body (required)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void testBodyWithQueryParams(String query, User body, Handler<AsyncResult<Void>> resultHandler) {
|
||||
delegate.testBodyWithQueryParams(query, body, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param query (required)
|
||||
* @param body (required)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void testBodyWithQueryParams(String query, User body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> resultHandler) {
|
||||
delegate.testBodyWithQueryParams(query, body, authInfo, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param query (required)
|
||||
* @param body (required)
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Void> rxTestBodyWithQueryParams(String query, User body) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.testBodyWithQueryParams(query, body, fut)
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param query (required)
|
||||
* @param body (required)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Void> rxTestBodyWithQueryParams(String query, User body, ApiClient.AuthInfo authInfo) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.testBodyWithQueryParams(query, body, authInfo, fut)
|
||||
));
|
||||
}
|
||||
/**
|
||||
* To test \"client\" model
|
||||
* To test \"client\" model
|
||||
* @param body client model (required)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void testClientModel(Client body, Handler<AsyncResult<Client>> resultHandler) {
|
||||
delegate.testClientModel(body, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* To test \"client\" model
|
||||
* To test \"client\" model
|
||||
* @param body client model (required)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void testClientModel(Client body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Client>> resultHandler) {
|
||||
delegate.testClientModel(body, authInfo, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* To test \"client\" model
|
||||
* To test \"client\" model
|
||||
* @param body client model (required)
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Client> rxTestClientModel(Client body) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.testClientModel(body, fut)
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* To test \"client\" model
|
||||
* To test \"client\" model
|
||||
* @param body client model (required)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Client> rxTestClientModel(Client body, ApiClient.AuthInfo authInfo) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.testClientModel(body, authInfo, fut)
|
||||
));
|
||||
}
|
||||
/**
|
||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
* @param number None (required)
|
||||
* @param _double None (required)
|
||||
* @param patternWithoutDelimiter None (required)
|
||||
* @param _byte None (required)
|
||||
* @param integer None (optional)
|
||||
* @param int32 None (optional)
|
||||
* @param int64 None (optional)
|
||||
* @param _float None (optional)
|
||||
* @param string None (optional)
|
||||
* @param binary None (optional)
|
||||
* @param date None (optional)
|
||||
* @param dateTime None (optional)
|
||||
* @param password None (optional)
|
||||
* @param paramCallback None (optional)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, AsyncFile binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback, Handler<AsyncResult<Void>> resultHandler) {
|
||||
delegate.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
* @param number None (required)
|
||||
* @param _double None (required)
|
||||
* @param patternWithoutDelimiter None (required)
|
||||
* @param _byte None (required)
|
||||
* @param integer None (optional)
|
||||
* @param int32 None (optional)
|
||||
* @param int64 None (optional)
|
||||
* @param _float None (optional)
|
||||
* @param string None (optional)
|
||||
* @param binary None (optional)
|
||||
* @param date None (optional)
|
||||
* @param dateTime None (optional)
|
||||
* @param password None (optional)
|
||||
* @param paramCallback None (optional)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, AsyncFile binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> resultHandler) {
|
||||
delegate.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback, authInfo, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
* @param number None (required)
|
||||
* @param _double None (required)
|
||||
* @param patternWithoutDelimiter None (required)
|
||||
* @param _byte None (required)
|
||||
* @param integer None (optional)
|
||||
* @param int32 None (optional)
|
||||
* @param int64 None (optional)
|
||||
* @param _float None (optional)
|
||||
* @param string None (optional)
|
||||
* @param binary None (optional)
|
||||
* @param date None (optional)
|
||||
* @param dateTime None (optional)
|
||||
* @param password None (optional)
|
||||
* @param paramCallback None (optional)
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Void> rxTestEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, AsyncFile binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback, fut)
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
* @param number None (required)
|
||||
* @param _double None (required)
|
||||
* @param patternWithoutDelimiter None (required)
|
||||
* @param _byte None (required)
|
||||
* @param integer None (optional)
|
||||
* @param int32 None (optional)
|
||||
* @param int64 None (optional)
|
||||
* @param _float None (optional)
|
||||
* @param string None (optional)
|
||||
* @param binary None (optional)
|
||||
* @param date None (optional)
|
||||
* @param dateTime None (optional)
|
||||
* @param password None (optional)
|
||||
* @param paramCallback None (optional)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Void> rxTestEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, AsyncFile binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback, ApiClient.AuthInfo authInfo) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback, authInfo, fut)
|
||||
));
|
||||
}
|
||||
/**
|
||||
* To test enum parameters
|
||||
* To test enum parameters
|
||||
* @param enumHeaderStringArray Header parameter enum test (string array) (optional, default to new ArrayList<>())
|
||||
* @param enumHeaderString Header parameter enum test (string) (optional, default to -efg)
|
||||
* @param enumQueryStringArray Query parameter enum test (string array) (optional, default to new ArrayList<>())
|
||||
* @param enumQueryString Query parameter enum test (string) (optional, default to -efg)
|
||||
* @param enumQueryInteger Query parameter enum test (double) (optional)
|
||||
* @param enumQueryDouble Query parameter enum test (double) (optional)
|
||||
* @param enumFormStringArray Form parameter enum test (string array) (optional, default to $)
|
||||
* @param enumFormString Form parameter enum test (string) (optional, default to -efg)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void testEnumParameters(List<String> enumHeaderStringArray, String enumHeaderString, List<String> enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List<String> enumFormStringArray, String enumFormString, Handler<AsyncResult<Void>> resultHandler) {
|
||||
delegate.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* To test enum parameters
|
||||
* To test enum parameters
|
||||
* @param enumHeaderStringArray Header parameter enum test (string array) (optional, default to new ArrayList<>())
|
||||
* @param enumHeaderString Header parameter enum test (string) (optional, default to -efg)
|
||||
* @param enumQueryStringArray Query parameter enum test (string array) (optional, default to new ArrayList<>())
|
||||
* @param enumQueryString Query parameter enum test (string) (optional, default to -efg)
|
||||
* @param enumQueryInteger Query parameter enum test (double) (optional)
|
||||
* @param enumQueryDouble Query parameter enum test (double) (optional)
|
||||
* @param enumFormStringArray Form parameter enum test (string array) (optional, default to $)
|
||||
* @param enumFormString Form parameter enum test (string) (optional, default to -efg)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void testEnumParameters(List<String> enumHeaderStringArray, String enumHeaderString, List<String> enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List<String> enumFormStringArray, String enumFormString, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> resultHandler) {
|
||||
delegate.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, authInfo, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* To test enum parameters
|
||||
* To test enum parameters
|
||||
* @param enumHeaderStringArray Header parameter enum test (string array) (optional, default to new ArrayList<>())
|
||||
* @param enumHeaderString Header parameter enum test (string) (optional, default to -efg)
|
||||
* @param enumQueryStringArray Query parameter enum test (string array) (optional, default to new ArrayList<>())
|
||||
* @param enumQueryString Query parameter enum test (string) (optional, default to -efg)
|
||||
* @param enumQueryInteger Query parameter enum test (double) (optional)
|
||||
* @param enumQueryDouble Query parameter enum test (double) (optional)
|
||||
* @param enumFormStringArray Form parameter enum test (string array) (optional, default to $)
|
||||
* @param enumFormString Form parameter enum test (string) (optional, default to -efg)
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Void> rxTestEnumParameters(List<String> enumHeaderStringArray, String enumHeaderString, List<String> enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List<String> enumFormStringArray, String enumFormString) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, fut)
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* To test enum parameters
|
||||
* To test enum parameters
|
||||
* @param enumHeaderStringArray Header parameter enum test (string array) (optional, default to new ArrayList<>())
|
||||
* @param enumHeaderString Header parameter enum test (string) (optional, default to -efg)
|
||||
* @param enumQueryStringArray Query parameter enum test (string array) (optional, default to new ArrayList<>())
|
||||
* @param enumQueryString Query parameter enum test (string) (optional, default to -efg)
|
||||
* @param enumQueryInteger Query parameter enum test (double) (optional)
|
||||
* @param enumQueryDouble Query parameter enum test (double) (optional)
|
||||
* @param enumFormStringArray Form parameter enum test (string array) (optional, default to $)
|
||||
* @param enumFormString Form parameter enum test (string) (optional, default to -efg)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Void> rxTestEnumParameters(List<String> enumHeaderStringArray, String enumHeaderString, List<String> enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List<String> enumFormStringArray, String enumFormString, ApiClient.AuthInfo authInfo) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, authInfo, fut)
|
||||
));
|
||||
}
|
||||
/**
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
* @param requiredStringGroup Required String in group parameters (required)
|
||||
* @param requiredBooleanGroup Required Boolean in group parameters (required)
|
||||
* @param requiredInt64Group Required Integer in group parameters (required)
|
||||
* @param stringGroup String in group parameters (optional)
|
||||
* @param booleanGroup Boolean in group parameters (optional)
|
||||
* @param int64Group Integer in group parameters (optional)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void testGroupParameters(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group, Handler<AsyncResult<Void>> resultHandler) {
|
||||
delegate.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
* @param requiredStringGroup Required String in group parameters (required)
|
||||
* @param requiredBooleanGroup Required Boolean in group parameters (required)
|
||||
* @param requiredInt64Group Required Integer in group parameters (required)
|
||||
* @param stringGroup String in group parameters (optional)
|
||||
* @param booleanGroup Boolean in group parameters (optional)
|
||||
* @param int64Group Integer in group parameters (optional)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void testGroupParameters(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> resultHandler) {
|
||||
delegate.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, authInfo, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
* @param requiredStringGroup Required String in group parameters (required)
|
||||
* @param requiredBooleanGroup Required Boolean in group parameters (required)
|
||||
* @param requiredInt64Group Required Integer in group parameters (required)
|
||||
* @param stringGroup String in group parameters (optional)
|
||||
* @param booleanGroup Boolean in group parameters (optional)
|
||||
* @param int64Group Integer in group parameters (optional)
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Void> rxTestGroupParameters(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, fut)
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
* @param requiredStringGroup Required String in group parameters (required)
|
||||
* @param requiredBooleanGroup Required Boolean in group parameters (required)
|
||||
* @param requiredInt64Group Required Integer in group parameters (required)
|
||||
* @param stringGroup String in group parameters (optional)
|
||||
* @param booleanGroup Boolean in group parameters (optional)
|
||||
* @param int64Group Integer in group parameters (optional)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Void> rxTestGroupParameters(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group, ApiClient.AuthInfo authInfo) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, authInfo, fut)
|
||||
));
|
||||
}
|
||||
/**
|
||||
* test inline additionalProperties
|
||||
*
|
||||
* @param param request body (required)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void testInlineAdditionalProperties(Map<String, String> param, Handler<AsyncResult<Void>> resultHandler) {
|
||||
delegate.testInlineAdditionalProperties(param, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* test inline additionalProperties
|
||||
*
|
||||
* @param param request body (required)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void testInlineAdditionalProperties(Map<String, String> param, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> resultHandler) {
|
||||
delegate.testInlineAdditionalProperties(param, authInfo, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* test inline additionalProperties
|
||||
*
|
||||
* @param param request body (required)
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Void> rxTestInlineAdditionalProperties(Map<String, String> param) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.testInlineAdditionalProperties(param, fut)
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* test inline additionalProperties
|
||||
*
|
||||
* @param param request body (required)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Void> rxTestInlineAdditionalProperties(Map<String, String> param, ApiClient.AuthInfo authInfo) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.testInlineAdditionalProperties(param, authInfo, fut)
|
||||
));
|
||||
}
|
||||
/**
|
||||
* test json serialization of form data
|
||||
*
|
||||
* @param param field1 (required)
|
||||
* @param param2 field2 (required)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void testJsonFormData(String param, String param2, Handler<AsyncResult<Void>> resultHandler) {
|
||||
delegate.testJsonFormData(param, param2, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* test json serialization of form data
|
||||
*
|
||||
* @param param field1 (required)
|
||||
* @param param2 field2 (required)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void testJsonFormData(String param, String param2, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> resultHandler) {
|
||||
delegate.testJsonFormData(param, param2, authInfo, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* test json serialization of form data
|
||||
*
|
||||
* @param param field1 (required)
|
||||
* @param param2 field2 (required)
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Void> rxTestJsonFormData(String param, String param2) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.testJsonFormData(param, param2, fut)
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* test json serialization of form data
|
||||
*
|
||||
* @param param field1 (required)
|
||||
* @param param2 field2 (required)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Void> rxTestJsonFormData(String param, String param2, ApiClient.AuthInfo authInfo) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.testJsonFormData(param, param2, authInfo, fut)
|
||||
));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* To test the collection format in query parameters
|
||||
* @param pipe (required)
|
||||
* @param ioutil (required)
|
||||
* @param http (required)
|
||||
* @param url (required)
|
||||
* @param context (required)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void testQueryParameterCollectionFormat(List<String> pipe, List<String> ioutil, List<String> http, List<String> url, List<String> context, Handler<AsyncResult<Void>> resultHandler) {
|
||||
delegate.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* To test the collection format in query parameters
|
||||
* @param pipe (required)
|
||||
* @param ioutil (required)
|
||||
* @param http (required)
|
||||
* @param url (required)
|
||||
* @param context (required)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void testQueryParameterCollectionFormat(List<String> pipe, List<String> ioutil, List<String> http, List<String> url, List<String> context, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> resultHandler) {
|
||||
delegate.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, authInfo, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* To test the collection format in query parameters
|
||||
* @param pipe (required)
|
||||
* @param ioutil (required)
|
||||
* @param http (required)
|
||||
* @param url (required)
|
||||
* @param context (required)
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Void> rxTestQueryParameterCollectionFormat(List<String> pipe, List<String> ioutil, List<String> http, List<String> url, List<String> context) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, fut)
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* To test the collection format in query parameters
|
||||
* @param pipe (required)
|
||||
* @param ioutil (required)
|
||||
* @param http (required)
|
||||
* @param url (required)
|
||||
* @param context (required)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Void> rxTestQueryParameterCollectionFormat(List<String> pipe, List<String> ioutil, List<String> http, List<String> url, List<String> context, ApiClient.AuthInfo authInfo) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, authInfo, fut)
|
||||
));
|
||||
}
|
||||
|
||||
public static FakeApi newInstance(org.openapitools.client.api.FakeApi arg) {
|
||||
return arg != null ? new FakeApi(arg) : null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package org.openapitools.client.api.rxjava;
|
||||
|
||||
import org.openapitools.client.model.Client;
|
||||
import org.openapitools.client.ApiClient;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import rx.Single;
|
||||
import io.vertx.core.AsyncResult;
|
||||
import io.vertx.core.Handler;
|
||||
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
public class FakeClassnameTags123Api {
|
||||
|
||||
private final org.openapitools.client.api.FakeClassnameTags123Api delegate;
|
||||
|
||||
public FakeClassnameTags123Api(org.openapitools.client.api.FakeClassnameTags123Api delegate) {
|
||||
this.delegate = delegate;
|
||||
}
|
||||
|
||||
public org.openapitools.client.api.FakeClassnameTags123Api getDelegate() {
|
||||
return delegate;
|
||||
}
|
||||
|
||||
/**
|
||||
* To test class name in snake case
|
||||
* To test class name in snake case
|
||||
* @param body client model (required)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void testClassname(Client body, Handler<AsyncResult<Client>> resultHandler) {
|
||||
delegate.testClassname(body, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* To test class name in snake case
|
||||
* To test class name in snake case
|
||||
* @param body client model (required)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void testClassname(Client body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Client>> resultHandler) {
|
||||
delegate.testClassname(body, authInfo, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* To test class name in snake case
|
||||
* To test class name in snake case
|
||||
* @param body client model (required)
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Client> rxTestClassname(Client body) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.testClassname(body, fut)
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* To test class name in snake case
|
||||
* To test class name in snake case
|
||||
* @param body client model (required)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Client> rxTestClassname(Client body, ApiClient.AuthInfo authInfo) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.testClassname(body, authInfo, fut)
|
||||
));
|
||||
}
|
||||
|
||||
public static FakeClassnameTags123Api newInstance(org.openapitools.client.api.FakeClassnameTags123Api arg) {
|
||||
return arg != null ? new FakeClassnameTags123Api(arg) : null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,465 @@
|
||||
package org.openapitools.client.api.rxjava;
|
||||
|
||||
import io.vertx.core.file.AsyncFile;
|
||||
import org.openapitools.client.model.ModelApiResponse;
|
||||
import org.openapitools.client.model.Pet;
|
||||
import java.util.Set;
|
||||
import org.openapitools.client.ApiClient;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import rx.Single;
|
||||
import io.vertx.core.AsyncResult;
|
||||
import io.vertx.core.Handler;
|
||||
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
public class PetApi {
|
||||
|
||||
private final org.openapitools.client.api.PetApi delegate;
|
||||
|
||||
public PetApi(org.openapitools.client.api.PetApi delegate) {
|
||||
this.delegate = delegate;
|
||||
}
|
||||
|
||||
public org.openapitools.client.api.PetApi getDelegate() {
|
||||
return delegate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new pet to the store
|
||||
*
|
||||
* @param body Pet object that needs to be added to the store (required)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void addPet(Pet body, Handler<AsyncResult<Void>> resultHandler) {
|
||||
delegate.addPet(body, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new pet to the store
|
||||
*
|
||||
* @param body Pet object that needs to be added to the store (required)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void addPet(Pet body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> resultHandler) {
|
||||
delegate.addPet(body, authInfo, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new pet to the store
|
||||
*
|
||||
* @param body Pet object that needs to be added to the store (required)
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Void> rxAddPet(Pet body) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.addPet(body, fut)
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new pet to the store
|
||||
*
|
||||
* @param body Pet object that needs to be added to the store (required)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Void> rxAddPet(Pet body, ApiClient.AuthInfo authInfo) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.addPet(body, authInfo, fut)
|
||||
));
|
||||
}
|
||||
/**
|
||||
* Deletes a pet
|
||||
*
|
||||
* @param petId Pet id to delete (required)
|
||||
* @param apiKey (optional)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void deletePet(Long petId, String apiKey, Handler<AsyncResult<Void>> resultHandler) {
|
||||
delegate.deletePet(petId, apiKey, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a pet
|
||||
*
|
||||
* @param petId Pet id to delete (required)
|
||||
* @param apiKey (optional)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void deletePet(Long petId, String apiKey, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> resultHandler) {
|
||||
delegate.deletePet(petId, apiKey, authInfo, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a pet
|
||||
*
|
||||
* @param petId Pet id to delete (required)
|
||||
* @param apiKey (optional)
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Void> rxDeletePet(Long petId, String apiKey) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.deletePet(petId, apiKey, fut)
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a pet
|
||||
*
|
||||
* @param petId Pet id to delete (required)
|
||||
* @param apiKey (optional)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Void> rxDeletePet(Long petId, String apiKey, ApiClient.AuthInfo authInfo) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.deletePet(petId, apiKey, authInfo, fut)
|
||||
));
|
||||
}
|
||||
/**
|
||||
* Finds Pets by status
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
* @param status Status values that need to be considered for filter (required)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void findPetsByStatus(List<String> status, Handler<AsyncResult<List<Pet>>> resultHandler) {
|
||||
delegate.findPetsByStatus(status, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds Pets by status
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
* @param status Status values that need to be considered for filter (required)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void findPetsByStatus(List<String> status, ApiClient.AuthInfo authInfo, Handler<AsyncResult<List<Pet>>> resultHandler) {
|
||||
delegate.findPetsByStatus(status, authInfo, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds Pets by status
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
* @param status Status values that need to be considered for filter (required)
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<List<Pet>> rxFindPetsByStatus(List<String> status) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.findPetsByStatus(status, fut)
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds Pets by status
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
* @param status Status values that need to be considered for filter (required)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<List<Pet>> rxFindPetsByStatus(List<String> status, ApiClient.AuthInfo authInfo) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.findPetsByStatus(status, authInfo, fut)
|
||||
));
|
||||
}
|
||||
/**
|
||||
* Finds Pets by tags
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* @param tags Tags to filter by (required)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void findPetsByTags(Set<String> tags, Handler<AsyncResult<Set<Pet>>> resultHandler) {
|
||||
delegate.findPetsByTags(tags, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds Pets by tags
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* @param tags Tags to filter by (required)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void findPetsByTags(Set<String> tags, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Set<Pet>>> resultHandler) {
|
||||
delegate.findPetsByTags(tags, authInfo, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds Pets by tags
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* @param tags Tags to filter by (required)
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Set<Pet>> rxFindPetsByTags(Set<String> tags) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.findPetsByTags(tags, fut)
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds Pets by tags
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* @param tags Tags to filter by (required)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Set<Pet>> rxFindPetsByTags(Set<String> tags, ApiClient.AuthInfo authInfo) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.findPetsByTags(tags, authInfo, fut)
|
||||
));
|
||||
}
|
||||
/**
|
||||
* Find pet by ID
|
||||
* Returns a single pet
|
||||
* @param petId ID of pet to return (required)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void getPetById(Long petId, Handler<AsyncResult<Pet>> resultHandler) {
|
||||
delegate.getPetById(petId, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Find pet by ID
|
||||
* Returns a single pet
|
||||
* @param petId ID of pet to return (required)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void getPetById(Long petId, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Pet>> resultHandler) {
|
||||
delegate.getPetById(petId, authInfo, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Find pet by ID
|
||||
* Returns a single pet
|
||||
* @param petId ID of pet to return (required)
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Pet> rxGetPetById(Long petId) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.getPetById(petId, fut)
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Find pet by ID
|
||||
* Returns a single pet
|
||||
* @param petId ID of pet to return (required)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Pet> rxGetPetById(Long petId, ApiClient.AuthInfo authInfo) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.getPetById(petId, authInfo, fut)
|
||||
));
|
||||
}
|
||||
/**
|
||||
* Update an existing pet
|
||||
*
|
||||
* @param body Pet object that needs to be added to the store (required)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void updatePet(Pet body, Handler<AsyncResult<Void>> resultHandler) {
|
||||
delegate.updatePet(body, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update an existing pet
|
||||
*
|
||||
* @param body Pet object that needs to be added to the store (required)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void updatePet(Pet body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> resultHandler) {
|
||||
delegate.updatePet(body, authInfo, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update an existing pet
|
||||
*
|
||||
* @param body Pet object that needs to be added to the store (required)
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Void> rxUpdatePet(Pet body) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.updatePet(body, fut)
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Update an existing pet
|
||||
*
|
||||
* @param body Pet object that needs to be added to the store (required)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Void> rxUpdatePet(Pet body, ApiClient.AuthInfo authInfo) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.updatePet(body, authInfo, fut)
|
||||
));
|
||||
}
|
||||
/**
|
||||
* Updates a pet in the store with form data
|
||||
*
|
||||
* @param petId ID of pet that needs to be updated (required)
|
||||
* @param name Updated name of the pet (optional)
|
||||
* @param status Updated status of the pet (optional)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void updatePetWithForm(Long petId, String name, String status, Handler<AsyncResult<Void>> resultHandler) {
|
||||
delegate.updatePetWithForm(petId, name, status, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a pet in the store with form data
|
||||
*
|
||||
* @param petId ID of pet that needs to be updated (required)
|
||||
* @param name Updated name of the pet (optional)
|
||||
* @param status Updated status of the pet (optional)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void updatePetWithForm(Long petId, String name, String status, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> resultHandler) {
|
||||
delegate.updatePetWithForm(petId, name, status, authInfo, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a pet in the store with form data
|
||||
*
|
||||
* @param petId ID of pet that needs to be updated (required)
|
||||
* @param name Updated name of the pet (optional)
|
||||
* @param status Updated status of the pet (optional)
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Void> rxUpdatePetWithForm(Long petId, String name, String status) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.updatePetWithForm(petId, name, status, fut)
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a pet in the store with form data
|
||||
*
|
||||
* @param petId ID of pet that needs to be updated (required)
|
||||
* @param name Updated name of the pet (optional)
|
||||
* @param status Updated status of the pet (optional)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Void> rxUpdatePetWithForm(Long petId, String name, String status, ApiClient.AuthInfo authInfo) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.updatePetWithForm(petId, name, status, authInfo, fut)
|
||||
));
|
||||
}
|
||||
/**
|
||||
* uploads an image
|
||||
*
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional)
|
||||
* @param file file to upload (optional)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void uploadFile(Long petId, String additionalMetadata, AsyncFile file, Handler<AsyncResult<ModelApiResponse>> resultHandler) {
|
||||
delegate.uploadFile(petId, additionalMetadata, file, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* uploads an image
|
||||
*
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional)
|
||||
* @param file file to upload (optional)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void uploadFile(Long petId, String additionalMetadata, AsyncFile file, ApiClient.AuthInfo authInfo, Handler<AsyncResult<ModelApiResponse>> resultHandler) {
|
||||
delegate.uploadFile(petId, additionalMetadata, file, authInfo, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* uploads an image
|
||||
*
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional)
|
||||
* @param file file to upload (optional)
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<ModelApiResponse> rxUploadFile(Long petId, String additionalMetadata, AsyncFile file) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.uploadFile(petId, additionalMetadata, file, fut)
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* uploads an image
|
||||
*
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional)
|
||||
* @param file file to upload (optional)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<ModelApiResponse> rxUploadFile(Long petId, String additionalMetadata, AsyncFile file, ApiClient.AuthInfo authInfo) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.uploadFile(petId, additionalMetadata, file, authInfo, fut)
|
||||
));
|
||||
}
|
||||
/**
|
||||
* uploads an image (required)
|
||||
*
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param requiredFile file to upload (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void uploadFileWithRequiredFile(Long petId, AsyncFile requiredFile, String additionalMetadata, Handler<AsyncResult<ModelApiResponse>> resultHandler) {
|
||||
delegate.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* uploads an image (required)
|
||||
*
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param requiredFile file to upload (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void uploadFileWithRequiredFile(Long petId, AsyncFile requiredFile, String additionalMetadata, ApiClient.AuthInfo authInfo, Handler<AsyncResult<ModelApiResponse>> resultHandler) {
|
||||
delegate.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata, authInfo, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* uploads an image (required)
|
||||
*
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param requiredFile file to upload (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional)
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<ModelApiResponse> rxUploadFileWithRequiredFile(Long petId, AsyncFile requiredFile, String additionalMetadata) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata, fut)
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* uploads an image (required)
|
||||
*
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param requiredFile file to upload (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<ModelApiResponse> rxUploadFileWithRequiredFile(Long petId, AsyncFile requiredFile, String additionalMetadata, ApiClient.AuthInfo authInfo) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata, authInfo, fut)
|
||||
));
|
||||
}
|
||||
|
||||
public static PetApi newInstance(org.openapitools.client.api.PetApi arg) {
|
||||
return arg != null ? new PetApi(arg) : null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,205 @@
|
||||
package org.openapitools.client.api.rxjava;
|
||||
|
||||
import org.openapitools.client.model.Order;
|
||||
import org.openapitools.client.ApiClient;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import rx.Single;
|
||||
import io.vertx.core.AsyncResult;
|
||||
import io.vertx.core.Handler;
|
||||
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
public class StoreApi {
|
||||
|
||||
private final org.openapitools.client.api.StoreApi delegate;
|
||||
|
||||
public StoreApi(org.openapitools.client.api.StoreApi delegate) {
|
||||
this.delegate = delegate;
|
||||
}
|
||||
|
||||
public org.openapitools.client.api.StoreApi getDelegate() {
|
||||
return delegate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete purchase order by ID
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* @param orderId ID of the order that needs to be deleted (required)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void deleteOrder(String orderId, Handler<AsyncResult<Void>> resultHandler) {
|
||||
delegate.deleteOrder(orderId, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete purchase order by ID
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* @param orderId ID of the order that needs to be deleted (required)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void deleteOrder(String orderId, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> resultHandler) {
|
||||
delegate.deleteOrder(orderId, authInfo, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete purchase order by ID
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* @param orderId ID of the order that needs to be deleted (required)
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Void> rxDeleteOrder(String orderId) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.deleteOrder(orderId, fut)
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete purchase order by ID
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* @param orderId ID of the order that needs to be deleted (required)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Void> rxDeleteOrder(String orderId, ApiClient.AuthInfo authInfo) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.deleteOrder(orderId, authInfo, fut)
|
||||
));
|
||||
}
|
||||
/**
|
||||
* Returns pet inventories by status
|
||||
* Returns a map of status codes to quantities
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void getInventory(Handler<AsyncResult<Map<String, Integer>>> resultHandler) {
|
||||
delegate.getInventory(resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns pet inventories by status
|
||||
* Returns a map of status codes to quantities
|
||||
* @param authInfo call specific auth overrides
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void getInventory(ApiClient.AuthInfo authInfo, Handler<AsyncResult<Map<String, Integer>>> resultHandler) {
|
||||
delegate.getInventory(authInfo, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns pet inventories by status
|
||||
* Returns a map of status codes to quantities
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Map<String, Integer>> rxGetInventory() {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.getInventory(fut)
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns pet inventories by status
|
||||
* Returns a map of status codes to quantities
|
||||
* @param authInfo call specific auth overrides
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Map<String, Integer>> rxGetInventory(ApiClient.AuthInfo authInfo) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.getInventory(authInfo, fut)
|
||||
));
|
||||
}
|
||||
/**
|
||||
* Find purchase order by ID
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
* @param orderId ID of pet that needs to be fetched (required)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void getOrderById(Long orderId, Handler<AsyncResult<Order>> resultHandler) {
|
||||
delegate.getOrderById(orderId, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Find purchase order by ID
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
* @param orderId ID of pet that needs to be fetched (required)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void getOrderById(Long orderId, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Order>> resultHandler) {
|
||||
delegate.getOrderById(orderId, authInfo, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Find purchase order by ID
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
* @param orderId ID of pet that needs to be fetched (required)
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Order> rxGetOrderById(Long orderId) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.getOrderById(orderId, fut)
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Find purchase order by ID
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
* @param orderId ID of pet that needs to be fetched (required)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Order> rxGetOrderById(Long orderId, ApiClient.AuthInfo authInfo) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.getOrderById(orderId, authInfo, fut)
|
||||
));
|
||||
}
|
||||
/**
|
||||
* Place an order for a pet
|
||||
*
|
||||
* @param body order placed for purchasing the pet (required)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void placeOrder(Order body, Handler<AsyncResult<Order>> resultHandler) {
|
||||
delegate.placeOrder(body, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Place an order for a pet
|
||||
*
|
||||
* @param body order placed for purchasing the pet (required)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void placeOrder(Order body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Order>> resultHandler) {
|
||||
delegate.placeOrder(body, authInfo, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Place an order for a pet
|
||||
*
|
||||
* @param body order placed for purchasing the pet (required)
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Order> rxPlaceOrder(Order body) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.placeOrder(body, fut)
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Place an order for a pet
|
||||
*
|
||||
* @param body order placed for purchasing the pet (required)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Order> rxPlaceOrder(Order body, ApiClient.AuthInfo authInfo) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.placeOrder(body, authInfo, fut)
|
||||
));
|
||||
}
|
||||
|
||||
public static StoreApi newInstance(org.openapitools.client.api.StoreApi arg) {
|
||||
return arg != null ? new StoreApi(arg) : null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,393 @@
|
||||
package org.openapitools.client.api.rxjava;
|
||||
|
||||
import org.openapitools.client.model.User;
|
||||
import org.openapitools.client.ApiClient;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import rx.Single;
|
||||
import io.vertx.core.AsyncResult;
|
||||
import io.vertx.core.Handler;
|
||||
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
public class UserApi {
|
||||
|
||||
private final org.openapitools.client.api.UserApi delegate;
|
||||
|
||||
public UserApi(org.openapitools.client.api.UserApi delegate) {
|
||||
this.delegate = delegate;
|
||||
}
|
||||
|
||||
public org.openapitools.client.api.UserApi getDelegate() {
|
||||
return delegate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create user
|
||||
* This can only be done by the logged in user.
|
||||
* @param body Created user object (required)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void createUser(User body, Handler<AsyncResult<Void>> resultHandler) {
|
||||
delegate.createUser(body, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create user
|
||||
* This can only be done by the logged in user.
|
||||
* @param body Created user object (required)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void createUser(User body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> resultHandler) {
|
||||
delegate.createUser(body, authInfo, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create user
|
||||
* This can only be done by the logged in user.
|
||||
* @param body Created user object (required)
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Void> rxCreateUser(User body) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.createUser(body, fut)
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create user
|
||||
* This can only be done by the logged in user.
|
||||
* @param body Created user object (required)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Void> rxCreateUser(User body, ApiClient.AuthInfo authInfo) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.createUser(body, authInfo, fut)
|
||||
));
|
||||
}
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
* @param body List of user object (required)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void createUsersWithArrayInput(List<User> body, Handler<AsyncResult<Void>> resultHandler) {
|
||||
delegate.createUsersWithArrayInput(body, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
* @param body List of user object (required)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void createUsersWithArrayInput(List<User> body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> resultHandler) {
|
||||
delegate.createUsersWithArrayInput(body, authInfo, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
* @param body List of user object (required)
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Void> rxCreateUsersWithArrayInput(List<User> body) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.createUsersWithArrayInput(body, fut)
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
* @param body List of user object (required)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Void> rxCreateUsersWithArrayInput(List<User> body, ApiClient.AuthInfo authInfo) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.createUsersWithArrayInput(body, authInfo, fut)
|
||||
));
|
||||
}
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
* @param body List of user object (required)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void createUsersWithListInput(List<User> body, Handler<AsyncResult<Void>> resultHandler) {
|
||||
delegate.createUsersWithListInput(body, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
* @param body List of user object (required)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void createUsersWithListInput(List<User> body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> resultHandler) {
|
||||
delegate.createUsersWithListInput(body, authInfo, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
* @param body List of user object (required)
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Void> rxCreateUsersWithListInput(List<User> body) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.createUsersWithListInput(body, fut)
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
* @param body List of user object (required)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Void> rxCreateUsersWithListInput(List<User> body, ApiClient.AuthInfo authInfo) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.createUsersWithListInput(body, authInfo, fut)
|
||||
));
|
||||
}
|
||||
/**
|
||||
* Delete user
|
||||
* This can only be done by the logged in user.
|
||||
* @param username The name that needs to be deleted (required)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void deleteUser(String username, Handler<AsyncResult<Void>> resultHandler) {
|
||||
delegate.deleteUser(username, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete user
|
||||
* This can only be done by the logged in user.
|
||||
* @param username The name that needs to be deleted (required)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void deleteUser(String username, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> resultHandler) {
|
||||
delegate.deleteUser(username, authInfo, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete user
|
||||
* This can only be done by the logged in user.
|
||||
* @param username The name that needs to be deleted (required)
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Void> rxDeleteUser(String username) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.deleteUser(username, fut)
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete user
|
||||
* This can only be done by the logged in user.
|
||||
* @param username The name that needs to be deleted (required)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Void> rxDeleteUser(String username, ApiClient.AuthInfo authInfo) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.deleteUser(username, authInfo, fut)
|
||||
));
|
||||
}
|
||||
/**
|
||||
* Get user by user name
|
||||
*
|
||||
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void getUserByName(String username, Handler<AsyncResult<User>> resultHandler) {
|
||||
delegate.getUserByName(username, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user by user name
|
||||
*
|
||||
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void getUserByName(String username, ApiClient.AuthInfo authInfo, Handler<AsyncResult<User>> resultHandler) {
|
||||
delegate.getUserByName(username, authInfo, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user by user name
|
||||
*
|
||||
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<User> rxGetUserByName(String username) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.getUserByName(username, fut)
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user by user name
|
||||
*
|
||||
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<User> rxGetUserByName(String username, ApiClient.AuthInfo authInfo) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.getUserByName(username, authInfo, fut)
|
||||
));
|
||||
}
|
||||
/**
|
||||
* Logs user into the system
|
||||
*
|
||||
* @param username The user name for login (required)
|
||||
* @param password The password for login in clear text (required)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void loginUser(String username, String password, Handler<AsyncResult<String>> resultHandler) {
|
||||
delegate.loginUser(username, password, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs user into the system
|
||||
*
|
||||
* @param username The user name for login (required)
|
||||
* @param password The password for login in clear text (required)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void loginUser(String username, String password, ApiClient.AuthInfo authInfo, Handler<AsyncResult<String>> resultHandler) {
|
||||
delegate.loginUser(username, password, authInfo, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs user into the system
|
||||
*
|
||||
* @param username The user name for login (required)
|
||||
* @param password The password for login in clear text (required)
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<String> rxLoginUser(String username, String password) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.loginUser(username, password, fut)
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs user into the system
|
||||
*
|
||||
* @param username The user name for login (required)
|
||||
* @param password The password for login in clear text (required)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<String> rxLoginUser(String username, String password, ApiClient.AuthInfo authInfo) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.loginUser(username, password, authInfo, fut)
|
||||
));
|
||||
}
|
||||
/**
|
||||
* Logs out current logged in user session
|
||||
*
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void logoutUser(Handler<AsyncResult<Void>> resultHandler) {
|
||||
delegate.logoutUser(resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs out current logged in user session
|
||||
*
|
||||
* @param authInfo call specific auth overrides
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void logoutUser(ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> resultHandler) {
|
||||
delegate.logoutUser(authInfo, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs out current logged in user session
|
||||
*
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Void> rxLogoutUser() {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.logoutUser(fut)
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs out current logged in user session
|
||||
*
|
||||
* @param authInfo call specific auth overrides
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Void> rxLogoutUser(ApiClient.AuthInfo authInfo) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.logoutUser(authInfo, fut)
|
||||
));
|
||||
}
|
||||
/**
|
||||
* Updated user
|
||||
* This can only be done by the logged in user.
|
||||
* @param username name that need to be deleted (required)
|
||||
* @param body Updated user object (required)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void updateUser(String username, User body, Handler<AsyncResult<Void>> resultHandler) {
|
||||
delegate.updateUser(username, body, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updated user
|
||||
* This can only be done by the logged in user.
|
||||
* @param username name that need to be deleted (required)
|
||||
* @param body Updated user object (required)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void updateUser(String username, User body, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> resultHandler) {
|
||||
delegate.updateUser(username, body, authInfo, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updated user
|
||||
* This can only be done by the logged in user.
|
||||
* @param username name that need to be deleted (required)
|
||||
* @param body Updated user object (required)
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Void> rxUpdateUser(String username, User body) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.updateUser(username, body, fut)
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Updated user
|
||||
* This can only be done by the logged in user.
|
||||
* @param username name that need to be deleted (required)
|
||||
* @param body Updated user object (required)
|
||||
* @param authInfo call specific auth overrides
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<Void> rxUpdateUser(String username, User body, ApiClient.AuthInfo authInfo) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut ->
|
||||
delegate.updateUser(username, body, authInfo, fut)
|
||||
));
|
||||
}
|
||||
|
||||
public static UserApi newInstance(org.openapitools.client.api.UserApi arg) {
|
||||
return arg != null ? new UserApi(arg) : null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.auth;
|
||||
|
||||
import org.openapitools.client.Pair;
|
||||
import io.vertx.core.MultiMap;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
public class ApiKeyAuth implements Authentication {
|
||||
private final String location;
|
||||
private final String paramName;
|
||||
|
||||
private String apiKey;
|
||||
private String apiKeyPrefix;
|
||||
|
||||
public ApiKeyAuth(String location, String paramName) {
|
||||
this.location = location;
|
||||
this.paramName = paramName;
|
||||
}
|
||||
|
||||
public String getLocation() {
|
||||
return location;
|
||||
}
|
||||
|
||||
public String getParamName() {
|
||||
return paramName;
|
||||
}
|
||||
|
||||
public String getApiKey() {
|
||||
return apiKey;
|
||||
}
|
||||
|
||||
public void setApiKey(String apiKey) {
|
||||
this.apiKey = apiKey;
|
||||
}
|
||||
|
||||
public String getApiKeyPrefix() {
|
||||
return apiKeyPrefix;
|
||||
}
|
||||
|
||||
public void setApiKeyPrefix(String apiKeyPrefix) {
|
||||
this.apiKeyPrefix = apiKeyPrefix;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applyToParams(List<Pair> queryParams, MultiMap headerParams, MultiMap cookieParams) {
|
||||
if (apiKey == null) {
|
||||
return;
|
||||
}
|
||||
String value;
|
||||
if (apiKeyPrefix != null) {
|
||||
value = apiKeyPrefix + " " + apiKey;
|
||||
} else {
|
||||
value = apiKey;
|
||||
}
|
||||
if ("query".equals(location)) {
|
||||
queryParams.add(new Pair(paramName, value));
|
||||
} else if ("header".equals(location)) {
|
||||
headerParams.add(paramName, value);
|
||||
} else if ("cookie".equals(location)) {
|
||||
cookieParams.add(paramName, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.auth;
|
||||
|
||||
import org.openapitools.client.Pair;
|
||||
import io.vertx.core.MultiMap;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface Authentication {
|
||||
/**
|
||||
* Apply authentication settings to header and query params.
|
||||
*
|
||||
* @param queryParams List of query parameters
|
||||
* @param headerParams Map of header parameters
|
||||
* @param cookieParams Map of cookie parameters
|
||||
*/
|
||||
void applyToParams(List<Pair> queryParams, MultiMap headerParams, MultiMap cookieParams);
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.auth;
|
||||
|
||||
import org.openapitools.client.Pair;
|
||||
import io.vertx.core.MultiMap;
|
||||
import java.util.Base64;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.List;
|
||||
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
public class HttpBasicAuth implements Authentication {
|
||||
private String username;
|
||||
private String password;
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applyToParams(List<Pair> queryParams, MultiMap headerParams, MultiMap cookieParams) {
|
||||
if (username == null && password == null) {
|
||||
return;
|
||||
}
|
||||
String str = (username == null ? "" : username) + ":" + (password == null ? "" : password);
|
||||
headerParams.add("Authorization", "Basic " + Base64.getEncoder().encodeToString(str.getBytes(StandardCharsets.UTF_8)));
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user