mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-10-14 00:13:50 +00:00
[Java][MicroProfile] Support additionalProperties with Jackson (#21451)
Refs #20853 Refs #20947
This commit is contained in:
parent
b444de2b5c
commit
311233d804
@ -71,6 +71,7 @@ jobs:
|
|||||||
- samples/client/petstore/java/microprofile-rest-client-mutiny
|
- samples/client/petstore/java/microprofile-rest-client-mutiny
|
||||||
- samples/client/petstore/java/microprofile-rest-client-3.0
|
- samples/client/petstore/java/microprofile-rest-client-3.0
|
||||||
- samples/client/petstore/java/microprofile-rest-client-3.0-jackson
|
- samples/client/petstore/java/microprofile-rest-client-3.0-jackson
|
||||||
|
- samples/client/petstore/java/microprofile-rest-client-3.0-jackson-mutiny
|
||||||
- samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml
|
- samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml
|
||||||
- samples/client/petstore/java/microprofile-rest-client-3.0-mutiny
|
- samples/client/petstore/java/microprofile-rest-client-3.0-mutiny
|
||||||
- samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter
|
- samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter
|
||||||
@ -133,4 +134,4 @@ jobs:
|
|||||||
- name: Build with Gradle
|
- name: Build with Gradle
|
||||||
working-directory: ${{ matrix.sample }}
|
working-directory: ${{ matrix.sample }}
|
||||||
if: ${{ hashFiles('./gradlew') != '' }}
|
if: ${{ hashFiles('./gradlew') != '' }}
|
||||||
run: ./gradlew build -x test
|
run: ./gradlew build -x test
|
||||||
|
@ -0,0 +1,12 @@
|
|||||||
|
generatorName: java
|
||||||
|
outputDir: samples/client/petstore/java/microprofile-rest-client-3.0-jackson-mutiny
|
||||||
|
library: microprofile
|
||||||
|
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
|
||||||
|
templateDir: modules/openapi-generator/src/main/resources/Java
|
||||||
|
additionalProperties:
|
||||||
|
serializationLibrary: jackson
|
||||||
|
artifactId: microprofile-rest-client-3-jackson-mutiny
|
||||||
|
configKey: petstore
|
||||||
|
microprofileRestClientVersion: "3.0"
|
||||||
|
microprofileMutiny: true
|
||||||
|
hideGenerationTimestamp: true
|
@ -709,6 +709,15 @@ public class JavaClientCodegen extends AbstractJavaCodegen
|
|||||||
additionalProperties.put("jsonbPolymorphism", true);
|
additionalProperties.put("jsonbPolymorphism", true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (getSerializationLibrary().equals(SERIALIZATION_LIBRARY_JACKSON)) {
|
||||||
|
// Composed schemas can have the 'additionalProperties' keyword, as specified in JSON schema.
|
||||||
|
// In principle, this should be enabled by default for all code generators. However due to limitations
|
||||||
|
// in other code generators, support needs to be enabled on a case-by-case basis.
|
||||||
|
// The flag below should be set for all Java libraries, but the templates need to be ported
|
||||||
|
// one by one for each library.
|
||||||
|
supportsAdditionalPropertiesWithComposedSchema = true;
|
||||||
|
}
|
||||||
} else if (libApache) {
|
} else if (libApache) {
|
||||||
forceSerializationLibrary(SERIALIZATION_LIBRARY_JACKSON);
|
forceSerializationLibrary(SERIALIZATION_LIBRARY_JACKSON);
|
||||||
} else {
|
} else {
|
||||||
|
@ -0,0 +1,45 @@
|
|||||||
|
{{#additionalPropertiesType}}
|
||||||
|
/**
|
||||||
|
* A container for additional, undeclared properties.
|
||||||
|
* This is a holder for any undeclared properties as specified with
|
||||||
|
* the 'additionalProperties' keyword in the OAS document.
|
||||||
|
*/
|
||||||
|
private Map<String, {{{.}}}> additionalProperties;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the additional (undeclared) property with the specified name and value.
|
||||||
|
* If the property does not already exist, create it otherwise replace it.
|
||||||
|
* @param key the name of the property
|
||||||
|
* @param value the value of the property
|
||||||
|
* @return self reference
|
||||||
|
*/
|
||||||
|
@com.fasterxml.jackson.annotation.JsonAnySetter
|
||||||
|
public {{classname}} putAdditionalProperty(String key, {{{.}}} value) {
|
||||||
|
if (this.additionalProperties == null) {
|
||||||
|
this.additionalProperties = new HashMap<String, {{{.}}}>();
|
||||||
|
}
|
||||||
|
this.additionalProperties.put(key, value);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the additional (undeclared) properties.
|
||||||
|
* @return the additional (undeclared) properties
|
||||||
|
*/
|
||||||
|
@com.fasterxml.jackson.annotation.JsonAnyGetter
|
||||||
|
public Map<String, {{{.}}}> getAdditionalProperties() {
|
||||||
|
return additionalProperties;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the additional (undeclared) property with the specified name.
|
||||||
|
* @param key the name of the property
|
||||||
|
* @return the additional (undeclared) property with the specified name
|
||||||
|
*/
|
||||||
|
public {{{.}}} getAdditionalProperty(String key) {
|
||||||
|
if (this.additionalProperties == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return this.additionalProperties.get(key);
|
||||||
|
}
|
||||||
|
{{/additionalPropertiesType}}
|
@ -7,6 +7,8 @@ import org.apache.commons.lang3.builder.HashCodeBuilder;
|
|||||||
{{/useReflectionEqualsHashCode}}
|
{{/useReflectionEqualsHashCode}}
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
{{#imports}}import {{import}};
|
{{#imports}}import {{import}};
|
||||||
{{/imports}}
|
{{/imports}}
|
||||||
{{#serializableModel}}
|
{{#serializableModel}}
|
||||||
|
@ -57,6 +57,7 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{#vendorExtensi
|
|||||||
private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};
|
private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};
|
||||||
{{/isContainer}}
|
{{/isContainer}}
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
|
{{>additional_properties}}
|
||||||
{{#vendorExtensions.x-has-readonly-properties}}{{^withXml}}
|
{{#vendorExtensions.x-has-readonly-properties}}{{^withXml}}
|
||||||
public {{classname}}() {
|
public {{classname}}() {
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,8 @@
|
|||||||
}{{#hasVars}}
|
}{{#hasVars}}
|
||||||
{{classname}} {{classVarName}} = ({{classname}}) o;
|
{{classname}} {{classVarName}} = ({{classname}}) o;
|
||||||
return {{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}equalsNullable(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#isByteArray}}Arrays{{/isByteArray}}{{^isByteArray}}Objects{{/isByteArray}}.equals(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}} &&
|
return {{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}equalsNullable(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#isByteArray}}Arrays{{/isByteArray}}{{^isByteArray}}Objects{{/isByteArray}}.equals(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}} &&
|
||||||
{{/-last}}{{/vars}}{{#parent}} &&
|
{{/-last}}{{/vars}}{{#additionalPropertiesType}} &&
|
||||||
|
Objects.equals(this.additionalProperties, {{classVarName}}.additionalProperties){{/additionalPropertiesType}}{{#parent}} &&
|
||||||
super.equals(o){{/parent}};{{/hasVars}}{{^hasVars}}
|
super.equals(o){{/parent}};{{/hasVars}}{{^hasVars}}
|
||||||
return {{#parent}}super.equals(o){{/parent}}{{^parent}}true{{/parent}};{{/hasVars}}
|
return {{#parent}}super.equals(o){{/parent}}{{^parent}}true{{/parent}};{{/hasVars}}
|
||||||
{{/useReflectionEqualsHashCode}}
|
{{/useReflectionEqualsHashCode}}
|
||||||
@ -28,7 +29,7 @@
|
|||||||
return HashCodeBuilder.reflectionHashCode(this);
|
return HashCodeBuilder.reflectionHashCode(this);
|
||||||
{{/useReflectionEqualsHashCode}}
|
{{/useReflectionEqualsHashCode}}
|
||||||
{{^useReflectionEqualsHashCode}}
|
{{^useReflectionEqualsHashCode}}
|
||||||
return Objects.hash({{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}hashCodeNullable({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{^isByteArray}}{{name}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}}, {{/-last}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}});
|
return Objects.hash({{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}hashCodeNullable({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{^isByteArray}}{{name}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}}, {{/-last}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}}{{#additionalPropertiesType}}, additionalProperties{{/additionalPropertiesType}});
|
||||||
{{/useReflectionEqualsHashCode}}
|
{{/useReflectionEqualsHashCode}}
|
||||||
}{{#vendorExtensions.x-jackson-optional-nullable-helpers}}
|
}{{#vendorExtensions.x-jackson-optional-nullable-helpers}}
|
||||||
|
|
||||||
@ -47,8 +48,13 @@
|
|||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append("class {{classname}} {\n");
|
sb.append("class {{classname}} {\n");
|
||||||
{{#parent}}sb.append(" ").append(toIndentedString(super.toString())).append("\n");{{/parent}}
|
{{#parent}}sb.append(" ").append(toIndentedString(super.toString())).append("\n");{{/parent}}
|
||||||
{{#vars}}sb.append(" {{name}}: ").append({{#isPassword}}"*"{{/isPassword}}{{^isPassword}}toIndentedString({{name}}){{/isPassword}}).append("\n");
|
{{#vars}}
|
||||||
{{/vars}}sb.append("}");
|
sb.append(" {{name}}: ").append({{#isPassword}}"*"{{/isPassword}}{{^isPassword}}toIndentedString({{name}}){{/isPassword}}).append("\n");
|
||||||
|
{{/vars}}
|
||||||
|
{{#additionalPropertiesType}}
|
||||||
|
sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
|
||||||
|
{{/additionalPropertiesType}}
|
||||||
|
sb.append("}");
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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,25 @@
|
|||||||
|
README.md
|
||||||
|
docs/Category.md
|
||||||
|
docs/ModelApiResponse.md
|
||||||
|
docs/Order.md
|
||||||
|
docs/Pet.md
|
||||||
|
docs/PetApi.md
|
||||||
|
docs/StoreApi.md
|
||||||
|
docs/Tag.md
|
||||||
|
docs/User.md
|
||||||
|
docs/UserApi.md
|
||||||
|
pom.xml
|
||||||
|
src/main/java/org/openapitools/client/RFC3339DateFormat.java
|
||||||
|
src/main/java/org/openapitools/client/RFC3339InstantDeserializer.java
|
||||||
|
src/main/java/org/openapitools/client/RFC3339JavaTimeModule.java
|
||||||
|
src/main/java/org/openapitools/client/api/ApiException.java
|
||||||
|
src/main/java/org/openapitools/client/api/ApiExceptionMapper.java
|
||||||
|
src/main/java/org/openapitools/client/api/PetApi.java
|
||||||
|
src/main/java/org/openapitools/client/api/StoreApi.java
|
||||||
|
src/main/java/org/openapitools/client/api/UserApi.java
|
||||||
|
src/main/java/org/openapitools/client/model/Category.java
|
||||||
|
src/main/java/org/openapitools/client/model/ModelApiResponse.java
|
||||||
|
src/main/java/org/openapitools/client/model/Order.java
|
||||||
|
src/main/java/org/openapitools/client/model/Pet.java
|
||||||
|
src/main/java/org/openapitools/client/model/Tag.java
|
||||||
|
src/main/java/org/openapitools/client/model/User.java
|
@ -0,0 +1 @@
|
|||||||
|
7.15.0-SNAPSHOT
|
@ -0,0 +1,9 @@
|
|||||||
|
# OpenAPI Petstore - MicroProfile Rest Client & MicroProfile Server
|
||||||
|
|
||||||
|
This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project.
|
||||||
|
[MicroProfile Rest Client](https://github.com/eclipse/microprofile-rest-client) is a type-safe way of calling
|
||||||
|
REST services. The generated client contains an interface which acts as the client, you can inject it into dependent classes.
|
||||||
|
|
@ -0,0 +1,15 @@
|
|||||||
|
|
||||||
|
|
||||||
|
# Category
|
||||||
|
|
||||||
|
A category for a pet
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
| Name | Type | Description | Notes |
|
||||||
|
|------------ | ------------- | ------------- | -------------|
|
||||||
|
|**id** | **Long** | | [optional] |
|
||||||
|
|**name** | **String** | | [optional] |
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,16 @@
|
|||||||
|
|
||||||
|
|
||||||
|
# ModelApiResponse
|
||||||
|
|
||||||
|
Describes the result of uploading an image resource
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
| Name | Type | Description | Notes |
|
||||||
|
|------------ | ------------- | ------------- | -------------|
|
||||||
|
|**code** | **Integer** | | [optional] |
|
||||||
|
|**type** | **String** | | [optional] |
|
||||||
|
|**message** | **String** | | [optional] |
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,29 @@
|
|||||||
|
|
||||||
|
|
||||||
|
# Order
|
||||||
|
|
||||||
|
An order for a pets from the pet store
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
| Name | Type | Description | Notes |
|
||||||
|
|------------ | ------------- | ------------- | -------------|
|
||||||
|
|**id** | **Long** | | [optional] |
|
||||||
|
|**petId** | **Long** | | [optional] |
|
||||||
|
|**quantity** | **Integer** | | [optional] |
|
||||||
|
|**shipDate** | **Date** | | [optional] |
|
||||||
|
|**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] |
|
||||||
|
|**complete** | **Boolean** | | [optional] |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Enum: StatusEnum
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
|---- | -----|
|
||||||
|
| PLACED | "placed" |
|
||||||
|
| APPROVED | "approved" |
|
||||||
|
| DELIVERED | "delivered" |
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,29 @@
|
|||||||
|
|
||||||
|
|
||||||
|
# Pet
|
||||||
|
|
||||||
|
A pet for sale in the pet store
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
| Name | Type | Description | Notes |
|
||||||
|
|------------ | ------------- | ------------- | -------------|
|
||||||
|
|**id** | **Long** | | [optional] |
|
||||||
|
|**category** | [**Category**](Category.md) | | [optional] |
|
||||||
|
|**name** | **String** | | |
|
||||||
|
|**photoUrls** | **List<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" |
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,604 @@
|
|||||||
|
# PetApi
|
||||||
|
|
||||||
|
All URIs are relative to *http://petstore.swagger.io/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 |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## addPet
|
||||||
|
|
||||||
|
> Pet addPet(pet)
|
||||||
|
|
||||||
|
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/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 pet = new Pet(); // Pet | Pet object that needs to be added to the store
|
||||||
|
try {
|
||||||
|
Pet result = apiInstance.addPet(pet);
|
||||||
|
System.out.println(result);
|
||||||
|
} 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 |
|
||||||
|
|------------- | ------------- | ------------- | -------------|
|
||||||
|
| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**Pet**](Pet.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
[petstore_auth](../README.md#petstore_auth)
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json, application/xml
|
||||||
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
|
|
||||||
|
### HTTP response details
|
||||||
|
| Status code | Description | Response headers |
|
||||||
|
|-------------|-------------|------------------|
|
||||||
|
| **200** | successful operation | - |
|
||||||
|
| **405** | Invalid input | - |
|
||||||
|
|
||||||
|
|
||||||
|
## deletePet
|
||||||
|
|
||||||
|
> void 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/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 {
|
||||||
|
void result = apiInstance.deletePet(petId, apiKey);
|
||||||
|
System.out.println(result);
|
||||||
|
} 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
|
||||||
|
|
||||||
|
[**void**](Void.md)
|
||||||
|
|
||||||
|
### 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 |
|
||||||
|
|-------------|-------------|------------------|
|
||||||
|
| **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/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
|
||||||
|
|
||||||
|
> List<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/v2");
|
||||||
|
|
||||||
|
// Configure OAuth2 access token for authorization: petstore_auth
|
||||||
|
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
|
||||||
|
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
|
||||||
|
|
||||||
|
PetApi apiInstance = new PetApi(defaultClient);
|
||||||
|
List<String> tags = Arrays.asList(); // List<String> | Tags to filter by
|
||||||
|
try {
|
||||||
|
List<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** | [**List<String>**](String.md)| Tags to filter by | |
|
||||||
|
|
||||||
|
### 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 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/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
|
||||||
|
|
||||||
|
> Pet updatePet(pet)
|
||||||
|
|
||||||
|
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/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 pet = new Pet(); // Pet | Pet object that needs to be added to the store
|
||||||
|
try {
|
||||||
|
Pet result = apiInstance.updatePet(pet);
|
||||||
|
System.out.println(result);
|
||||||
|
} 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 |
|
||||||
|
|------------- | ------------- | ------------- | -------------|
|
||||||
|
| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**Pet**](Pet.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
[petstore_auth](../README.md#petstore_auth)
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json, application/xml
|
||||||
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
|
|
||||||
|
### HTTP response details
|
||||||
|
| Status code | Description | Response headers |
|
||||||
|
|-------------|-------------|------------------|
|
||||||
|
| **200** | successful operation | - |
|
||||||
|
| **400** | Invalid ID supplied | - |
|
||||||
|
| **404** | Pet not found | - |
|
||||||
|
| **405** | Validation exception | - |
|
||||||
|
|
||||||
|
|
||||||
|
## updatePetWithForm
|
||||||
|
|
||||||
|
> void 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/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 {
|
||||||
|
void result = apiInstance.updatePetWithForm(petId, name, status);
|
||||||
|
System.out.println(result);
|
||||||
|
} 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
|
||||||
|
|
||||||
|
[**void**](Void.md)
|
||||||
|
|
||||||
|
### 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/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
|
||||||
|
File _file = new File("/path/to/file"); // File | 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** | **File**| 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 | - |
|
||||||
|
|
@ -0,0 +1,283 @@
|
|||||||
|
# StoreApi
|
||||||
|
|
||||||
|
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||||
|
|
||||||
|
| Method | HTTP request | Description |
|
||||||
|
|------------- | ------------- | -------------|
|
||||||
|
| [**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID |
|
||||||
|
| [**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status |
|
||||||
|
| [**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID |
|
||||||
|
| [**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## deleteOrder
|
||||||
|
|
||||||
|
> void deleteOrder(orderId)
|
||||||
|
|
||||||
|
Delete purchase order by ID
|
||||||
|
|
||||||
|
For valid response try integer IDs with value < 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/v2");
|
||||||
|
|
||||||
|
StoreApi apiInstance = new StoreApi(defaultClient);
|
||||||
|
String orderId = "orderId_example"; // String | ID of the order that needs to be deleted
|
||||||
|
try {
|
||||||
|
void result = apiInstance.deleteOrder(orderId);
|
||||||
|
System.out.println(result);
|
||||||
|
} 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
|
||||||
|
|
||||||
|
[**void**](Void.md)
|
||||||
|
|
||||||
|
### 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/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 generate 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/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(order)
|
||||||
|
|
||||||
|
Place an order for a pet
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```java
|
||||||
|
// Import classes:
|
||||||
|
import org.openapitools.client.ApiClient;
|
||||||
|
import org.openapitools.client.ApiException;
|
||||||
|
import org.openapitools.client.Configuration;
|
||||||
|
import org.openapitools.client.models.*;
|
||||||
|
import org.openapitools.client.api.StoreApi;
|
||||||
|
|
||||||
|
public class Example {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||||
|
defaultClient.setBasePath("http://petstore.swagger.io/v2");
|
||||||
|
|
||||||
|
StoreApi apiInstance = new StoreApi(defaultClient);
|
||||||
|
Order order = new Order(); // Order | order placed for purchasing the pet
|
||||||
|
try {
|
||||||
|
Order result = apiInstance.placeOrder(order);
|
||||||
|
System.out.println(result);
|
||||||
|
} catch (ApiException e) {
|
||||||
|
System.err.println("Exception when calling StoreApi#placeOrder");
|
||||||
|
System.err.println("Status code: " + e.getCode());
|
||||||
|
System.err.println("Reason: " + e.getResponseBody());
|
||||||
|
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
| Name | Type | Description | Notes |
|
||||||
|
|------------- | ------------- | ------------- | -------------|
|
||||||
|
| **order** | [**Order**](Order.md)| order placed for purchasing the pet | |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**Order**](Order.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json
|
||||||
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
|
|
||||||
|
### HTTP response details
|
||||||
|
| Status code | Description | Response headers |
|
||||||
|
|-------------|-------------|------------------|
|
||||||
|
| **200** | successful operation | - |
|
||||||
|
| **400** | Invalid Order | - |
|
||||||
|
|
@ -0,0 +1,15 @@
|
|||||||
|
|
||||||
|
|
||||||
|
# Tag
|
||||||
|
|
||||||
|
A tag for a pet
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
| Name | Type | Description | Notes |
|
||||||
|
|------------ | ------------- | ------------- | -------------|
|
||||||
|
|**id** | **Long** | | [optional] |
|
||||||
|
|**name** | **String** | | [optional] |
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,21 @@
|
|||||||
|
|
||||||
|
|
||||||
|
# User
|
||||||
|
|
||||||
|
A User who is purchasing from the pet store
|
||||||
|
|
||||||
|
## 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] |
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,591 @@
|
|||||||
|
# UserApi
|
||||||
|
|
||||||
|
All URIs are relative to *http://petstore.swagger.io/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
|
||||||
|
|
||||||
|
> void createUser(user)
|
||||||
|
|
||||||
|
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.auth.*;
|
||||||
|
import org.openapitools.client.models.*;
|
||||||
|
import org.openapitools.client.api.UserApi;
|
||||||
|
|
||||||
|
public class Example {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||||
|
defaultClient.setBasePath("http://petstore.swagger.io/v2");
|
||||||
|
|
||||||
|
// Configure API key authorization: api_key
|
||||||
|
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
|
||||||
|
api_key.setApiKey("YOUR API KEY");
|
||||||
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||||
|
//api_key.setApiKeyPrefix("Token");
|
||||||
|
|
||||||
|
UserApi apiInstance = new UserApi(defaultClient);
|
||||||
|
User user = new User(); // User | Created user object
|
||||||
|
try {
|
||||||
|
void result = apiInstance.createUser(user);
|
||||||
|
System.out.println(result);
|
||||||
|
} 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 |
|
||||||
|
|------------- | ------------- | ------------- | -------------|
|
||||||
|
| **user** | [**User**](User.md)| Created user object | |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**void**](Void.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
[api_key](../README.md#api_key)
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
|
||||||
|
### HTTP response details
|
||||||
|
| Status code | Description | Response headers |
|
||||||
|
|-------------|-------------|------------------|
|
||||||
|
| **200** | successful operation | - |
|
||||||
|
|
||||||
|
|
||||||
|
## createUsersWithArrayInput
|
||||||
|
|
||||||
|
> void createUsersWithArrayInput(user)
|
||||||
|
|
||||||
|
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.auth.*;
|
||||||
|
import org.openapitools.client.models.*;
|
||||||
|
import org.openapitools.client.api.UserApi;
|
||||||
|
|
||||||
|
public class Example {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||||
|
defaultClient.setBasePath("http://petstore.swagger.io/v2");
|
||||||
|
|
||||||
|
// Configure API key authorization: api_key
|
||||||
|
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
|
||||||
|
api_key.setApiKey("YOUR API KEY");
|
||||||
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||||
|
//api_key.setApiKeyPrefix("Token");
|
||||||
|
|
||||||
|
UserApi apiInstance = new UserApi(defaultClient);
|
||||||
|
List<User> user = Arrays.asList(); // List<User> | List of user object
|
||||||
|
try {
|
||||||
|
void result = apiInstance.createUsersWithArrayInput(user);
|
||||||
|
System.out.println(result);
|
||||||
|
} 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 |
|
||||||
|
|------------- | ------------- | ------------- | -------------|
|
||||||
|
| **user** | [**List<User>**](User.md)| List of user object | |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**void**](Void.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
[api_key](../README.md#api_key)
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
|
||||||
|
### HTTP response details
|
||||||
|
| Status code | Description | Response headers |
|
||||||
|
|-------------|-------------|------------------|
|
||||||
|
| **200** | successful operation | - |
|
||||||
|
|
||||||
|
|
||||||
|
## createUsersWithListInput
|
||||||
|
|
||||||
|
> void createUsersWithListInput(user)
|
||||||
|
|
||||||
|
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.auth.*;
|
||||||
|
import org.openapitools.client.models.*;
|
||||||
|
import org.openapitools.client.api.UserApi;
|
||||||
|
|
||||||
|
public class Example {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||||
|
defaultClient.setBasePath("http://petstore.swagger.io/v2");
|
||||||
|
|
||||||
|
// Configure API key authorization: api_key
|
||||||
|
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
|
||||||
|
api_key.setApiKey("YOUR API KEY");
|
||||||
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||||
|
//api_key.setApiKeyPrefix("Token");
|
||||||
|
|
||||||
|
UserApi apiInstance = new UserApi(defaultClient);
|
||||||
|
List<User> user = Arrays.asList(); // List<User> | List of user object
|
||||||
|
try {
|
||||||
|
void result = apiInstance.createUsersWithListInput(user);
|
||||||
|
System.out.println(result);
|
||||||
|
} 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 |
|
||||||
|
|------------- | ------------- | ------------- | -------------|
|
||||||
|
| **user** | [**List<User>**](User.md)| List of user object | |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**void**](Void.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
[api_key](../README.md#api_key)
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
|
||||||
|
### HTTP response details
|
||||||
|
| Status code | Description | Response headers |
|
||||||
|
|-------------|-------------|------------------|
|
||||||
|
| **200** | successful operation | - |
|
||||||
|
|
||||||
|
|
||||||
|
## deleteUser
|
||||||
|
|
||||||
|
> void 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.auth.*;
|
||||||
|
import org.openapitools.client.models.*;
|
||||||
|
import org.openapitools.client.api.UserApi;
|
||||||
|
|
||||||
|
public class Example {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||||
|
defaultClient.setBasePath("http://petstore.swagger.io/v2");
|
||||||
|
|
||||||
|
// Configure API key authorization: api_key
|
||||||
|
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
|
||||||
|
api_key.setApiKey("YOUR API KEY");
|
||||||
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||||
|
//api_key.setApiKeyPrefix("Token");
|
||||||
|
|
||||||
|
UserApi apiInstance = new UserApi(defaultClient);
|
||||||
|
String username = "username_example"; // String | The name that needs to be deleted
|
||||||
|
try {
|
||||||
|
void result = apiInstance.deleteUser(username);
|
||||||
|
System.out.println(result);
|
||||||
|
} 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
|
||||||
|
|
||||||
|
[**void**](Void.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
[api_key](../README.md#api_key)
|
||||||
|
|
||||||
|
### 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/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/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 | * Set-Cookie - Cookie authentication key for use with the `api_key` apiKey authentication. <br> * 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
|
||||||
|
|
||||||
|
> void 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.auth.*;
|
||||||
|
import org.openapitools.client.models.*;
|
||||||
|
import org.openapitools.client.api.UserApi;
|
||||||
|
|
||||||
|
public class Example {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||||
|
defaultClient.setBasePath("http://petstore.swagger.io/v2");
|
||||||
|
|
||||||
|
// Configure API key authorization: api_key
|
||||||
|
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
|
||||||
|
api_key.setApiKey("YOUR API KEY");
|
||||||
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||||
|
//api_key.setApiKeyPrefix("Token");
|
||||||
|
|
||||||
|
UserApi apiInstance = new UserApi(defaultClient);
|
||||||
|
try {
|
||||||
|
void result = apiInstance.logoutUser();
|
||||||
|
System.out.println(result);
|
||||||
|
} 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
|
||||||
|
|
||||||
|
[**void**](Void.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
[api_key](../README.md#api_key)
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
|
||||||
|
### HTTP response details
|
||||||
|
| Status code | Description | Response headers |
|
||||||
|
|-------------|-------------|------------------|
|
||||||
|
| **200** | successful operation | - |
|
||||||
|
|
||||||
|
|
||||||
|
## updateUser
|
||||||
|
|
||||||
|
> void updateUser(username, user)
|
||||||
|
|
||||||
|
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.auth.*;
|
||||||
|
import org.openapitools.client.models.*;
|
||||||
|
import org.openapitools.client.api.UserApi;
|
||||||
|
|
||||||
|
public class Example {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||||
|
defaultClient.setBasePath("http://petstore.swagger.io/v2");
|
||||||
|
|
||||||
|
// Configure API key authorization: api_key
|
||||||
|
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
|
||||||
|
api_key.setApiKey("YOUR API KEY");
|
||||||
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||||
|
//api_key.setApiKeyPrefix("Token");
|
||||||
|
|
||||||
|
UserApi apiInstance = new UserApi(defaultClient);
|
||||||
|
String username = "username_example"; // String | name that need to be deleted
|
||||||
|
User user = new User(); // User | Updated user object
|
||||||
|
try {
|
||||||
|
void result = apiInstance.updateUser(username, user);
|
||||||
|
System.out.println(result);
|
||||||
|
} 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 | |
|
||||||
|
| **user** | [**User**](User.md)| Updated user object | |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**void**](Void.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
[api_key](../README.md#api_key)
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
|
||||||
|
### HTTP response details
|
||||||
|
| Status code | Description | Response headers |
|
||||||
|
|-------------|-------------|------------------|
|
||||||
|
| **400** | Invalid user supplied | - |
|
||||||
|
| **404** | User not found | - |
|
||||||
|
|
@ -0,0 +1,176 @@
|
|||||||
|
<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>microprofile-rest-client-3-jackson-mutiny</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<name>microprofile-rest-client-3-jackson-mutiny</name>
|
||||||
|
<description>This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.</description>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
<build>
|
||||||
|
<sourceDirectory>src/main/java</sourceDirectory>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.jboss.jandex</groupId>
|
||||||
|
<artifactId>jandex-maven-plugin</artifactId>
|
||||||
|
<version>${jandex.maven.plugin.version}</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>make-index</id>
|
||||||
|
<goals>
|
||||||
|
<goal>jandex</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-failsafe-plugin</artifactId>
|
||||||
|
<version>${maven.failsafe.plugin.version}</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>integration-test</goal>
|
||||||
|
<goal>verify</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>build-helper-maven-plugin</artifactId>
|
||||||
|
<version>${build.helper.maven.plugin.version}</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>add-source</id>
|
||||||
|
<phase>generate-sources</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>add-source</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<sources>
|
||||||
|
<source>src/gen/java</source>
|
||||||
|
</sources>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.junit.jupiter</groupId>
|
||||||
|
<artifactId>junit-jupiter-api</artifactId>
|
||||||
|
<version>${junit.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<!-- Eclipse MicroProfile Rest Client -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.microprofile.rest.client</groupId>
|
||||||
|
<artifactId>microprofile-rest-client-api</artifactId>
|
||||||
|
<version>${microprofile.rest.client.api.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- JAX-RS -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>jakarta.ws.rs</groupId>
|
||||||
|
<artifactId>jakarta.ws.rs-api</artifactId>
|
||||||
|
<version>${jakarta.ws.rs.version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.glassfish.jersey.ext.microprofile</groupId>
|
||||||
|
<artifactId>jersey-mp-rest-client</artifactId>
|
||||||
|
<version>${jersey.mp.rest.client.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.geronimo.config</groupId>
|
||||||
|
<artifactId>geronimo-config-impl</artifactId>
|
||||||
|
<version>${geronimo.config.impl.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.cxf</groupId>
|
||||||
|
<artifactId>cxf-rt-rs-extension-providers</artifactId>
|
||||||
|
<version>${cxf.rt.rs.extension.providers.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.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>jakarta.activation</groupId>
|
||||||
|
<artifactId>jakarta.activation-api</artifactId>
|
||||||
|
<version>${jakarta.activation.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.fasterxml.jackson.datatype</groupId>
|
||||||
|
<artifactId>jackson-datatype-jsr310</artifactId>
|
||||||
|
<version>${jackson.jaxrs.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>jakarta.annotation</groupId>
|
||||||
|
<artifactId>jakarta.annotation-api</artifactId>
|
||||||
|
<version>${jakarta.annotation.version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.smallrye.reactive</groupId>
|
||||||
|
<artifactId>mutiny</artifactId>
|
||||||
|
<version>${mutiny.version}</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
<repositories>
|
||||||
|
<repository>
|
||||||
|
<id>sonatype-snapshots</id>
|
||||||
|
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
|
||||||
|
<snapshots>
|
||||||
|
<enabled>true</enabled>
|
||||||
|
</snapshots>
|
||||||
|
</repository>
|
||||||
|
</repositories>
|
||||||
|
<properties>
|
||||||
|
<java.version>11</java.version>
|
||||||
|
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||||
|
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
|
||||||
|
<swagger.core.version>1.5.18</swagger.core.version>
|
||||||
|
<jetty.version>9.2.9.v20150224</jetty.version>
|
||||||
|
<junit.version>5.10.2</junit.version>
|
||||||
|
<logback.version>1.5.13</logback.version>
|
||||||
|
<cxf.version>3.2.7</cxf.version>
|
||||||
|
<jackson.jaxrs.version>2.17.1</jackson.jaxrs.version>
|
||||||
|
<jackson.version>2.17.1</jackson.version>
|
||||||
|
<jakarta.activation.version>2.1.0</jakarta.activation.version>
|
||||||
|
<jakarta.annotation.version>2.0.0</jakarta.annotation.version>
|
||||||
|
<jakarta.json.bind.version>3.0.0</jakarta.json.bind.version>
|
||||||
|
<jakarta.json.version>2.0.1</jakarta.json.version>
|
||||||
|
<jakarta.ws.rs.version>3.0.0</jakarta.ws.rs.version>
|
||||||
|
<jakarta.xml.bind.version>3.0.1</jakarta.xml.bind.version>
|
||||||
|
<microprofile.rest.client.api.version>3.0</microprofile.rest.client.api.version>
|
||||||
|
<jersey.mp.rest.client.version>3.0.4</jersey.mp.rest.client.version>
|
||||||
|
<geronimo.config.impl.version>1.2.3</geronimo.config.impl.version>
|
||||||
|
<cxf.rt.rs.extension.providers.version>3.5.1</cxf.rt.rs.extension.providers.version>
|
||||||
|
<jaxb.core.version>3.0.2</jaxb.core.version>
|
||||||
|
<jaxb.impl.version>3.0.2</jaxb.impl.version>
|
||||||
|
<hibernate.validator.version>7.0.4.Final</hibernate.validator.version>
|
||||||
|
<jandex.maven.plugin.version>1.1.0</jandex.maven.plugin.version>
|
||||||
|
<maven.failsafe.plugin.version>2.6</maven.failsafe.plugin.version>
|
||||||
|
<build.helper.maven.plugin.version>1.9.1</build.helper.maven.plugin.version>
|
||||||
|
<mutiny.version>1.10.0</mutiny.version>
|
||||||
|
</properties>
|
||||||
|
</project>
|
@ -0,0 +1,58 @@
|
|||||||
|
/**
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* 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.text.DecimalFormat;
|
||||||
|
import java.util.GregorianCalendar;
|
||||||
|
import java.util.TimeZone;
|
||||||
|
|
||||||
|
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
|
||||||
|
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();
|
||||||
|
this.numberFormat = new DecimalFormat();
|
||||||
|
}
|
||||||
|
|
||||||
|
@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 super.clone();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,100 @@
|
|||||||
|
/**
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* 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.io.IOException;
|
||||||
|
import java.time.Instant;
|
||||||
|
import java.time.OffsetDateTime;
|
||||||
|
import java.time.ZoneId;
|
||||||
|
import java.time.ZonedDateTime;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
|
import java.time.temporal.Temporal;
|
||||||
|
import java.time.temporal.TemporalAccessor;
|
||||||
|
import java.util.function.BiFunction;
|
||||||
|
import java.util.function.Function;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.core.JsonParser;
|
||||||
|
import com.fasterxml.jackson.databind.DeserializationContext;
|
||||||
|
import com.fasterxml.jackson.datatype.jsr310.JavaTimeFeature;
|
||||||
|
import com.fasterxml.jackson.datatype.jsr310.deser.InstantDeserializer;
|
||||||
|
|
||||||
|
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
|
||||||
|
public class RFC3339InstantDeserializer<T extends Temporal> extends InstantDeserializer<T> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
private final static boolean DEFAULT_NORMALIZE_ZONE_ID = JavaTimeFeature.NORMALIZE_DESERIALIZED_ZONE_ID.enabledByDefault();
|
||||||
|
private final static boolean DEFAULT_ALWAYS_ALLOW_STRINGIFIED_DATE_TIMESTAMPS
|
||||||
|
= JavaTimeFeature.ALWAYS_ALLOW_STRINGIFIED_DATE_TIMESTAMPS.enabledByDefault();
|
||||||
|
|
||||||
|
public static final RFC3339InstantDeserializer<Instant> INSTANT = new RFC3339InstantDeserializer<>(
|
||||||
|
Instant.class, DateTimeFormatter.ISO_INSTANT,
|
||||||
|
Instant::from,
|
||||||
|
a -> Instant.ofEpochMilli( a.value ),
|
||||||
|
a -> Instant.ofEpochSecond( a.integer, a.fraction ),
|
||||||
|
null,
|
||||||
|
true, // yes, replace zero offset with Z
|
||||||
|
DEFAULT_NORMALIZE_ZONE_ID,
|
||||||
|
DEFAULT_ALWAYS_ALLOW_STRINGIFIED_DATE_TIMESTAMPS
|
||||||
|
);
|
||||||
|
|
||||||
|
public static final RFC3339InstantDeserializer<OffsetDateTime> OFFSET_DATE_TIME = new RFC3339InstantDeserializer<>(
|
||||||
|
OffsetDateTime.class, DateTimeFormatter.ISO_OFFSET_DATE_TIME,
|
||||||
|
OffsetDateTime::from,
|
||||||
|
a -> OffsetDateTime.ofInstant( Instant.ofEpochMilli( a.value ), a.zoneId ),
|
||||||
|
a -> OffsetDateTime.ofInstant( Instant.ofEpochSecond( a.integer, a.fraction ), a.zoneId ),
|
||||||
|
(d, z) -> ( d.isEqual( OffsetDateTime.MIN ) || d.isEqual( OffsetDateTime.MAX ) ?
|
||||||
|
d :
|
||||||
|
d.withOffsetSameInstant( z.getRules().getOffset( d.toLocalDateTime() ) ) ),
|
||||||
|
true, // yes, replace zero offset with Z
|
||||||
|
DEFAULT_NORMALIZE_ZONE_ID,
|
||||||
|
DEFAULT_ALWAYS_ALLOW_STRINGIFIED_DATE_TIMESTAMPS
|
||||||
|
);
|
||||||
|
|
||||||
|
public static final RFC3339InstantDeserializer<ZonedDateTime> ZONED_DATE_TIME = new RFC3339InstantDeserializer<>(
|
||||||
|
ZonedDateTime.class, DateTimeFormatter.ISO_ZONED_DATE_TIME,
|
||||||
|
ZonedDateTime::from,
|
||||||
|
a -> ZonedDateTime.ofInstant( Instant.ofEpochMilli( a.value ), a.zoneId ),
|
||||||
|
a -> ZonedDateTime.ofInstant( Instant.ofEpochSecond( a.integer, a.fraction ), a.zoneId ),
|
||||||
|
ZonedDateTime::withZoneSameInstant,
|
||||||
|
false, // keep zero offset and Z separate since zones explicitly supported
|
||||||
|
DEFAULT_NORMALIZE_ZONE_ID,
|
||||||
|
DEFAULT_ALWAYS_ALLOW_STRINGIFIED_DATE_TIMESTAMPS
|
||||||
|
);
|
||||||
|
|
||||||
|
protected RFC3339InstantDeserializer(
|
||||||
|
Class<T> supportedType,
|
||||||
|
DateTimeFormatter formatter,
|
||||||
|
Function<TemporalAccessor, T> parsedToValue,
|
||||||
|
Function<FromIntegerArguments, T> fromMilliseconds,
|
||||||
|
Function<FromDecimalArguments, T> fromNanoseconds,
|
||||||
|
BiFunction<T, ZoneId, T> adjust,
|
||||||
|
boolean replaceZeroOffsetAsZ,
|
||||||
|
boolean normalizeZoneId,
|
||||||
|
boolean readNumericStringsAsTimestamp) {
|
||||||
|
super(
|
||||||
|
supportedType,
|
||||||
|
formatter,
|
||||||
|
parsedToValue,
|
||||||
|
fromMilliseconds,
|
||||||
|
fromNanoseconds,
|
||||||
|
adjust,
|
||||||
|
replaceZeroOffsetAsZ,
|
||||||
|
normalizeZoneId,
|
||||||
|
readNumericStringsAsTimestamp
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected T _fromString(JsonParser p, DeserializationContext ctxt, String string0) throws IOException {
|
||||||
|
return super._fromString(p, ctxt, string0.replace( ' ', 'T' ));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,32 @@
|
|||||||
|
/**
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* 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.time.Instant;
|
||||||
|
import java.time.OffsetDateTime;
|
||||||
|
import java.time.ZonedDateTime;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.module.SimpleModule;
|
||||||
|
|
||||||
|
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
|
||||||
|
public class RFC3339JavaTimeModule extends SimpleModule {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public RFC3339JavaTimeModule() {
|
||||||
|
super("RFC3339JavaTimeModule");
|
||||||
|
|
||||||
|
addDeserializer(Instant.class, RFC3339InstantDeserializer.INSTANT);
|
||||||
|
addDeserializer(OffsetDateTime.class, RFC3339InstantDeserializer.OFFSET_DATE_TIME);
|
||||||
|
addDeserializer(ZonedDateTime.class, RFC3339InstantDeserializer.ZONED_DATE_TIME);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,34 @@
|
|||||||
|
/**
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* 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.api;
|
||||||
|
|
||||||
|
import jakarta.ws.rs.core.Response;
|
||||||
|
|
||||||
|
public class ApiException extends Exception {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
private Response response;
|
||||||
|
|
||||||
|
public ApiException() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
public ApiException(Response response) {
|
||||||
|
super("Api response has status code " + response.getStatus());
|
||||||
|
this.response = response;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Response getResponse() {
|
||||||
|
return this.response;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,33 @@
|
|||||||
|
/**
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* 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.api;
|
||||||
|
|
||||||
|
import jakarta.ws.rs.core.MultivaluedMap;
|
||||||
|
import jakarta.ws.rs.core.Response;
|
||||||
|
import jakarta.ws.rs.ext.Provider;
|
||||||
|
import org.eclipse.microprofile.rest.client.ext.ResponseExceptionMapper;
|
||||||
|
|
||||||
|
@Provider
|
||||||
|
public class ApiExceptionMapper
|
||||||
|
implements ResponseExceptionMapper<ApiException> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean handles(int status, MultivaluedMap<String, Object> headers) {
|
||||||
|
return status >= 400;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ApiException toThrowable(Response response) {
|
||||||
|
return new ApiException(response);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,137 @@
|
|||||||
|
/**
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* 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.api;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import org.openapitools.client.model.ModelApiResponse;
|
||||||
|
import org.openapitools.client.model.Pet;
|
||||||
|
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.io.OutputStream;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
import jakarta.ws.rs.*;
|
||||||
|
import jakarta.ws.rs.core.Response;
|
||||||
|
import jakarta.ws.rs.core.MediaType;
|
||||||
|
import org.apache.cxf.jaxrs.ext.multipart.*;
|
||||||
|
import io.smallrye.mutiny.Uni;
|
||||||
|
|
||||||
|
|
||||||
|
import org.eclipse.microprofile.rest.client.annotation.RegisterProvider;
|
||||||
|
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* <p>This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@RegisterRestClient(configKey="petstore")
|
||||||
|
@RegisterProvider(ApiExceptionMapper.class)
|
||||||
|
@Path("/pet")
|
||||||
|
public interface PetApi {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a new pet to the store
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@POST
|
||||||
|
|
||||||
|
@Consumes({ "application/json", "application/xml" })
|
||||||
|
@Produces({ "application/xml", "application/json" })
|
||||||
|
Uni<Pet> addPet(Pet pet) throws ApiException, ProcessingException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deletes a pet
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@DELETE
|
||||||
|
@Path("/{petId}")
|
||||||
|
Uni<Void> deletePet(@PathParam("petId") Long petId, @HeaderParam("api_key") String apiKey) throws ApiException, ProcessingException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Finds Pets by status
|
||||||
|
*
|
||||||
|
* Multiple status values can be provided with comma separated strings
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@GET
|
||||||
|
@Path("/findByStatus")
|
||||||
|
@Produces({ "application/xml", "application/json" })
|
||||||
|
Uni<List<Pet>> findPetsByStatus(@QueryParam("status") List<String> status) throws ApiException, ProcessingException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Finds Pets by tags
|
||||||
|
*
|
||||||
|
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
@GET
|
||||||
|
@Path("/findByTags")
|
||||||
|
@Produces({ "application/xml", "application/json" })
|
||||||
|
Uni<List<Pet>> findPetsByTags(@QueryParam("tags") List<String> tags) throws ApiException, ProcessingException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Find pet by ID
|
||||||
|
*
|
||||||
|
* Returns a single pet
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@GET
|
||||||
|
@Path("/{petId}")
|
||||||
|
@Produces({ "application/xml", "application/json" })
|
||||||
|
Uni<Pet> getPetById(@PathParam("petId") Long petId) throws ApiException, ProcessingException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update an existing pet
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@PUT
|
||||||
|
|
||||||
|
@Consumes({ "application/json", "application/xml" })
|
||||||
|
@Produces({ "application/xml", "application/json" })
|
||||||
|
Uni<Pet> updatePet(Pet pet) throws ApiException, ProcessingException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates a pet in the store with form data
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@POST
|
||||||
|
@Path("/{petId}")
|
||||||
|
@Consumes({ "application/x-www-form-urlencoded" })
|
||||||
|
Uni<Void> updatePetWithForm(@PathParam("petId") Long petId, @Multipart(value = "name", required = false) String name, @Multipart(value = "status", required = false) String status) throws ApiException, ProcessingException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* uploads an image
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@POST
|
||||||
|
@Path("/{petId}/uploadImage")
|
||||||
|
@Consumes({ "multipart/form-data" })
|
||||||
|
@Produces({ "application/json" })
|
||||||
|
Uni<ModelApiResponse> uploadFile(@PathParam("petId") Long petId, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata, @Multipart(value = "file" , required = false) Attachment _fileDetail) throws ApiException, ProcessingException;
|
||||||
|
}
|
@ -0,0 +1,87 @@
|
|||||||
|
/**
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* 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.api;
|
||||||
|
|
||||||
|
import org.openapitools.client.model.Order;
|
||||||
|
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.io.OutputStream;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
import jakarta.ws.rs.*;
|
||||||
|
import jakarta.ws.rs.core.Response;
|
||||||
|
import jakarta.ws.rs.core.MediaType;
|
||||||
|
import org.apache.cxf.jaxrs.ext.multipart.*;
|
||||||
|
import io.smallrye.mutiny.Uni;
|
||||||
|
|
||||||
|
|
||||||
|
import org.eclipse.microprofile.rest.client.annotation.RegisterProvider;
|
||||||
|
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* <p>This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@RegisterRestClient(configKey="petstore")
|
||||||
|
@RegisterProvider(ApiExceptionMapper.class)
|
||||||
|
@Path("/store")
|
||||||
|
public interface StoreApi {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete purchase order by ID
|
||||||
|
*
|
||||||
|
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@DELETE
|
||||||
|
@Path("/order/{orderId}")
|
||||||
|
Uni<Void> deleteOrder(@PathParam("orderId") String orderId) throws ApiException, ProcessingException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns pet inventories by status
|
||||||
|
*
|
||||||
|
* Returns a map of status codes to quantities
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@GET
|
||||||
|
@Path("/inventory")
|
||||||
|
@Produces({ "application/json" })
|
||||||
|
Uni<Map<String, Integer>> getInventory() throws ApiException, ProcessingException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Find purchase order by ID
|
||||||
|
*
|
||||||
|
* For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@GET
|
||||||
|
@Path("/order/{orderId}")
|
||||||
|
@Produces({ "application/xml", "application/json" })
|
||||||
|
Uni<Order> getOrderById(@PathParam("orderId") Long orderId) throws ApiException, ProcessingException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Place an order for a pet
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@POST
|
||||||
|
@Path("/order")
|
||||||
|
@Consumes({ "application/json" })
|
||||||
|
@Produces({ "application/xml", "application/json" })
|
||||||
|
Uni<Order> placeOrder(Order order) throws ApiException, ProcessingException;
|
||||||
|
}
|
@ -0,0 +1,130 @@
|
|||||||
|
/**
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* 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.api;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import org.openapitools.client.model.User;
|
||||||
|
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.io.OutputStream;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
import jakarta.ws.rs.*;
|
||||||
|
import jakarta.ws.rs.core.Response;
|
||||||
|
import jakarta.ws.rs.core.MediaType;
|
||||||
|
import org.apache.cxf.jaxrs.ext.multipart.*;
|
||||||
|
import io.smallrye.mutiny.Uni;
|
||||||
|
|
||||||
|
|
||||||
|
import org.eclipse.microprofile.rest.client.annotation.RegisterProvider;
|
||||||
|
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* <p>This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@RegisterRestClient(configKey="petstore")
|
||||||
|
@RegisterProvider(ApiExceptionMapper.class)
|
||||||
|
@Path("/user")
|
||||||
|
public interface UserApi {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create user
|
||||||
|
*
|
||||||
|
* This can only be done by the logged in user.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@POST
|
||||||
|
|
||||||
|
@Consumes({ "application/json" })
|
||||||
|
Uni<Void> createUser(User user) throws ApiException, ProcessingException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates list of users with given input array
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@POST
|
||||||
|
@Path("/createWithArray")
|
||||||
|
@Consumes({ "application/json" })
|
||||||
|
Uni<Void> createUsersWithArrayInput(List<User> user) throws ApiException, ProcessingException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates list of users with given input array
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@POST
|
||||||
|
@Path("/createWithList")
|
||||||
|
@Consumes({ "application/json" })
|
||||||
|
Uni<Void> createUsersWithListInput(List<User> user) throws ApiException, ProcessingException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete user
|
||||||
|
*
|
||||||
|
* This can only be done by the logged in user.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@DELETE
|
||||||
|
@Path("/{username}")
|
||||||
|
Uni<Void> deleteUser(@PathParam("username") String username) throws ApiException, ProcessingException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get user by user name
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@GET
|
||||||
|
@Path("/{username}")
|
||||||
|
@Produces({ "application/xml", "application/json" })
|
||||||
|
Uni<User> getUserByName(@PathParam("username") String username) throws ApiException, ProcessingException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Logs user into the system
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@GET
|
||||||
|
@Path("/login")
|
||||||
|
@Produces({ "application/xml", "application/json" })
|
||||||
|
Uni<String> loginUser(@QueryParam("username") String username, @QueryParam("password") String password) throws ApiException, ProcessingException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Logs out current logged in user session
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@GET
|
||||||
|
@Path("/logout")
|
||||||
|
Uni<Void> logoutUser() throws ApiException, ProcessingException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updated user
|
||||||
|
*
|
||||||
|
* This can only be done by the logged in user.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@PUT
|
||||||
|
@Path("/{username}")
|
||||||
|
@Consumes({ "application/json" })
|
||||||
|
Uni<Void> updateUser(@PathParam("username") String username, User user) throws ApiException, ProcessingException;
|
||||||
|
}
|
@ -0,0 +1,137 @@
|
|||||||
|
/**
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* 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.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
|
||||||
|
@JsonPropertyOrder({
|
||||||
|
Category.JSON_PROPERTY_ID,
|
||||||
|
Category.JSON_PROPERTY_NAME
|
||||||
|
})
|
||||||
|
/**
|
||||||
|
* A category for a pet
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class Category {
|
||||||
|
|
||||||
|
public static final String JSON_PROPERTY_ID = "id";
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
public static final String JSON_PROPERTY_NAME = "name";
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get id
|
||||||
|
* @return id
|
||||||
|
**/
|
||||||
|
@JsonProperty(JSON_PROPERTY_ID)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set id
|
||||||
|
*/
|
||||||
|
@JsonProperty(JSON_PROPERTY_ID)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Category id(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get name
|
||||||
|
* @return name
|
||||||
|
**/
|
||||||
|
@JsonProperty(JSON_PROPERTY_NAME)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set name
|
||||||
|
*/
|
||||||
|
@JsonProperty(JSON_PROPERTY_NAME)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Category name(String name) {
|
||||||
|
this.name = name;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Category category = (Category) o;
|
||||||
|
return Objects.equals(this.id, category.id) &&
|
||||||
|
Objects.equals(this.name, category.name);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(id, name);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a string representation of this pojo.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class Category {\n");
|
||||||
|
|
||||||
|
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
||||||
|
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private static String toIndentedString(Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,169 @@
|
|||||||
|
/**
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* 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.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
|
||||||
|
@JsonPropertyOrder({
|
||||||
|
ModelApiResponse.JSON_PROPERTY_CODE,
|
||||||
|
ModelApiResponse.JSON_PROPERTY_TYPE,
|
||||||
|
ModelApiResponse.JSON_PROPERTY_MESSAGE
|
||||||
|
})
|
||||||
|
@JsonTypeName("ApiResponse")
|
||||||
|
/**
|
||||||
|
* Describes the result of uploading an image resource
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class ModelApiResponse {
|
||||||
|
|
||||||
|
public static final String JSON_PROPERTY_CODE = "code";
|
||||||
|
|
||||||
|
private Integer code;
|
||||||
|
|
||||||
|
public static final String JSON_PROPERTY_TYPE = "type";
|
||||||
|
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
public static final String JSON_PROPERTY_MESSAGE = "message";
|
||||||
|
|
||||||
|
private String message;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get code
|
||||||
|
* @return code
|
||||||
|
**/
|
||||||
|
@JsonProperty(JSON_PROPERTY_CODE)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public Integer getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set code
|
||||||
|
*/
|
||||||
|
@JsonProperty(JSON_PROPERTY_CODE)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public void setCode(Integer code) {
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ModelApiResponse code(Integer code) {
|
||||||
|
this.code = code;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get type
|
||||||
|
* @return type
|
||||||
|
**/
|
||||||
|
@JsonProperty(JSON_PROPERTY_TYPE)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public String getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set type
|
||||||
|
*/
|
||||||
|
@JsonProperty(JSON_PROPERTY_TYPE)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public void setType(String type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ModelApiResponse type(String type) {
|
||||||
|
this.type = type;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get message
|
||||||
|
* @return message
|
||||||
|
**/
|
||||||
|
@JsonProperty(JSON_PROPERTY_MESSAGE)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public String getMessage() {
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set message
|
||||||
|
*/
|
||||||
|
@JsonProperty(JSON_PROPERTY_MESSAGE)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public void setMessage(String message) {
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ModelApiResponse message(String message) {
|
||||||
|
this.message = message;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
ModelApiResponse _apiResponse = (ModelApiResponse) o;
|
||||||
|
return Objects.equals(this.code, _apiResponse.code) &&
|
||||||
|
Objects.equals(this.type, _apiResponse.type) &&
|
||||||
|
Objects.equals(this.message, _apiResponse.message);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(code, type, message);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a string representation of this pojo.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class ModelApiResponse {\n");
|
||||||
|
|
||||||
|
sb.append(" code: ").append(toIndentedString(code)).append("\n");
|
||||||
|
sb.append(" type: ").append(toIndentedString(type)).append("\n");
|
||||||
|
sb.append(" message: ").append(toIndentedString(message)).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private static String toIndentedString(Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,297 @@
|
|||||||
|
/**
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* 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.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
|
||||||
|
@JsonPropertyOrder({
|
||||||
|
Order.JSON_PROPERTY_ID,
|
||||||
|
Order.JSON_PROPERTY_PET_ID,
|
||||||
|
Order.JSON_PROPERTY_QUANTITY,
|
||||||
|
Order.JSON_PROPERTY_SHIP_DATE,
|
||||||
|
Order.JSON_PROPERTY_STATUS,
|
||||||
|
Order.JSON_PROPERTY_COMPLETE
|
||||||
|
})
|
||||||
|
/**
|
||||||
|
* An order for a pets from the pet store
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class Order {
|
||||||
|
|
||||||
|
public static final String JSON_PROPERTY_ID = "id";
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
public static final String JSON_PROPERTY_PET_ID = "petId";
|
||||||
|
|
||||||
|
private Long petId;
|
||||||
|
|
||||||
|
public static final String JSON_PROPERTY_QUANTITY = "quantity";
|
||||||
|
|
||||||
|
private Integer quantity;
|
||||||
|
|
||||||
|
public static final String JSON_PROPERTY_SHIP_DATE = "shipDate";
|
||||||
|
|
||||||
|
private Date shipDate;
|
||||||
|
|
||||||
|
public enum StatusEnum {
|
||||||
|
|
||||||
|
PLACED(String.valueOf("placed")), APPROVED(String.valueOf("approved")), DELIVERED(String.valueOf("delivered"));
|
||||||
|
|
||||||
|
|
||||||
|
String value;
|
||||||
|
|
||||||
|
StatusEnum (String v) {
|
||||||
|
value = v;
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonValue
|
||||||
|
public String value() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return String.valueOf(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonCreator
|
||||||
|
public static StatusEnum fromValue(String value) {
|
||||||
|
for (StatusEnum b : StatusEnum.values()) {
|
||||||
|
if (b.value.equals(value)) {
|
||||||
|
return b;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final String JSON_PROPERTY_STATUS = "status";
|
||||||
|
/**
|
||||||
|
* Order Status
|
||||||
|
*/
|
||||||
|
|
||||||
|
private StatusEnum status;
|
||||||
|
|
||||||
|
public static final String JSON_PROPERTY_COMPLETE = "complete";
|
||||||
|
|
||||||
|
private Boolean complete = false;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get id
|
||||||
|
* @return id
|
||||||
|
**/
|
||||||
|
@JsonProperty(JSON_PROPERTY_ID)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set id
|
||||||
|
*/
|
||||||
|
@JsonProperty(JSON_PROPERTY_ID)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Order id(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get petId
|
||||||
|
* @return petId
|
||||||
|
**/
|
||||||
|
@JsonProperty(JSON_PROPERTY_PET_ID)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public Long getPetId() {
|
||||||
|
return petId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set petId
|
||||||
|
*/
|
||||||
|
@JsonProperty(JSON_PROPERTY_PET_ID)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public void setPetId(Long petId) {
|
||||||
|
this.petId = petId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Order petId(Long petId) {
|
||||||
|
this.petId = petId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get quantity
|
||||||
|
* @return quantity
|
||||||
|
**/
|
||||||
|
@JsonProperty(JSON_PROPERTY_QUANTITY)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public Integer getQuantity() {
|
||||||
|
return quantity;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set quantity
|
||||||
|
*/
|
||||||
|
@JsonProperty(JSON_PROPERTY_QUANTITY)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public void setQuantity(Integer quantity) {
|
||||||
|
this.quantity = quantity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Order quantity(Integer quantity) {
|
||||||
|
this.quantity = quantity;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get shipDate
|
||||||
|
* @return shipDate
|
||||||
|
**/
|
||||||
|
@JsonProperty(JSON_PROPERTY_SHIP_DATE)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public Date getShipDate() {
|
||||||
|
return shipDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set shipDate
|
||||||
|
*/
|
||||||
|
@JsonProperty(JSON_PROPERTY_SHIP_DATE)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public void setShipDate(Date shipDate) {
|
||||||
|
this.shipDate = shipDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Order shipDate(Date shipDate) {
|
||||||
|
this.shipDate = shipDate;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Order Status
|
||||||
|
* @return status
|
||||||
|
**/
|
||||||
|
@JsonProperty(JSON_PROPERTY_STATUS)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public StatusEnum getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set status
|
||||||
|
*/
|
||||||
|
@JsonProperty(JSON_PROPERTY_STATUS)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public void setStatus(StatusEnum status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Order status(StatusEnum status) {
|
||||||
|
this.status = status;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get complete
|
||||||
|
* @return complete
|
||||||
|
**/
|
||||||
|
@JsonProperty(JSON_PROPERTY_COMPLETE)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public Boolean getComplete() {
|
||||||
|
return complete;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set complete
|
||||||
|
*/
|
||||||
|
@JsonProperty(JSON_PROPERTY_COMPLETE)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public void setComplete(Boolean complete) {
|
||||||
|
this.complete = complete;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Order complete(Boolean complete) {
|
||||||
|
this.complete = complete;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Order order = (Order) o;
|
||||||
|
return Objects.equals(this.id, order.id) &&
|
||||||
|
Objects.equals(this.petId, order.petId) &&
|
||||||
|
Objects.equals(this.quantity, order.quantity) &&
|
||||||
|
Objects.equals(this.shipDate, order.shipDate) &&
|
||||||
|
Objects.equals(this.status, order.status) &&
|
||||||
|
Objects.equals(this.complete, order.complete);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(id, petId, quantity, shipDate, status, complete);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a string representation of this pojo.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class Order {\n");
|
||||||
|
|
||||||
|
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
||||||
|
sb.append(" petId: ").append(toIndentedString(petId)).append("\n");
|
||||||
|
sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n");
|
||||||
|
sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n");
|
||||||
|
sb.append(" status: ").append(toIndentedString(status)).append("\n");
|
||||||
|
sb.append(" complete: ").append(toIndentedString(complete)).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private static String toIndentedString(Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,319 @@
|
|||||||
|
/**
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* 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.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import org.openapitools.client.model.Category;
|
||||||
|
import org.openapitools.client.model.Tag;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
|
||||||
|
@JsonPropertyOrder({
|
||||||
|
Pet.JSON_PROPERTY_ID,
|
||||||
|
Pet.JSON_PROPERTY_CATEGORY,
|
||||||
|
Pet.JSON_PROPERTY_NAME,
|
||||||
|
Pet.JSON_PROPERTY_PHOTO_URLS,
|
||||||
|
Pet.JSON_PROPERTY_TAGS,
|
||||||
|
Pet.JSON_PROPERTY_STATUS
|
||||||
|
})
|
||||||
|
/**
|
||||||
|
* A pet for sale in the pet store
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class Pet {
|
||||||
|
|
||||||
|
public static final String JSON_PROPERTY_ID = "id";
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
public static final String JSON_PROPERTY_CATEGORY = "category";
|
||||||
|
|
||||||
|
private Category category;
|
||||||
|
|
||||||
|
public static final String JSON_PROPERTY_NAME = "name";
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
public static final String JSON_PROPERTY_PHOTO_URLS = "photoUrls";
|
||||||
|
|
||||||
|
private List<String> photoUrls = new ArrayList<>();
|
||||||
|
|
||||||
|
public static final String JSON_PROPERTY_TAGS = "tags";
|
||||||
|
|
||||||
|
private List<Tag> tags = null;
|
||||||
|
|
||||||
|
public enum StatusEnum {
|
||||||
|
|
||||||
|
AVAILABLE(String.valueOf("available")), PENDING(String.valueOf("pending")), SOLD(String.valueOf("sold"));
|
||||||
|
|
||||||
|
|
||||||
|
String value;
|
||||||
|
|
||||||
|
StatusEnum (String v) {
|
||||||
|
value = v;
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonValue
|
||||||
|
public String value() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return String.valueOf(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonCreator
|
||||||
|
public static StatusEnum fromValue(String value) {
|
||||||
|
for (StatusEnum b : StatusEnum.values()) {
|
||||||
|
if (b.value.equals(value)) {
|
||||||
|
return b;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final String JSON_PROPERTY_STATUS = "status";
|
||||||
|
/**
|
||||||
|
* pet status in the store
|
||||||
|
*/
|
||||||
|
|
||||||
|
private StatusEnum status;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get id
|
||||||
|
* @return id
|
||||||
|
**/
|
||||||
|
@JsonProperty(JSON_PROPERTY_ID)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set id
|
||||||
|
*/
|
||||||
|
@JsonProperty(JSON_PROPERTY_ID)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Pet id(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get category
|
||||||
|
* @return category
|
||||||
|
**/
|
||||||
|
@JsonProperty(JSON_PROPERTY_CATEGORY)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public Category getCategory() {
|
||||||
|
return category;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set category
|
||||||
|
*/
|
||||||
|
@JsonProperty(JSON_PROPERTY_CATEGORY)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public void setCategory(Category category) {
|
||||||
|
this.category = category;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Pet category(Category category) {
|
||||||
|
this.category = category;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get name
|
||||||
|
* @return name
|
||||||
|
**/
|
||||||
|
@JsonProperty(JSON_PROPERTY_NAME)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.ALWAYS)
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set name
|
||||||
|
*/
|
||||||
|
@JsonProperty(JSON_PROPERTY_NAME)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.ALWAYS)
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Pet name(String name) {
|
||||||
|
this.name = name;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get photoUrls
|
||||||
|
* @return photoUrls
|
||||||
|
**/
|
||||||
|
@JsonProperty(JSON_PROPERTY_PHOTO_URLS)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.ALWAYS)
|
||||||
|
public List<String> getPhotoUrls() {
|
||||||
|
return photoUrls;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set photoUrls
|
||||||
|
*/
|
||||||
|
@JsonProperty(JSON_PROPERTY_PHOTO_URLS)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.ALWAYS)
|
||||||
|
public void setPhotoUrls(List<String> photoUrls) {
|
||||||
|
this.photoUrls = photoUrls;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Pet photoUrls(List<String> photoUrls) {
|
||||||
|
this.photoUrls = photoUrls;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Pet addPhotoUrlsItem(String photoUrlsItem) {
|
||||||
|
if (this.photoUrls == null) {
|
||||||
|
this.photoUrls = new ArrayList<>();
|
||||||
|
}
|
||||||
|
this.photoUrls.add(photoUrlsItem);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get tags
|
||||||
|
* @return tags
|
||||||
|
**/
|
||||||
|
@JsonProperty(JSON_PROPERTY_TAGS)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public List<Tag> getTags() {
|
||||||
|
return tags;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set tags
|
||||||
|
*/
|
||||||
|
@JsonProperty(JSON_PROPERTY_TAGS)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public void setTags(List<Tag> tags) {
|
||||||
|
this.tags = tags;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Pet tags(List<Tag> tags) {
|
||||||
|
this.tags = tags;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Pet addTagsItem(Tag tagsItem) {
|
||||||
|
if (this.tags == null) {
|
||||||
|
this.tags = new ArrayList<>();
|
||||||
|
}
|
||||||
|
this.tags.add(tagsItem);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* pet status in the store
|
||||||
|
* @return status
|
||||||
|
* @deprecated
|
||||||
|
**/
|
||||||
|
@Deprecated
|
||||||
|
@JsonProperty(JSON_PROPERTY_STATUS)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public StatusEnum getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set status
|
||||||
|
*/
|
||||||
|
@JsonProperty(JSON_PROPERTY_STATUS)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public void setStatus(StatusEnum status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Pet status(StatusEnum status) {
|
||||||
|
this.status = status;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Pet pet = (Pet) o;
|
||||||
|
return Objects.equals(this.id, pet.id) &&
|
||||||
|
Objects.equals(this.category, pet.category) &&
|
||||||
|
Objects.equals(this.name, pet.name) &&
|
||||||
|
Objects.equals(this.photoUrls, pet.photoUrls) &&
|
||||||
|
Objects.equals(this.tags, pet.tags) &&
|
||||||
|
Objects.equals(this.status, pet.status);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(id, category, name, photoUrls, tags, status);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a string representation of this pojo.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class Pet {\n");
|
||||||
|
|
||||||
|
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
||||||
|
sb.append(" category: ").append(toIndentedString(category)).append("\n");
|
||||||
|
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||||
|
sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n");
|
||||||
|
sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
|
||||||
|
sb.append(" status: ").append(toIndentedString(status)).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private static String toIndentedString(Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,137 @@
|
|||||||
|
/**
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* 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.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
|
||||||
|
@JsonPropertyOrder({
|
||||||
|
Tag.JSON_PROPERTY_ID,
|
||||||
|
Tag.JSON_PROPERTY_NAME
|
||||||
|
})
|
||||||
|
/**
|
||||||
|
* A tag for a pet
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class Tag {
|
||||||
|
|
||||||
|
public static final String JSON_PROPERTY_ID = "id";
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
public static final String JSON_PROPERTY_NAME = "name";
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get id
|
||||||
|
* @return id
|
||||||
|
**/
|
||||||
|
@JsonProperty(JSON_PROPERTY_ID)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set id
|
||||||
|
*/
|
||||||
|
@JsonProperty(JSON_PROPERTY_ID)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Tag id(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get name
|
||||||
|
* @return name
|
||||||
|
**/
|
||||||
|
@JsonProperty(JSON_PROPERTY_NAME)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set name
|
||||||
|
*/
|
||||||
|
@JsonProperty(JSON_PROPERTY_NAME)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Tag name(String name) {
|
||||||
|
this.name = name;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Tag tag = (Tag) o;
|
||||||
|
return Objects.equals(this.id, tag.id) &&
|
||||||
|
Objects.equals(this.name, tag.name);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(id, name);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a string representation of this pojo.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class Tag {\n");
|
||||||
|
|
||||||
|
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
||||||
|
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private static String toIndentedString(Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,326 @@
|
|||||||
|
/**
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* 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.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
|
||||||
|
@JsonPropertyOrder({
|
||||||
|
User.JSON_PROPERTY_ID,
|
||||||
|
User.JSON_PROPERTY_USERNAME,
|
||||||
|
User.JSON_PROPERTY_FIRST_NAME,
|
||||||
|
User.JSON_PROPERTY_LAST_NAME,
|
||||||
|
User.JSON_PROPERTY_EMAIL,
|
||||||
|
User.JSON_PROPERTY_PASSWORD,
|
||||||
|
User.JSON_PROPERTY_PHONE,
|
||||||
|
User.JSON_PROPERTY_USER_STATUS
|
||||||
|
})
|
||||||
|
/**
|
||||||
|
* A User who is purchasing from the pet store
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class User {
|
||||||
|
|
||||||
|
public static final String JSON_PROPERTY_ID = "id";
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
public static final String JSON_PROPERTY_USERNAME = "username";
|
||||||
|
|
||||||
|
private String username;
|
||||||
|
|
||||||
|
public static final String JSON_PROPERTY_FIRST_NAME = "firstName";
|
||||||
|
|
||||||
|
private String firstName;
|
||||||
|
|
||||||
|
public static final String JSON_PROPERTY_LAST_NAME = "lastName";
|
||||||
|
|
||||||
|
private String lastName;
|
||||||
|
|
||||||
|
public static final String JSON_PROPERTY_EMAIL = "email";
|
||||||
|
|
||||||
|
private String email;
|
||||||
|
|
||||||
|
public static final String JSON_PROPERTY_PASSWORD = "password";
|
||||||
|
|
||||||
|
private String password;
|
||||||
|
|
||||||
|
public static final String JSON_PROPERTY_PHONE = "phone";
|
||||||
|
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
public static final String JSON_PROPERTY_USER_STATUS = "userStatus";
|
||||||
|
/**
|
||||||
|
* User Status
|
||||||
|
*/
|
||||||
|
|
||||||
|
private Integer userStatus;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get id
|
||||||
|
* @return id
|
||||||
|
**/
|
||||||
|
@JsonProperty(JSON_PROPERTY_ID)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set id
|
||||||
|
*/
|
||||||
|
@JsonProperty(JSON_PROPERTY_ID)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public User id(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get username
|
||||||
|
* @return username
|
||||||
|
**/
|
||||||
|
@JsonProperty(JSON_PROPERTY_USERNAME)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public String getUsername() {
|
||||||
|
return username;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set username
|
||||||
|
*/
|
||||||
|
@JsonProperty(JSON_PROPERTY_USERNAME)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public void setUsername(String username) {
|
||||||
|
this.username = username;
|
||||||
|
}
|
||||||
|
|
||||||
|
public User username(String username) {
|
||||||
|
this.username = username;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get firstName
|
||||||
|
* @return firstName
|
||||||
|
**/
|
||||||
|
@JsonProperty(JSON_PROPERTY_FIRST_NAME)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public String getFirstName() {
|
||||||
|
return firstName;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set firstName
|
||||||
|
*/
|
||||||
|
@JsonProperty(JSON_PROPERTY_FIRST_NAME)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public void setFirstName(String firstName) {
|
||||||
|
this.firstName = firstName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public User firstName(String firstName) {
|
||||||
|
this.firstName = firstName;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get lastName
|
||||||
|
* @return lastName
|
||||||
|
**/
|
||||||
|
@JsonProperty(JSON_PROPERTY_LAST_NAME)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public String getLastName() {
|
||||||
|
return lastName;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set lastName
|
||||||
|
*/
|
||||||
|
@JsonProperty(JSON_PROPERTY_LAST_NAME)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public void setLastName(String lastName) {
|
||||||
|
this.lastName = lastName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public User lastName(String lastName) {
|
||||||
|
this.lastName = lastName;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get email
|
||||||
|
* @return email
|
||||||
|
**/
|
||||||
|
@JsonProperty(JSON_PROPERTY_EMAIL)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public String getEmail() {
|
||||||
|
return email;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set email
|
||||||
|
*/
|
||||||
|
@JsonProperty(JSON_PROPERTY_EMAIL)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public void setEmail(String email) {
|
||||||
|
this.email = email;
|
||||||
|
}
|
||||||
|
|
||||||
|
public User email(String email) {
|
||||||
|
this.email = email;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get password
|
||||||
|
* @return password
|
||||||
|
**/
|
||||||
|
@JsonProperty(JSON_PROPERTY_PASSWORD)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public String getPassword() {
|
||||||
|
return password;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set password
|
||||||
|
*/
|
||||||
|
@JsonProperty(JSON_PROPERTY_PASSWORD)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public void setPassword(String password) {
|
||||||
|
this.password = password;
|
||||||
|
}
|
||||||
|
|
||||||
|
public User password(String password) {
|
||||||
|
this.password = password;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get phone
|
||||||
|
* @return phone
|
||||||
|
**/
|
||||||
|
@JsonProperty(JSON_PROPERTY_PHONE)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public String getPhone() {
|
||||||
|
return phone;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set phone
|
||||||
|
*/
|
||||||
|
@JsonProperty(JSON_PROPERTY_PHONE)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public void setPhone(String phone) {
|
||||||
|
this.phone = phone;
|
||||||
|
}
|
||||||
|
|
||||||
|
public User phone(String phone) {
|
||||||
|
this.phone = phone;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* User Status
|
||||||
|
* @return userStatus
|
||||||
|
**/
|
||||||
|
@JsonProperty(JSON_PROPERTY_USER_STATUS)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public Integer getUserStatus() {
|
||||||
|
return userStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set userStatus
|
||||||
|
*/
|
||||||
|
@JsonProperty(JSON_PROPERTY_USER_STATUS)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public void setUserStatus(Integer userStatus) {
|
||||||
|
this.userStatus = userStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public User userStatus(Integer userStatus) {
|
||||||
|
this.userStatus = userStatus;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
User user = (User) o;
|
||||||
|
return Objects.equals(this.id, user.id) &&
|
||||||
|
Objects.equals(this.username, user.username) &&
|
||||||
|
Objects.equals(this.firstName, user.firstName) &&
|
||||||
|
Objects.equals(this.lastName, user.lastName) &&
|
||||||
|
Objects.equals(this.email, user.email) &&
|
||||||
|
Objects.equals(this.password, user.password) &&
|
||||||
|
Objects.equals(this.phone, user.phone) &&
|
||||||
|
Objects.equals(this.userStatus, user.userStatus);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a string representation of this pojo.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class User {\n");
|
||||||
|
|
||||||
|
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
||||||
|
sb.append(" username: ").append(toIndentedString(username)).append("\n");
|
||||||
|
sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n");
|
||||||
|
sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n");
|
||||||
|
sb.append(" email: ").append(toIndentedString(email)).append("\n");
|
||||||
|
sb.append(" password: ").append(toIndentedString(password)).append("\n");
|
||||||
|
sb.append(" phone: ").append(toIndentedString(phone)).append("\n");
|
||||||
|
sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private static String toIndentedString(Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,198 @@
|
|||||||
|
/**
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* 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.api;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import org.openapitools.client.model.ModelApiResponse;
|
||||||
|
import org.openapitools.client.model.Pet;
|
||||||
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
import org.junit.jupiter.api.Assertions;
|
||||||
|
|
||||||
|
import org.eclipse.microprofile.rest.client.RestClientBuilder;
|
||||||
|
|
||||||
|
import java.net.URL;
|
||||||
|
import java.net.MalformedURLException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* OpenAPI Petstore Test
|
||||||
|
*
|
||||||
|
* API tests for PetApi
|
||||||
|
*/
|
||||||
|
public class PetApiTest {
|
||||||
|
|
||||||
|
private PetApi client;
|
||||||
|
private String baseUrl = "http://localhost:9080";
|
||||||
|
|
||||||
|
@BeforeEach
|
||||||
|
public void setup() throws MalformedURLException {
|
||||||
|
// TODO initialize the client
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a new pet to the store
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void addPetTest() {
|
||||||
|
// TODO: test validations
|
||||||
|
Pet pet = null;
|
||||||
|
//Uni<Pet> response = api.addPet(pet);
|
||||||
|
//Assertions.assertNotNull(response);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deletes a pet
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void deletePetTest() {
|
||||||
|
// TODO: test validations
|
||||||
|
Long petId = null;
|
||||||
|
String apiKey = null;
|
||||||
|
//api.deletePet(petId, apiKey);
|
||||||
|
//Assertions.assertNotNull(response);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Finds Pets by status
|
||||||
|
*
|
||||||
|
* Multiple status values can be provided with comma separated strings
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void findPetsByStatusTest() {
|
||||||
|
// TODO: test validations
|
||||||
|
List<String> status = null;
|
||||||
|
//Uni<List<Pet>> response = api.findPetsByStatus(status);
|
||||||
|
//Assertions.assertNotNull(response);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Finds Pets by tags
|
||||||
|
*
|
||||||
|
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void findPetsByTagsTest() {
|
||||||
|
// TODO: test validations
|
||||||
|
List<String> tags = null;
|
||||||
|
//Uni<List<Pet>> response = api.findPetsByTags(tags);
|
||||||
|
//Assertions.assertNotNull(response);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Find pet by ID
|
||||||
|
*
|
||||||
|
* Returns a single pet
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void getPetByIdTest() {
|
||||||
|
// TODO: test validations
|
||||||
|
Long petId = null;
|
||||||
|
//Uni<Pet> response = api.getPetById(petId);
|
||||||
|
//Assertions.assertNotNull(response);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update an existing pet
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void updatePetTest() {
|
||||||
|
// TODO: test validations
|
||||||
|
Pet pet = null;
|
||||||
|
//Uni<Pet> response = api.updatePet(pet);
|
||||||
|
//Assertions.assertNotNull(response);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates a pet in the store with form data
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void updatePetWithFormTest() {
|
||||||
|
// TODO: test validations
|
||||||
|
Long petId = null;
|
||||||
|
String name = null;
|
||||||
|
String status = null;
|
||||||
|
//api.updatePetWithForm(petId, name, status);
|
||||||
|
//Assertions.assertNotNull(response);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* uploads an image
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void uploadFileTest() {
|
||||||
|
// TODO: test validations
|
||||||
|
Long petId = null;
|
||||||
|
String additionalMetadata = null;
|
||||||
|
org.apache.cxf.jaxrs.ext.multipart.Attachment _file = null;
|
||||||
|
//Uni<ModelApiResponse> response = api.uploadFile(petId, additionalMetadata, _file);
|
||||||
|
//Assertions.assertNotNull(response);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,118 @@
|
|||||||
|
/**
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* 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.api;
|
||||||
|
|
||||||
|
import org.openapitools.client.model.Order;
|
||||||
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
import org.junit.jupiter.api.Assertions;
|
||||||
|
|
||||||
|
import org.eclipse.microprofile.rest.client.RestClientBuilder;
|
||||||
|
|
||||||
|
import java.net.URL;
|
||||||
|
import java.net.MalformedURLException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* OpenAPI Petstore Test
|
||||||
|
*
|
||||||
|
* API tests for StoreApi
|
||||||
|
*/
|
||||||
|
public class StoreApiTest {
|
||||||
|
|
||||||
|
private StoreApi client;
|
||||||
|
private String baseUrl = "http://localhost:9080";
|
||||||
|
|
||||||
|
@BeforeEach
|
||||||
|
public void setup() throws MalformedURLException {
|
||||||
|
// TODO initialize the client
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete purchase order by ID
|
||||||
|
*
|
||||||
|
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void deleteOrderTest() {
|
||||||
|
// TODO: test validations
|
||||||
|
String orderId = null;
|
||||||
|
//api.deleteOrder(orderId);
|
||||||
|
//Assertions.assertNotNull(response);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns pet inventories by status
|
||||||
|
*
|
||||||
|
* Returns a map of status codes to quantities
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void getInventoryTest() {
|
||||||
|
// TODO: test validations
|
||||||
|
//Uni<Map<String, Integer>> response = api.getInventory();
|
||||||
|
//Assertions.assertNotNull(response);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Find purchase order by ID
|
||||||
|
*
|
||||||
|
* For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void getOrderByIdTest() {
|
||||||
|
// TODO: test validations
|
||||||
|
Long orderId = null;
|
||||||
|
//Uni<Order> response = api.getOrderById(orderId);
|
||||||
|
//Assertions.assertNotNull(response);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Place an order for a pet
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void placeOrderTest() {
|
||||||
|
// TODO: test validations
|
||||||
|
Order order = null;
|
||||||
|
//Uni<Order> response = api.placeOrder(order);
|
||||||
|
//Assertions.assertNotNull(response);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,193 @@
|
|||||||
|
/**
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* 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.api;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import org.openapitools.client.model.User;
|
||||||
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
import org.junit.jupiter.api.Assertions;
|
||||||
|
|
||||||
|
import org.eclipse.microprofile.rest.client.RestClientBuilder;
|
||||||
|
|
||||||
|
import java.net.URL;
|
||||||
|
import java.net.MalformedURLException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* OpenAPI Petstore Test
|
||||||
|
*
|
||||||
|
* API tests for UserApi
|
||||||
|
*/
|
||||||
|
public class UserApiTest {
|
||||||
|
|
||||||
|
private UserApi client;
|
||||||
|
private String baseUrl = "http://localhost:9080";
|
||||||
|
|
||||||
|
@BeforeEach
|
||||||
|
public void setup() throws MalformedURLException {
|
||||||
|
// TODO initialize the client
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create user
|
||||||
|
*
|
||||||
|
* This can only be done by the logged in user.
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void createUserTest() {
|
||||||
|
// TODO: test validations
|
||||||
|
User user = null;
|
||||||
|
//api.createUser(user);
|
||||||
|
//Assertions.assertNotNull(response);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates list of users with given input array
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void createUsersWithArrayInputTest() {
|
||||||
|
// TODO: test validations
|
||||||
|
List<User> user = null;
|
||||||
|
//api.createUsersWithArrayInput(user);
|
||||||
|
//Assertions.assertNotNull(response);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates list of users with given input array
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void createUsersWithListInputTest() {
|
||||||
|
// TODO: test validations
|
||||||
|
List<User> user = null;
|
||||||
|
//api.createUsersWithListInput(user);
|
||||||
|
//Assertions.assertNotNull(response);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete user
|
||||||
|
*
|
||||||
|
* This can only be done by the logged in user.
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void deleteUserTest() {
|
||||||
|
// TODO: test validations
|
||||||
|
String username = null;
|
||||||
|
//api.deleteUser(username);
|
||||||
|
//Assertions.assertNotNull(response);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get user by user name
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void getUserByNameTest() {
|
||||||
|
// TODO: test validations
|
||||||
|
String username = null;
|
||||||
|
//Uni<User> response = api.getUserByName(username);
|
||||||
|
//Assertions.assertNotNull(response);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Logs user into the system
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void loginUserTest() {
|
||||||
|
// TODO: test validations
|
||||||
|
String username = null;
|
||||||
|
String password = null;
|
||||||
|
//Uni<String> response = api.loginUser(username, password);
|
||||||
|
//Assertions.assertNotNull(response);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Logs out current logged in user session
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void logoutUserTest() {
|
||||||
|
// TODO: test validations
|
||||||
|
//api.logoutUser();
|
||||||
|
//Assertions.assertNotNull(response);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updated user
|
||||||
|
*
|
||||||
|
* This can only be done by the logged in user.
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void updateUserTest() {
|
||||||
|
// TODO: test validations
|
||||||
|
String username = null;
|
||||||
|
User user = null;
|
||||||
|
//api.updateUser(username, user);
|
||||||
|
//Assertions.assertNotNull(response);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,55 @@
|
|||||||
|
/**
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* 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.model;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import org.junit.jupiter.api.Assertions;
|
||||||
|
import org.junit.jupiter.api.Disabled;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model tests for Category
|
||||||
|
*/
|
||||||
|
class CategoryTest {
|
||||||
|
private final Category model = new Category();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model tests for Category
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
void testCategory() {
|
||||||
|
// TODO: test Category
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'id'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
void idTest() {
|
||||||
|
// TODO: test id
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'name'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
void nameTest() {
|
||||||
|
// TODO: test name
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,63 @@
|
|||||||
|
/**
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* 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.model;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import org.junit.jupiter.api.Assertions;
|
||||||
|
import org.junit.jupiter.api.Disabled;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model tests for ModelApiResponse
|
||||||
|
*/
|
||||||
|
class ModelApiResponseTest {
|
||||||
|
private final ModelApiResponse model = new ModelApiResponse();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model tests for ModelApiResponse
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
void testModelApiResponse() {
|
||||||
|
// TODO: test ModelApiResponse
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'code'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
void codeTest() {
|
||||||
|
// TODO: test code
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'type'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
void typeTest() {
|
||||||
|
// TODO: test type
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'message'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
void messageTest() {
|
||||||
|
// TODO: test message
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,88 @@
|
|||||||
|
/**
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* 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.model;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import java.util.Date;
|
||||||
|
import org.junit.jupiter.api.Assertions;
|
||||||
|
import org.junit.jupiter.api.Disabled;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model tests for Order
|
||||||
|
*/
|
||||||
|
class OrderTest {
|
||||||
|
private final Order model = new Order();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model tests for Order
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
void testOrder() {
|
||||||
|
// TODO: test Order
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'id'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
void idTest() {
|
||||||
|
// TODO: test id
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'petId'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
void petIdTest() {
|
||||||
|
// TODO: test petId
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'quantity'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
void quantityTest() {
|
||||||
|
// TODO: test quantity
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'shipDate'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
void shipDateTest() {
|
||||||
|
// TODO: test shipDate
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'status'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
void statusTest() {
|
||||||
|
// TODO: test status
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'complete'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
void completeTest() {
|
||||||
|
// TODO: test complete
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,92 @@
|
|||||||
|
/**
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* 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.model;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import org.openapitools.client.model.Category;
|
||||||
|
import org.openapitools.client.model.Tag;
|
||||||
|
import org.junit.jupiter.api.Assertions;
|
||||||
|
import org.junit.jupiter.api.Disabled;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model tests for Pet
|
||||||
|
*/
|
||||||
|
class PetTest {
|
||||||
|
private final Pet model = new Pet();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model tests for Pet
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
void testPet() {
|
||||||
|
// TODO: test Pet
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'id'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
void idTest() {
|
||||||
|
// TODO: test id
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'category'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
void categoryTest() {
|
||||||
|
// TODO: test category
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'name'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
void nameTest() {
|
||||||
|
// TODO: test name
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'photoUrls'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
void photoUrlsTest() {
|
||||||
|
// TODO: test photoUrls
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'tags'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
void tagsTest() {
|
||||||
|
// TODO: test tags
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'status'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
void statusTest() {
|
||||||
|
// TODO: test status
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,55 @@
|
|||||||
|
/**
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* 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.model;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import org.junit.jupiter.api.Assertions;
|
||||||
|
import org.junit.jupiter.api.Disabled;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model tests for Tag
|
||||||
|
*/
|
||||||
|
class TagTest {
|
||||||
|
private final Tag model = new Tag();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model tests for Tag
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
void testTag() {
|
||||||
|
// TODO: test Tag
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'id'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
void idTest() {
|
||||||
|
// TODO: test id
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'name'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
void nameTest() {
|
||||||
|
// TODO: test name
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,103 @@
|
|||||||
|
/**
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* 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.model;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import org.junit.jupiter.api.Assertions;
|
||||||
|
import org.junit.jupiter.api.Disabled;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model tests for User
|
||||||
|
*/
|
||||||
|
class UserTest {
|
||||||
|
private final User model = new User();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model tests for User
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
void testUser() {
|
||||||
|
// TODO: test User
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'id'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
void idTest() {
|
||||||
|
// TODO: test id
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'username'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
void usernameTest() {
|
||||||
|
// TODO: test username
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'firstName'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
void firstNameTest() {
|
||||||
|
// TODO: test firstName
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'lastName'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
void lastNameTest() {
|
||||||
|
// TODO: test lastName
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'email'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
void emailTest() {
|
||||||
|
// TODO: test email
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'password'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
void passwordTest() {
|
||||||
|
// TODO: test password
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'phone'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
void phoneTest() {
|
||||||
|
// TODO: test phone
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'userStatus'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
void userStatusTest() {
|
||||||
|
// TODO: test userStatus
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -14,6 +14,8 @@ package org.openapitools.client.model;
|
|||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
@ -51,6 +53,7 @@ public class Category {
|
|||||||
@XmlElement(name = "name")
|
@XmlElement(name = "name")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get id
|
* Get id
|
||||||
* @return id
|
* @return id
|
||||||
|
@ -14,6 +14,8 @@ package org.openapitools.client.model;
|
|||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
@ -57,6 +59,7 @@ public class ModelApiResponse {
|
|||||||
@XmlElement(name = "message")
|
@XmlElement(name = "message")
|
||||||
private String message;
|
private String message;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get code
|
* Get code
|
||||||
* @return code
|
* @return code
|
||||||
|
@ -14,6 +14,8 @@ package org.openapitools.client.model;
|
|||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
@ -108,6 +110,7 @@ public class Order {
|
|||||||
@XmlElement(name = "complete")
|
@XmlElement(name = "complete")
|
||||||
private Boolean complete = false;
|
private Boolean complete = false;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get id
|
* Get id
|
||||||
* @return id
|
* @return id
|
||||||
|
@ -14,6 +14,8 @@ package org.openapitools.client.model;
|
|||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
@ -114,6 +116,7 @@ public class Pet {
|
|||||||
*/
|
*/
|
||||||
private StatusEnum status;
|
private StatusEnum status;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get id
|
* Get id
|
||||||
* @return id
|
* @return id
|
||||||
|
@ -14,6 +14,8 @@ package org.openapitools.client.model;
|
|||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
@ -51,6 +53,7 @@ public class Tag {
|
|||||||
@XmlElement(name = "name")
|
@XmlElement(name = "name")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get id
|
* Get id
|
||||||
* @return id
|
* @return id
|
||||||
|
@ -14,6 +14,8 @@ package org.openapitools.client.model;
|
|||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
@ -84,6 +86,7 @@ public class User {
|
|||||||
*/
|
*/
|
||||||
private Integer userStatus;
|
private Integer userStatus;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get id
|
* Get id
|
||||||
* @return id
|
* @return id
|
||||||
|
@ -16,6 +16,8 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
|
|||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
@ -41,6 +43,7 @@ public class AdditionalPropertiesClass {
|
|||||||
|
|
||||||
private Map<String, Map<String, String>> mapOfMapProperty = null;
|
private Map<String, Map<String, String>> mapOfMapProperty = null;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get mapProperty
|
* Get mapProperty
|
||||||
* @return mapProperty
|
* @return mapProperty
|
||||||
|
@ -16,6 +16,8 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
|
|||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
@ -40,6 +42,7 @@ public class AllOfWithSingleRef {
|
|||||||
|
|
||||||
private SingleRefType singleRefType;
|
private SingleRefType singleRefType;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get username
|
* Get username
|
||||||
* @return username
|
* @return username
|
||||||
|
@ -16,6 +16,8 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
|
|||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
@ -52,6 +54,7 @@ public class Animal {
|
|||||||
|
|
||||||
private String color = "red";
|
private String color = "red";
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get className
|
* Get className
|
||||||
* @return className
|
* @return className
|
||||||
|
@ -16,6 +16,8 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
|
|||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
@ -38,6 +40,7 @@ public class ArrayOfArrayOfNumberOnly {
|
|||||||
|
|
||||||
private List<List<BigDecimal>> arrayArrayNumber = null;
|
private List<List<BigDecimal>> arrayArrayNumber = null;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get arrayArrayNumber
|
* Get arrayArrayNumber
|
||||||
* @return arrayArrayNumber
|
* @return arrayArrayNumber
|
||||||
|
@ -16,6 +16,8 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
|
|||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
@ -38,6 +40,7 @@ public class ArrayOfNumberOnly {
|
|||||||
|
|
||||||
private List<BigDecimal> arrayNumber = null;
|
private List<BigDecimal> arrayNumber = null;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get arrayNumber
|
* Get arrayNumber
|
||||||
* @return arrayNumber
|
* @return arrayNumber
|
||||||
|
@ -16,6 +16,8 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
|
|||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
@ -48,6 +50,7 @@ public class ArrayTest {
|
|||||||
|
|
||||||
private List<List<ReadOnlyFirst>> arrayArrayOfModel = null;
|
private List<List<ReadOnlyFirst>> arrayArrayOfModel = null;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get arrayOfString
|
* Get arrayOfString
|
||||||
* @return arrayOfString
|
* @return arrayOfString
|
||||||
|
@ -16,6 +16,8 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
|
|||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
@ -62,6 +64,7 @@ public class Capitalization {
|
|||||||
|
|
||||||
private String ATT_NAME;
|
private String ATT_NAME;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get smallCamel
|
* Get smallCamel
|
||||||
* @return smallCamel
|
* @return smallCamel
|
||||||
|
@ -16,6 +16,8 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
|
|||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
@ -44,6 +46,7 @@ public class Cat extends Animal {
|
|||||||
|
|
||||||
private Boolean declawed;
|
private Boolean declawed;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get declawed
|
* Get declawed
|
||||||
* @return declawed
|
* @return declawed
|
||||||
|
@ -16,6 +16,8 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
|
|||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
@ -39,6 +41,7 @@ public class Category {
|
|||||||
|
|
||||||
private String name = "default-name";
|
private String name = "default-name";
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get id
|
* Get id
|
||||||
* @return id
|
* @return id
|
||||||
|
@ -16,6 +16,8 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
|
|||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
@ -44,6 +46,7 @@ public class ChildWithNullable extends ParentWithNullable {
|
|||||||
|
|
||||||
private String otherProperty;
|
private String otherProperty;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get otherProperty
|
* Get otherProperty
|
||||||
* @return otherProperty
|
* @return otherProperty
|
||||||
|
@ -16,6 +16,8 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
|
|||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
@ -37,6 +39,7 @@ public class ClassModel {
|
|||||||
|
|
||||||
private String propertyClass;
|
private String propertyClass;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get propertyClass
|
* Get propertyClass
|
||||||
* @return propertyClass
|
* @return propertyClass
|
||||||
|
@ -16,6 +16,8 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
|
|||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
@ -34,6 +36,7 @@ public class Client {
|
|||||||
|
|
||||||
private String client;
|
private String client;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get client
|
* Get client
|
||||||
* @return client
|
* @return client
|
||||||
|
@ -16,6 +16,8 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
|
|||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
@ -34,6 +36,7 @@ public class DeprecatedObject {
|
|||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get name
|
* Get name
|
||||||
* @return name
|
* @return name
|
||||||
|
@ -16,6 +16,8 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
|
|||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
@ -44,6 +46,7 @@ public class Dog extends Animal {
|
|||||||
|
|
||||||
private String breed;
|
private String breed;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get breed
|
* Get breed
|
||||||
* @return breed
|
* @return breed
|
||||||
|
@ -16,6 +16,8 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
|
|||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
@ -106,6 +108,7 @@ public class EnumArrays {
|
|||||||
|
|
||||||
private List<ArrayEnumEnum> arrayEnum = null;
|
private List<ArrayEnumEnum> arrayEnum = null;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get justSymbol
|
* Get justSymbol
|
||||||
* @return justSymbol
|
* @return justSymbol
|
||||||
|
@ -16,6 +16,8 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
|
|||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
|
||||||
|
@ -16,6 +16,8 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
|
|||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
@ -202,6 +204,7 @@ public class EnumTest {
|
|||||||
|
|
||||||
private OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue = OuterEnumIntegerDefaultValue.NUMBER_0;
|
private OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue = OuterEnumIntegerDefaultValue.NUMBER_0;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get enumString
|
* Get enumString
|
||||||
* @return enumString
|
* @return enumString
|
||||||
|
@ -16,6 +16,8 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
|
|||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
@ -43,6 +45,7 @@ public class FakeBigDecimalMap200Response {
|
|||||||
|
|
||||||
private Map<String, BigDecimal> someMap = null;
|
private Map<String, BigDecimal> someMap = null;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get someId
|
* Get someId
|
||||||
* @return someId
|
* @return someId
|
||||||
|
@ -16,6 +16,8 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
|
|||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
@ -43,6 +45,7 @@ public class FileSchemaTestClass {
|
|||||||
|
|
||||||
private List<ModelFile> files = null;
|
private List<ModelFile> files = null;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get _file
|
* Get _file
|
||||||
* @return _file
|
* @return _file
|
||||||
|
@ -16,6 +16,8 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
|
|||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
@ -34,6 +36,7 @@ public class Foo {
|
|||||||
|
|
||||||
private String bar = "bar";
|
private String bar = "bar";
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get bar
|
* Get bar
|
||||||
* @return bar
|
* @return bar
|
||||||
|
@ -16,6 +16,8 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
|
|||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
@ -36,6 +38,7 @@ public class FooGetDefaultResponse {
|
|||||||
|
|
||||||
private Foo string;
|
private Foo string;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get string
|
* Get string
|
||||||
* @return string
|
* @return string
|
||||||
|
@ -16,6 +16,8 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
|
|||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
@ -120,6 +122,7 @@ public class FormatTest {
|
|||||||
|
|
||||||
private String patternWithDigitsAndDelimiter;
|
private String patternWithDigitsAndDelimiter;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get integer
|
* Get integer
|
||||||
* minimum: 10
|
* minimum: 10
|
||||||
|
@ -16,6 +16,8 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
|
|||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
@ -40,6 +42,7 @@ public class HasOnlyReadOnly {
|
|||||||
|
|
||||||
private String foo;
|
private String foo;
|
||||||
|
|
||||||
|
|
||||||
public HasOnlyReadOnly() {
|
public HasOnlyReadOnly() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,6 +16,8 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
|
|||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
@ -37,6 +39,7 @@ public class HealthCheckResult {
|
|||||||
|
|
||||||
private String nullableMessage;
|
private String nullableMessage;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get nullableMessage
|
* Get nullableMessage
|
||||||
* @return nullableMessage
|
* @return nullableMessage
|
||||||
|
@ -16,6 +16,8 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
|
|||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
@ -83,6 +85,7 @@ public class MapTest {
|
|||||||
|
|
||||||
private Map<String, Boolean> indirectMap = null;
|
private Map<String, Boolean> indirectMap = null;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get mapMapOfString
|
* Get mapMapOfString
|
||||||
* @return mapMapOfString
|
* @return mapMapOfString
|
||||||
|
@ -16,6 +16,8 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
|
|||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
@ -49,6 +51,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
|
|||||||
|
|
||||||
private Map<String, Animal> map = null;
|
private Map<String, Animal> map = null;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get uuid
|
* Get uuid
|
||||||
* @return uuid
|
* @return uuid
|
||||||
|
@ -16,6 +16,8 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
|
|||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
@ -43,6 +45,7 @@ public class Model200Response {
|
|||||||
|
|
||||||
private String propertyClass;
|
private String propertyClass;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get name
|
* Get name
|
||||||
* @return name
|
* @return name
|
||||||
|
@ -16,6 +16,8 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
|
|||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
@ -45,6 +47,7 @@ public class ModelApiResponse {
|
|||||||
|
|
||||||
private String message;
|
private String message;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get code
|
* Get code
|
||||||
* @return code
|
* @return code
|
||||||
|
@ -16,6 +16,8 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
|
|||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
@ -41,6 +43,7 @@ public class ModelFile {
|
|||||||
|
|
||||||
private String sourceURI;
|
private String sourceURI;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test capitalization
|
* Test capitalization
|
||||||
* @return sourceURI
|
* @return sourceURI
|
||||||
|
@ -16,6 +16,8 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
|
|||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
@ -35,6 +37,7 @@ public class ModelList {
|
|||||||
|
|
||||||
private String _123list;
|
private String _123list;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get _123list
|
* Get _123list
|
||||||
* @return _123list
|
* @return _123list
|
||||||
|
@ -16,6 +16,8 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
|
|||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
@ -38,6 +40,7 @@ public class ModelReturn {
|
|||||||
|
|
||||||
private Integer _return;
|
private Integer _return;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get _return
|
* Get _return
|
||||||
* @return _return
|
* @return _return
|
||||||
|
@ -16,6 +16,8 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
|
|||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
@ -52,6 +54,7 @@ public class Name {
|
|||||||
|
|
||||||
private Integer _123number;
|
private Integer _123number;
|
||||||
|
|
||||||
|
|
||||||
public Name() {
|
public Name() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,6 +16,8 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
|
|||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
@ -46,7 +48,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
|||||||
NullableClass.JSON_PROPERTY_OBJECT_ITEMS_NULLABLE
|
NullableClass.JSON_PROPERTY_OBJECT_ITEMS_NULLABLE
|
||||||
})
|
})
|
||||||
|
|
||||||
public class NullableClass extends HashMap<String, Object> {
|
public class NullableClass {
|
||||||
|
|
||||||
public static final String JSON_PROPERTY_INTEGER_PROP = "integer_prop";
|
public static final String JSON_PROPERTY_INTEGER_PROP = "integer_prop";
|
||||||
|
|
||||||
@ -95,6 +97,50 @@ public class NullableClass extends HashMap<String, Object> {
|
|||||||
public static final String JSON_PROPERTY_OBJECT_ITEMS_NULLABLE = "object_items_nullable";
|
public static final String JSON_PROPERTY_OBJECT_ITEMS_NULLABLE = "object_items_nullable";
|
||||||
|
|
||||||
private Map<String, Object> objectItemsNullable = null;
|
private Map<String, Object> objectItemsNullable = null;
|
||||||
|
/**
|
||||||
|
* A container for additional, undeclared properties.
|
||||||
|
* This is a holder for any undeclared properties as specified with
|
||||||
|
* the 'additionalProperties' keyword in the OAS document.
|
||||||
|
*/
|
||||||
|
private Map<String, Object> additionalProperties;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the additional (undeclared) property with the specified name and value.
|
||||||
|
* If the property does not already exist, create it otherwise replace it.
|
||||||
|
* @param key the name of the property
|
||||||
|
* @param value the value of the property
|
||||||
|
* @return self reference
|
||||||
|
*/
|
||||||
|
@com.fasterxml.jackson.annotation.JsonAnySetter
|
||||||
|
public NullableClass putAdditionalProperty(String key, Object value) {
|
||||||
|
if (this.additionalProperties == null) {
|
||||||
|
this.additionalProperties = new HashMap<String, Object>();
|
||||||
|
}
|
||||||
|
this.additionalProperties.put(key, value);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the additional (undeclared) properties.
|
||||||
|
* @return the additional (undeclared) properties
|
||||||
|
*/
|
||||||
|
@com.fasterxml.jackson.annotation.JsonAnyGetter
|
||||||
|
public Map<String, Object> getAdditionalProperties() {
|
||||||
|
return additionalProperties;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the additional (undeclared) property with the specified name.
|
||||||
|
* @param key the name of the property
|
||||||
|
* @return the additional (undeclared) property with the specified name
|
||||||
|
*/
|
||||||
|
public Object getAdditionalProperty(String key) {
|
||||||
|
if (this.additionalProperties == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return this.additionalProperties.get(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get integerProp
|
* Get integerProp
|
||||||
@ -449,7 +495,7 @@ public class NullableClass extends HashMap<String, Object> {
|
|||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append("class NullableClass {\n");
|
sb.append("class NullableClass {\n");
|
||||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
|
||||||
sb.append(" integerProp: ").append(toIndentedString(integerProp)).append("\n");
|
sb.append(" integerProp: ").append(toIndentedString(integerProp)).append("\n");
|
||||||
sb.append(" numberProp: ").append(toIndentedString(numberProp)).append("\n");
|
sb.append(" numberProp: ").append(toIndentedString(numberProp)).append("\n");
|
||||||
sb.append(" booleanProp: ").append(toIndentedString(booleanProp)).append("\n");
|
sb.append(" booleanProp: ").append(toIndentedString(booleanProp)).append("\n");
|
||||||
@ -462,6 +508,7 @@ public class NullableClass extends HashMap<String, Object> {
|
|||||||
sb.append(" objectNullableProp: ").append(toIndentedString(objectNullableProp)).append("\n");
|
sb.append(" objectNullableProp: ").append(toIndentedString(objectNullableProp)).append("\n");
|
||||||
sb.append(" objectAndItemsNullableProp: ").append(toIndentedString(objectAndItemsNullableProp)).append("\n");
|
sb.append(" objectAndItemsNullableProp: ").append(toIndentedString(objectAndItemsNullableProp)).append("\n");
|
||||||
sb.append(" objectItemsNullable: ").append(toIndentedString(objectItemsNullable)).append("\n");
|
sb.append(" objectItemsNullable: ").append(toIndentedString(objectItemsNullable)).append("\n");
|
||||||
|
sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
|
||||||
sb.append("}");
|
sb.append("}");
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,8 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
|
|||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
@ -35,6 +37,7 @@ public class NumberOnly {
|
|||||||
|
|
||||||
private BigDecimal justNumber;
|
private BigDecimal justNumber;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get justNumber
|
* Get justNumber
|
||||||
* @return justNumber
|
* @return justNumber
|
||||||
|
@ -16,6 +16,8 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
|
|||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
@ -54,6 +56,7 @@ public class ObjectWithDeprecatedFields {
|
|||||||
|
|
||||||
private List<String> bars = null;
|
private List<String> bars = null;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get uuid
|
* Get uuid
|
||||||
* @return uuid
|
* @return uuid
|
||||||
|
@ -16,6 +16,8 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
|
|||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
@ -95,6 +97,7 @@ public class Order {
|
|||||||
|
|
||||||
private Boolean complete = false;
|
private Boolean complete = false;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get id
|
* Get id
|
||||||
* @return id
|
* @return id
|
||||||
|
@ -16,6 +16,8 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
|
|||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
@ -45,6 +47,7 @@ public class OuterComposite {
|
|||||||
|
|
||||||
private Boolean myBoolean;
|
private Boolean myBoolean;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get myNumber
|
* Get myNumber
|
||||||
* @return myNumber
|
* @return myNumber
|
||||||
|
@ -16,6 +16,8 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
|
|||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
|
||||||
|
@ -16,6 +16,8 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
|
|||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
|
||||||
|
@ -16,6 +16,8 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
|
|||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
|
||||||
|
@ -16,6 +16,8 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
|
|||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
|
||||||
|
@ -16,6 +16,8 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
|
|||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
@ -35,6 +37,7 @@ public class OuterObjectWithEnumProperty {
|
|||||||
|
|
||||||
private OuterEnumInteger value;
|
private OuterEnumInteger value;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get value
|
* Get value
|
||||||
* @return value
|
* @return value
|
||||||
|
@ -16,6 +16,8 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
|
|||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
@ -83,6 +85,7 @@ public class ParentWithNullable {
|
|||||||
|
|
||||||
private String nullableProperty;
|
private String nullableProperty;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get type
|
* Get type
|
||||||
* @return type
|
* @return type
|
||||||
|
@ -16,6 +16,8 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
|
|||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
@ -102,6 +104,7 @@ public class Pet {
|
|||||||
|
|
||||||
private StatusEnum status;
|
private StatusEnum status;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get id
|
* Get id
|
||||||
* @return id
|
* @return id
|
||||||
|
@ -16,6 +16,8 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
|
|||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
@ -39,6 +41,7 @@ public class ReadOnlyFirst {
|
|||||||
|
|
||||||
private String baz;
|
private String baz;
|
||||||
|
|
||||||
|
|
||||||
public ReadOnlyFirst() {
|
public ReadOnlyFirst() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,6 +16,8 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
|
|||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
|
||||||
|
@ -16,6 +16,8 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
|
|||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
@ -35,6 +37,7 @@ public class SpecialModelName {
|
|||||||
|
|
||||||
private Long $specialPropertyName;
|
private Long $specialPropertyName;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get $specialPropertyName
|
* Get $specialPropertyName
|
||||||
* @return $specialPropertyName
|
* @return $specialPropertyName
|
||||||
|
@ -16,6 +16,8 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
|
|||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
@ -39,6 +41,7 @@ public class Tag {
|
|||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get id
|
* Get id
|
||||||
* @return id
|
* @return id
|
||||||
|
@ -16,13 +16,13 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
|
|||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
import com.fasterxml.jackson.annotation.JsonValue;
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
|
||||||
@ -31,11 +31,55 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
|||||||
})
|
})
|
||||||
@JsonTypeName("testInlineFreeformAdditionalProperties_request")
|
@JsonTypeName("testInlineFreeformAdditionalProperties_request")
|
||||||
|
|
||||||
public class TestInlineFreeformAdditionalPropertiesRequest extends HashMap<String, Object> {
|
public class TestInlineFreeformAdditionalPropertiesRequest {
|
||||||
|
|
||||||
public static final String JSON_PROPERTY_SOME_PROPERTY = "someProperty";
|
public static final String JSON_PROPERTY_SOME_PROPERTY = "someProperty";
|
||||||
|
|
||||||
private String someProperty;
|
private String someProperty;
|
||||||
|
/**
|
||||||
|
* A container for additional, undeclared properties.
|
||||||
|
* This is a holder for any undeclared properties as specified with
|
||||||
|
* the 'additionalProperties' keyword in the OAS document.
|
||||||
|
*/
|
||||||
|
private Map<String, Object> additionalProperties;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the additional (undeclared) property with the specified name and value.
|
||||||
|
* If the property does not already exist, create it otherwise replace it.
|
||||||
|
* @param key the name of the property
|
||||||
|
* @param value the value of the property
|
||||||
|
* @return self reference
|
||||||
|
*/
|
||||||
|
@com.fasterxml.jackson.annotation.JsonAnySetter
|
||||||
|
public TestInlineFreeformAdditionalPropertiesRequest putAdditionalProperty(String key, Object value) {
|
||||||
|
if (this.additionalProperties == null) {
|
||||||
|
this.additionalProperties = new HashMap<String, Object>();
|
||||||
|
}
|
||||||
|
this.additionalProperties.put(key, value);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the additional (undeclared) properties.
|
||||||
|
* @return the additional (undeclared) properties
|
||||||
|
*/
|
||||||
|
@com.fasterxml.jackson.annotation.JsonAnyGetter
|
||||||
|
public Map<String, Object> getAdditionalProperties() {
|
||||||
|
return additionalProperties;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the additional (undeclared) property with the specified name.
|
||||||
|
* @param key the name of the property
|
||||||
|
* @return the additional (undeclared) property with the specified name
|
||||||
|
*/
|
||||||
|
public Object getAdditionalProperty(String key) {
|
||||||
|
if (this.additionalProperties == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return this.additionalProperties.get(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get someProperty
|
* Get someProperty
|
||||||
@ -78,8 +122,9 @@ public class TestInlineFreeformAdditionalPropertiesRequest extends HashMap<Strin
|
|||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append("class TestInlineFreeformAdditionalPropertiesRequest {\n");
|
sb.append("class TestInlineFreeformAdditionalPropertiesRequest {\n");
|
||||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
|
||||||
sb.append(" someProperty: ").append(toIndentedString(someProperty)).append("\n");
|
sb.append(" someProperty: ").append(toIndentedString(someProperty)).append("\n");
|
||||||
|
sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
|
||||||
sb.append("}");
|
sb.append("}");
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,8 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
|
|||||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
@ -72,6 +74,7 @@ public class User {
|
|||||||
|
|
||||||
private Integer userStatus;
|
private Integer userStatus;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get id
|
* Get id
|
||||||
* @return id
|
* @return id
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user